Presentation is loading. Please wait.

Presentation is loading. Please wait.

SLC/VER1.0/OS CONCEPTS/OCT'99 1Processes Process Concept Process Scheduling Operation On Processes Cooperating Processes Threads Interprocess Communication.

Similar presentations


Presentation on theme: "SLC/VER1.0/OS CONCEPTS/OCT'99 1Processes Process Concept Process Scheduling Operation On Processes Cooperating Processes Threads Interprocess Communication."— Presentation transcript:

1 SLC/VER1.0/OS CONCEPTS/OCT'99 1Processes Process Concept Process Scheduling Operation On Processes Cooperating Processes Threads Interprocess Communication

2 SLC/VER1.0/OS CONCEPTS/OCT'99 2 Process Concept The Process Process State Process Control Block

3 SLC/VER1.0/OS CONCEPTS/OCT'99 3 Process Concept What to call all the CPU activities?

4 SLC/VER1.0/OS CONCEPTS/OCT'99 4 Process Concept-The Process A process is more than the program code A program is a passive entity A process is an active entity Two processes may be associated with the same program, they are nevertheless considered two separate execution sequences.

5 SLC/VER1.0/OS CONCEPTS/OCT'99 5 Process Concept-Process State As a process executes, it changes state. Each process may be in one of the following states: -New -Running -Waiting -Ready -Terminated

6 SLC/VER1.0/OS CONCEPTS/OCT'99 6 Process Concept-Process State READY NEW RUNNING TERMINATED WAITING Diagram of Process state admitted I/O or event completion interrupt Scheduler dispatch I/O or event wait exit

7 SLC/VER1.0/OS CONCEPTS/OCT'99 7 Process Concept-Process Control Block Pointer Process state registers List of open files...... Memory limits Process number Program counter Process control block

8 SLC/VER1.0/OS CONCEPTS/OCT'99 8 Process Concept-Process Control Block Each process is represented in the OS by a process control block Contains information associated with a specific process. Following are the information it keeps: -Process State -Program Counter

9 SLC/VER1.0/OS CONCEPTS/OCT'99 9 Process Concept-Process Control Block Following are the information it keeps: -CPU registers -CPU Scheduling information -Memory-management information -Accounting information -I/O status information

10 SLC/VER1.0/OS CONCEPTS/OCT'99 10 Process Concept-Process Scheduling Scheduling Queues Schedulers Context Switch

11 SLC/VER1.0/OS CONCEPTS/OCT'99 11 Process Scheduling- Scheduling Queues Types of queues - Job queue - ready queue There are also other queues in the system such as device queue. Each device has its own device queue. A common representation for a discussion of process scheduling is a queueing diagram

12 SLC/VER1.0/OS CONCEPTS/OCT'99 12 Process Scheduling- Scheduling Queues READY QUEUE I/O QUEUE I/O REQUEST TIME SLICE EXPIRED FORK A CHILD WAIT FOR AN INTERRUPT I/O CPU Child terminaes Child executes INTERRUPT OCCURS Queueing-diagram representation of process scheduling

13 SLC/VER1.0/OS CONCEPTS/OCT'99 13 Process Scheduling-Schedulers Schedulers select the process form these queues. Two types of Schedulers -Long-term scheduler(Job Scheduler) -Short-term scheduler(CPU Scheduler) Some OS, such as time-sharing systems, may introduce an additional, intermediate level of scheduling called medium-term scheduler

14 SLC/VER1.0/OS CONCEPTS/OCT'99 14 Process Scheduling-Context switch Switching the CPU to another process requires saving the state of the old process and loading the saved state for the new process. This task is known as a context switch. Context-switch is pure overhead.

15 SLC/VER1.0/OS CONCEPTS/OCT'99 15 Operation on Processes Process Creation Process Termination

16 SLC/VER1.0/OS CONCEPTS/OCT'99 16 Operation on Processes-Process Creation A Process may create several new process, via create-process system call, during the course of execution. A process will need certain resources to accomplish its task.


Download ppt "SLC/VER1.0/OS CONCEPTS/OCT'99 1Processes Process Concept Process Scheduling Operation On Processes Cooperating Processes Threads Interprocess Communication."

Similar presentations


Ads by Google