142_01.pdf - Operating System Design CMPE142 Presentation 1 Agenda ● Programs and processes ● Responsibilities of the OS ● OS design goals Let’s

142_01.pdf - Operating System Design CMPE142 Presentation 1...

This preview shows page 1 - 13 out of 33 pages.

Operating System Design CMPE142 Presentation 1
Image of page 1

Subscribe to view the full document.

Agenda Programs and processes Responsibilities of the OS OS design goals
Image of page 2
Let’s talk about programs What happens when a program runs?
Image of page 3

Subscribe to view the full document.

Let’s talk about programs What happens when a program runs? The processor fetches instructions from memory … then figures out which instruction it is … then dispatches the instruction to an execution port (ALU, FPU, etc)
Image of page 4
Instructions How many instructions are there?
Image of page 5

Subscribe to view the full document.

Operating system responsibility The operating system is responsible for: Making it easy to run multiple programs at the same time Allowing programs to share resources Which? Allowing programs to interact with devices Such as?
Image of page 6
Operating system responsibility The operating system must remain in full control of the resources it manages Memory, devices, etc What could happen if the operating system allowed unrestricted access to these resources?
Image of page 7

Subscribe to view the full document.

Making one resource look like many The operating system takes a physical resource and transforms it into a virtual copy of itself The virtual form of the resource is what a program sees and uses Virtualizing a resource like this allows the operating system to share the single (real) resource among all programs
Image of page 8
Interacting with the operating system All operating systems provide services to programs These services allow the program to manage its own virtual copy of any resource being used
Image of page 9

Subscribe to view the full document.

Interacting with the operating system A simple example - int *numbers = malloc(10 * sizeof(int)); free(numbers);
Image of page 10
Interacting with the operating system A simple example - The first statement says “please give me some memory for 10 integers” The second statement says “done with this memory, thanks” int *numbers = malloc(10 * sizeof(int)); free(numbers);
Image of page 11

Subscribe to view the full document.

Interacting with the operating system Similar services exist for storage, networking, and other resources or devices managed by the operating system Service requests are sent to the operating system via a system call
Image of page 12
Image of page 13
  • SIMONSHIM

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes