TAILIEUCHUNG - Operating System Concepts ppt (6)

Chapter 6: CPU SchedulingBasic Evaluation. Silberschatz, Galvin and Gagne 2002 Basic ConceptsMaximum CPU utilization obtained –I/O Burst Cycle – Process execution consists of of CPU execution and I/O waitCPU burst distribution. Silberschatz, Galvin and Gagne 2002Alternating Sequence of CPU And I/O Bursts. Silberschatz, Galvin and Gagne 2002Histogram of CPU-burst Times. Silberschatz, Galvin and Gagne 2002 CPU SchedulerSelects from among the processes in memory that to execute, and allocates the CPU to one of themCPU scheduling decisions may take place when . Switches from running to waiting state2. Switches from running to ready state3. Switches from waiting to ready4. TerminatesScheduling under 1 and 4 is nonpreemptiveAll other scheduling is preemptive Silberschatz, Galvin and Gagne 2002 DispatcherDispatcher module gives control of the CPU to selected by the short-term scheduler; :. switching context. switching to user mode. jumping to the proper location in the user program to restart. that latency – time it takes for the dispatcher to process and start another running Silberschatz, Galvin and Gagne 2002 Scheduling utilization – keep the CPU as busy as – # of processes that complete per time time – amount of time to execute a time – amount of time a process has in the ready time – amount of time it takes from when was submitted until the first response , not output (for time-sharing environment). Silberschatz, Galvin and Gagne 2002 Optimization CriteriaMax CPU turnaround waiting response time. Silberschatz, Galvin and Gagne 2002First-Come, First-Served (FCFS) Scheduling. Process Burst Time. P1 24. P2 3. P3 that the processes arrive in the order: P1 , P2 , Gantt Chart for the schedule is:. P1 P2 P3. 0 24 27 time for P1 = 0; P2 = 24; P3 = waiting time: (0 + 24 + 27)/3 = 17. Silberschatz, Galvin and Gagne 2002 FCFS Scheduling (Cont.)Suppose that the processes arrive in the order. P2 , P3 , P1 The Gantt chart for the schedule is:. P2 P3 P1. 0 3 6 30 Waiting time for P1 = 6; P2 = 0; P3 = 3. Average waiting time: (6 + 0 + 3)/3 = 3. Much better than previous case Convoy effect short process behind long process. Silberschatz, Galvin and Gagne 2002Shortest-Job-First (SJR) SchedulingAssociate with each process the length of its next . Use these lengths to schedule the process shortest timeTwo schemes:. nonpreemptive – once CPU given to the process it cannot. be preempted until completes its CPU burst preemptive – if a new process arrives with CPU burst length. less than remaining time of current executing process,. preempt. This scheme is know as the. Shortest-Remai

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.