1 / 20

Process Control Management

Operating Systems. Process Control Management. Prepared by: Dhason. Topic & Structure of the lesson. Process Process States Process Scheduling. Learning Outcomes. At the end of this lecture YOU should be able to: - define the term process - identify process states

scroggs
Télécharger la présentation

Process Control Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Operating Systems Process Control Management Prepared by: Dhason

  2. Topic & Structure of the lesson • Process • Process States • Process Scheduling

  3. 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. 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. 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. Process State Diagram terminated new exit admitted Interrupt / time out ready running scheduler dispatch I/O or event wait I/O or event completion blocked

  7. 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. 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. 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. 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. 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. 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. Process Control Block Diagram

  14. 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. 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. Process Scheduling Diagram

  17. Quick Review Questions • What is a process control block?

  18. 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. Question and Answer Session Q & A

  20. Next Session CPU Scheduling

More Related