1 / 35

PROCESS MANAGEMENT

PROCESS MANAGEMENT. Tuğba AĞCAOĞLU & Ahmet GÖKNAR. OUTLINE. What is the Process Management? What is it covers? process state process table, process scheduling. Process State Process Table(process control block) process state memory state resource state Process Scheduling.

marly
Download Presentation

PROCESS 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. PROCESS MANAGEMENT Tuğba AĞCAOĞLU & Ahmet GÖKNAR

  2. OUTLINE • What is the Process Management? What is it covers? • process state • process table, • process scheduling

  3. Process State • Process Table(process control block) • process state • memory state • resource 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. What is Process Management? • Operating system's way of dealing with running multiple processes. • Computing anddistributing "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 blocksmust 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, runnable, 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. Process Queues cpu ready queue i/o I/O queue I/O request time slice expires child executes join fork a child wait queue resource queue resource request

  18. Multiprogramming Process SCHEDULERS: 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 • 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. Newly arriving jobs Ready Queue Blocked Running Long-term Scheduler Short-term Scheduler SCHEDULERS

  22. Partially-executed swapped-out processes Ready Queue CPU I/O waiting queues I/O Medium-term Scheduling end

  23. 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. Scheduling Criteria • CPU utilization • Throughput • Turnaround time • Waiting time • Response time • Fairness

  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. Scheduling Policies Non-Preemptive Scheduling: • Once a process begins execution, it occupies CPU until it finishes or it blocks • Simplicity • Creates problems

  27. SCHEDULING ALGORITHMS • First-Come-First-Served or FIFO Scheduling • Shortest-Job-first Scheduling • Priority Scheduling • Round-Robin Scheduling

  28. FCFS Scheduling • First process will be served by CPU • Non-preemptive • Waiting time is quite long • Example

  29. FCFS Scheduling Process CPU Burst Time (ms) P1 24 P2 3 P3 3 P1 P2 P3 0 24 27 30 Waiting time for P1 = 0; P2 = 24; P3 = 27 Ave. waiting time: (0 + 24 + 27) /3 = 17 ms.

  30. P2 P1 P3 0 3 6 30 FCFS Scheduling 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. Shortest-Job-First Scheduling • Selects the shortest job first • Enqueue jobs in order of estimated completion time • It is non-preemptive

  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. 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

  34. RESOURCES • 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.htm • http://www.bilgiyonetimi.org/cm/pages/mkl_gos.php?nt=131 • http://gaia.ecs.csus.edu/~zhangd/oscal/pscheduling.html

More Related