Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

s3a Group Title

What exactly are primitives in the context of an operating system? Here is the problem I am trying to figure out: "What are the two main functions of an operating system?" Here is the answer: "The two main functions of an operating system are managing system resources and providing application programs with a set of primitives that provide higher-level services." I can't find an explanation online because I think there are various usages of the same word. Also, I would appreciate if someone could give me several examples of primitives (in this context).

  • 2 years ago
  • 2 years ago

  • This Question is Closed
  1. s3a Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    I know that, for example, primitives in the Java programming language are the “axiomatic objects” or “quantized objects” to kind of use mathematical or scientific nomenclature. What I mean by the two terminologies I just used is that objects are composed of primitives but primitives are the lowest in the hierarchy so they just are themselves. Any input would be greatly appreciated! Thanks in advance!

    • 2 years ago
  2. agdgdgdgwngo Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    The OS kernel also manages access to those system resources by applications. The so-called primitives provided by the OS are things like interfaces for system calls, like when a program calls `fopen()' it is invoking the OS's C library implementation.

    • 2 years ago
  3. agdgdgdgwngo Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    Another example is the windows api: http://en.wikipedia.org/wiki/Windows_api_function_list

    • 2 years ago
  4. staticvoidman Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    You may know this but lets me begin with the primitives of communication: SEND, RECEIVE. These primitives are the basics that tell the OS how to establish and use a connection. A programmer need not be bothered with the low level coding i.e ASM coding to define how the OS is supposed to do this. You simply can make use of the primitives provided to send/receive a file. Concept of primitives in java/c and primitives in an OS are a little different. Primitives in an OS are basically accessed via API's cause a primitive directly interacts with the hardware and uneducated use of primitives will be harmful to the system. The primitives of an OS in terms of memory management would technically be something like READ, WRITE. Within these primitives would be the code for the OS & Hardware specific instructions to access the memory cells. The primitives of an OS for Process Control would technically be something like: CREATE, SUSPEND, ACTIVATE, DESTROY but this is done by the kernel cause it's safer that way or you can say that these primitives are accessed by system calls (from the top of my head i'd say creating a handle for a process) but to reach this, we still need to go to the API of the OS. Providing programs with a set of primitives relieves the programmer from his duties of actually loading a program in memory, linking it with the kernel (for execution) and managing it (this would require complex logic and coding as well as making sure other resources remain secure) I'm sorry but i can't give an actual list of operating system primitives but this is what it is in a simple sense.

    • 2 years ago
  5. 45g23 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Link to the primitives in Assembler language: http://www.jegerlehner.ch/intel/IntelCodeTable.pdf

    • 2 years ago
  6. 45g23 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Using these you can make up code that makes things simplified and "higher-level" as they say. Not sure about it.

    • 2 years ago
  7. s3a Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Thanks to everyone. You've all said something useful but agdgdgdgwngo's answer hit the fundamental issue of the problem I was having.

    • 2 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.