review-14 - CS 414 Review Operating System Definition...

Info icon This preview shows pages 1–11. Sign up to view the full content.

CS 414 Review
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

2 Operating System: Definition Definition An Operating System (OS) provides a virtual machine on top of the real hardware, whose interface is more convenient than the raw hardware interface. Hardware Applications Operating System OS interface Physical machine interface Advantages Easy to use, simpler to code, more reliable, more secure, … You can say: “I want to write XYZ into file ABC”
Image of page 2
3 What is in an OS? Operating System Services Interrupts, Cache, Physical Memory, TLB, Hardware Devices Generic I/O File System Memory Management Process Management Virtual Memory Networking Naming Access Control Windowing & graphics Windowing & Gfx Applications OS Interface Physical m/c Intf Device Drivers Shells System Utils Quake Sql Server Logical OS Structure
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Crossing Protection Boundaries User calls OS procedure for “privileged” operations Calling a kernel mode service from user mode program: Using System Calls System Calls switches execution to kernel mode User process System Call Trap Mode bit = 0 Save Caller’s state Execute system call Restore state Return Mode bit = 1 Resume process User Mode Mode bit = 1 Kernel Mode Mode bit = 0
Image of page 4
5 What is a process? The unit of execution The unit of scheduling Thread of execution + address space Is a program in execution Sequential, instruction-at-a-time execution of a program. The same as “job” or “task” or “sequential process”
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

6 Process State Transitions New Ready Running Exit Waiting admitted interrupt I/O or event wait I/O or event completion dispatch done Processes hop across states as a result of: Actions they perform, e.g. system calls Actions performed by OS, e.g. rescheduling External actions, e.g. I/O
Image of page 6
7 Context Switch For a running process All registers are loaded in CPU and modified E.g. Program Counter, Stack Pointer, General Purpose Registers When process relinquishes the CPU, the OS Saves register values to the PCB of that process To execute another process, the OS Loads register values from PCB of that process Context Switch - Process of switching CPU from one process to another - Very machine dependent for types of registers
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

8 Threads and Processes Most operating systems therefore support two entities: the process , which defines the address space and general process attributes the thread , which defines a sequential execution stream within a process A thread is bound to a single process. For each process, however, there may be many threads. Threads are the unit of scheduling Processes are containers in which threads execute
Image of page 8
9 Schedulers Process migrates among several queues Device queue, job queue, ready queue Scheduler selects a process to run from these queues Long-term scheduler: load a job in memory Runs infrequently Short-term scheduler: Select ready process to run on CPU Should be fast Middle-term scheduler Reduce multiprogramming or memory consumption
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

10
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '07
  • VOLLSET
  • Operating Systems, OS, Virtual memory, Writer, data link physical, network data link

{[ snackBarMessage ]}

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