Download presentation
Presentation is loading. Please wait.
2
OUTLINE What is the Process Management? What is it covers? pprocess state pprocess table, pprocess scheduling
3
Process State Process Table(process control block) pp rocess state mm emory state rr esource state Process Scheduling
4
What is Multiprogramming Process Conclusion ; Process Management
5
What is Process Management? Ever action run inside a process. In computer science, a process is an application in execution.
6
Operating system's way of dealing with running multiple processes. Computing and distributing "timeshares".
7
Process State When a process is using the CPU, it is actually running and doing some work. If a process does I/O,the device is not ready or just slow
8
The process states and transitions are;
9
Process table The suspended process to be restarted at a later time as if it had never been stopped The O/S maintains information about each process in a process table
10
Process table Process control blocks must contain information about process state memory state resource state
11
Process State The process state must contain all the information the value of each register the program counter the stack pointer
12
The process is in runnning, runnning, runnable, runnable, blocked blocked
13
Memory state Details of the memory allocation such as pointers to the various memory areas used by the program
14
Resource state Information regarding the status of files being used by the process such as user ID
15
MULTI- PROGRAMMING
16
Process Scheduling Processes are put into a job queue They are kept in a list called ready queue The ready queue is generally stored as a link list Process waiting for a particular device are placed in a I/O queue
17
17 Process Queues cpu ready queue I/O queuei/oI/O request time slice expires fork a child resource request resource queue wait queue child executes join
18
Multiprogramming ProcessSCHEDULERS: Two types of scheduler: – Long-term schedulers (Job scheduler) – Short-term scheduler (CPU scheduler)
19
Multiprogramming Process The short-term scheduler: selects from among the processes that are ready to execute and allocates the CPU to one of them selects from among the processes that are ready to execute and allocates the CPU to one of them must select a new process for the CPU frequently must be very fast.
20
Multiprogramming Process The long-term scheduler : selects processes from a batch system and loads them into memory for execution executes less frequently
21
21 SCHEDULERS Blocked Newly arriving jobs Ready Queue Running Long-term Scheduler Short-term Scheduler
22
22 Medium-term Scheduling Medium-term Scheduling Partially-executed swapped-out processes CPUReady Queue I/O I/O waiting queues end
23
23 The CPU Scheduler The CPU Scheduler CPU scheduling decisions take place when a process: (i)switches from running to waiting state (ii)switches from running to ready state (iii)switches from waiting to ready (iv)terminates.
24
24 Scheduling Criteria CPU utilization Throughput Turnaround time Waiting time Response time Fairness
25
25 Scheduling Policies Preemptive Scheduling: A process switched back and forth between running and ready state More efficient, better capabilities More complex and needs hardware support
26
26 Scheduling Policies Non-Preemptive Scheduling: Once a process begins execution, it occupies CPU until it finishes or it blocks Simplicity Creates problems
27
27 SCHEDULING ALGORITHMS First-Come-First-Served or FIFO Scheduling Shortest-Job-first Scheduling Priority Scheduling Round-Robin Scheduling
28
28 FCFS Scheduling First process will be served by CPU Non-preemptive Waiting time is quite long EEEE xxxx aaaa mmmm pppp llll eeee
29
29 FCFS Scheduling ProcessCPU Burst Time (ms) P124 P23 P33 P1P2P3 0 24 27 30 Waiting time for P1 = 0; P2 = 24; P3 = 27 Ave. waiting time: (0 + 24 + 27) /3 = 17 ms.
30
30 FCFS Scheduling FCFS Scheduling P1P2 P3 0 3 6 30 Waiting time for P1 = 6; P2 = 0; P3 = 3 Ave. waiting time : (6 + 0 + 3)/3 = 3 Much better than the previous case, where we had a Convoy Effect: short process behind long process. Results in lower CPU utilization
31
31 Shortest-Job-First Scheduling Selects the shortest job first Enqueue jobs in order of estimated completion time It is non-preemptive
32
32 Priority Scheduling Assign a priority to each job and schedule jobs in order of priority Typically low priority values = “High Priority” Increasing priority means decrease its priority value It can be both preemptive or non-preemptive Equal priority processes are scheduled in FCFS order
33
33 Round-Robin Scheduling Designed for time-sharing systems Preemptive Each process gets a small unit of CPU time usually 10-100 milliseconds After that time the process preempted and added to the end of the ready queue
35
RESOURCES http://computing- dictionary.thefreedictionary.com/process+table http://computing- dictionary.thefreedictionary.com/process+table http://en.wikipedia.org/wiki/Process_management http://jan.netcomp.monash.edu.au/OS/l8_2.html http://www.cs.jhu.edu/~yairamir/cs418/os2/sld007.ht m http://www.cs.jhu.edu/~yairamir/cs418/os2/sld007.ht m http://www.bilgiyonetimi.org/cm/pages/mkl_gos.php? nt=131 http://www.bilgiyonetimi.org/cm/pages/mkl_gos.php? nt=131 http://gaia.ecs.csus.edu/~zhangd/oscal/pschedul ing.html http://gaia.ecs.csus.edu/~zhangd/oscal/pschedul ing.html
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.