Presentation is loading. Please wait.

Presentation is loading. Please wait.

Process Control Management Prepared by: Dhason Operating Systems.

Similar presentations


Presentation on theme: "Process Control Management Prepared by: Dhason Operating Systems."— Presentation transcript:

1 Process Control Management Prepared by: Dhason Operating Systems

2 Operating Systems Process Control Management Slide 2 of 25 Topic & Structure of the lesson Process Process States Process Scheduling

3 Operating Systems Process Control Management Slide 3 of 25 Learning Outcomes At the end of this lecture YOU should be able to: - define the term process - identify process states - draw and explain process states using process state diagrams - describe how process scheduling works

4 Operating Systems Process Control Management Slide 4 of 25 Process What is a process? - it is a program in execution which progresses in a sequential manner - it is a unit of work with a unique process identification - requires resources like memory, CPU time and files to complete its task - resources are allocated when a process is created or while in execution

5 Operating Systems Process Control Management Slide 5 of 25 Process (cont.) the operating system creates and deletes user and system processes a process is active while a program is passive the operating system keeps track of processes using a process table

6 Operating Systems Process Control Management Slide 6 of 25 Process State Diagram new ready running terminated blocked admitted Interrupt / time out exit I/O or event wait I/O or event completion scheduler dispatch

7 Operating Systems Process Control Management Slide 7 of 25 Process States as a program executes, it changes states New - a process has just been created Reasons for process creation - new batch job - interactive logon a NEW process now becomes READY Ready - the process is waiting to be assigned to a processor

8 Operating Systems Process Control Management Slide 8 of 25 Process States (cont.) READY - RUNNING - instructions are being executed - a process is using the CPU - the number of running processes will depend on the number of processors the computer has A running process now can become BLOCKED, READY or TERMINATED A RUNNING process becomes BLOCKED when : -the process itself cannot execute because it is waiting for an I/O operation to complete - the process is waiting for some external event to happen

9 Operating Systems Process Control Management Slide 9 of 25 Process States (cont.) From BLOCKED the process then becomes READY when: - an event which the process was waiting for occurs A RUNNING process becomes READY when: - a process has reached its maximum allowable time for uninterrupted execution

10 Operating Systems Process Control Management Slide 10 of 25 Process States (cont.) From RUNNING the process then TERMINATES when: - a process has completed - a process has been aborted Reasons for process termination - normal completion - invalid instruction - memory unavailable Control is then returned to the operating system

11 Operating Systems Process Control Management Slide 11 of 25 Quick Review Questions For each of the following transitions between process states indicate whether the transition is possible or not possible? ready running ready new blocked ready On a system with n number of CPU’s what is the minimum number of processes that can be in the ready, running and blocked state?

12 Operating Systems Process Control Management Slide 12 of 25 Process Control Block (PCB) Each process is represented in the operating system as a process control block (PCB) a PCB: - keeps track of each process - contains information associated with a specific process - serves as a repository of any information that may vary from process to process

13 Operating Systems Process Control Management Slide 13 of 25 Process Control Block Diagram Pointer to parent process Pointer area to child process Process state Program counter Register save area Memory limits Priority information Accounting information Pointer to files and other I/O resources

14 Operating Systems Process Control Management Slide 14 of 25 Process Control Block Process state – the process states; ready, running, blocked, terminated Program counter – indicates the location for the next instruction Priority information - CPU scheduling information Accounting information – statistics on CPU time, job and process numbers I/O status – list of I/O devices which are allocated to processes

15 Operating Systems Process Control Management Slide 15 of 25 Process Scheduling As processes enter the system, they are put on the job queue A new process is put on the ready queue The process waits until it is selected for execution or dispatched and given CPU resources Once CPU is allocated the process then runs: - the process could issue an I/O request and be placed on a device queue or I/O queue - the process could create a new sub-process - the process could be forcibly removed

16 Operating Systems Process Control Management Slide 16 of 25 Process Scheduling Diagram

17 Operating Systems Process Control Management Slide 17 of 25 Quick Review Questions What is a process control block?

18 Operating Systems Process Control Management Slide 18 of 25 Summary of Main Teaching Points A process is a unit of work in execution which requires resources. The state of a process changes as it executes. A process control block represents a process in the operating system. Processes can execute concurrently or independently from each other.

19 Operating Systems Process Control Management Slide 19 of 25 Q & A Question and Answer Session

20 Operating Systems Process Control Management Slide 20 of 25 CPU Scheduling Next Session


Download ppt "Process Control Management Prepared by: Dhason Operating Systems."

Similar presentations


Ads by Google