Presentation is loading. Please wait.

Presentation is loading. Please wait.

Day 08 Operating systems concepts and Processes. Functions of an OS.

Similar presentations


Presentation on theme: "Day 08 Operating systems concepts and Processes. Functions of an OS."— Presentation transcript:

1 Day 08 Operating systems concepts and Processes

2 Functions of an OS

3 Some terms … Uni-programming Multi-programming/Time-sharing Multi-processing

4

5 Role of interrupts in multi- programming When a process is waiting for I/O, CPU is idle. An interrupt will inform the CPU when the I/O device is ready. CPU can therefore run other programs while waiting.

6 PROCESSES

7 Process A program in execution including the state of the PC, registers and other variables. The entity that can be assigned to and executed on a processor. A unit of resource allocation.

8 Process description

9 Process Control Block Key data structure in an Operating System One per process Contains process information Process = Program code + Data + PCB

10

11

12 Time slice ~= 1/10 th of a second

13 Create a process Create a PCB (set PC, set registers, set state, set process id) Type “ps -a” at prompt to get a list of process ids. Address space in main memory is allocated to the process. secondary memory is the hard disk, CD, floppy, etc main memory is RAM OS data structures are updated e.g. Process table, memory tables, I/O tables etc

14 When should a process be created?

15 Reasons for process termination

16 Process state models The OS is responsible for interleaving the execution of the processes. It is important to understand the possible behaviors of all the processes and how to react to them. The behavior of processes is modeled by means of the process state model.

17 Two-State Process Model

18


Download ppt "Day 08 Operating systems concepts and Processes. Functions of an OS."

Similar presentations


Ads by Google