



























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A lecture note from University of Bedfordshire covering the topic of process management in operating systems. It includes an introduction to the concept of a process, process status, process control block, multithreading, and process scheduling policies and algorithms. The document also discusses various scheduling algorithms such as First-Come-First-Served (FCFS), Shortest Job First (SJF), and Round Robin.
Typology: Exercises
1 / 35
This page cannot be seen from the preview
Don't miss anything!




























Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling Process status Process control block Multithreading Process scheduling policies Process scheduling algorithms summary
Operating Systems
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction 4 Scheduling Process status Process control block Multithreading Process scheduling policies Process scheduling algorithms summary
Operating Systems
Terminology Job (also known as program) is an inactive unit such as a file in disk This entity contains at least two types of elements: program code and a set of data Process (also called task) is an executed program code on the processor, that is, a part of an active entity a Thread is a portion of a process that can be run independently (^) In multiprogramming environment, the processor is used by multiple programs/processes (^) Process manager needs to arrange the execution of the programs/processes (to make a schedule for them) to promote the most efficient use of resources (including hardware and software) and to avoid competition and deadlock
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling 5 Process status Process control block Multithreading Process scheduling policies Process scheduling algorithms summary
Operating Systems
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling 7 Process status Process control block Multithreading Process scheduling policies Process scheduling algorithms summary
Operating Systems
(^) IO-Bound jobs e.g. printing a series of documents. Many brief CPU cycles and long IO cycles. (^) CPU-Bound jobs e.g. finding the first 300 prime numbers. Long CPU cycles and shorter IO cycles. Total statistical effect approximates a Poisson distribution.
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling Process status 8 Process control block Multithreading Process scheduling policies Process scheduling algorithms summary
Operating Systems
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling Process status 10 Process control block Multithreading Process scheduling policies Process scheduling algorithms summary
Operating Systems
States (^) Running: the process is currently executed on the processor Ready: a process is prepared to execute (^) Waiting: a process waits for resources Hold: a process is just created (^) Exit: a process is released from pool of executable programs by OS
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling Process status 11 Process control block Multithreading Process scheduling policies Process scheduling algorithms summary
Operating Systems
1 HOLD to READY: When OS is prepared to take an additional process. Initiated by job scheduler; availability of memory and devices checked. 2 READY to RUNNING: Process scheduler chooses a ready process to execute. 3 RUNNING to EXIT: Currently executed process has completed or a run time error. Initiated by job or process scheduler. 4 RUNNING to WAIT: (^) Handled by process scheduler, initiated by job instruction for I/O or other resources request. 5 WAIT to READY: Handled by process scheduler, initiated when I/O or other resources become available. 6 RUNNING to READY: Handled by process scheduler; maximum allowable time is reached or other criterion e.g. a priority interrupt.
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling Process status Process control block 13 Multithreading Process scheduling policies Process scheduling algorithms summary
Operating Systems
Process control block (PCB): Any process is uniquely characterised by a list of elements: Identifier: a unique identifier which distinguishes a process from others State: a process can have different states (^) Priority: this shows the priority level of a process relative to other process (^) Program counter: the address of the instruction to be executed next of a process (program code) (^) Memory pointers: include those point to program code and data associated of a process, plus any memory blocks shared with other processes (^) Context data: These are date that are presented in registers in the processor while a process is running (^) I/O status information: includes I/O requests and the availability of files and I/O devices Accounting information: includes time and number countered
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling Process status Process control block 14 Multithreading Process scheduling policies Process scheduling algorithms summary
Operating Systems
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling Process status Process control block Multithreading^16 Process scheduling policies Process scheduling algorithms summary
Operating Systems
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling Process status Process control block Multithreading^17 Process scheduling policies Process scheduling algorithms summary
Operating Systems
Multithreading
A process can be divided into multiple threads (^) Multithreading is a “condition” for a processor manager to make a schedule for multi-processes (^) An example of a process and threads
Get input for Job A (^) Identify resources Execute the process (^) Interrupt Switch to Job B Get input for Job B (^) Identify resources Execute the process (^) Terminate Job B Switch back to Job A (^) Resume executing interrupted process (^) Terminate Job A
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling Process status Process control block Multithreading Process scheduling 19 policies Process scheduling algorithms summary
Operating Systems
Maximise throughput - run as many jobs as possible in a given amount of time Minimise reponse time - quickly turn around interactive requests Minimise turnaround time - move entire jobs in and out of the system quickly (^) Minimise waiting time - move jobs out of the ready queue as quickly as possible (^) Maximise CPU efficiency - keep the CPU busy 100% of the time (^) Ensure fairness for all jobs - give every job an equal amount of CPU and IO time
Lecture #6 Process Management David Goodwin University of Bedfordshire
Introduction Scheduling Process status Process control block Multithreading Process scheduling policies Process scheduling 20 algorithms summary
Operating Systems