{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

05_CPU_Scheduling_I_2spp

05_CPU_Scheduling_I_2spp - CSC 4103 Operating Systems Fall...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC 4103 - Operating Systems Fall 2009 Tevfik Ko ! ar Louisiana State University September 10th, 2009 Lecture - V CPU Scheduling - I 2 Roadmap CPU Scheduling Basic Concepts Scheduling Criteria & Metrics Different Scheduling Algorithms • FCFS • SJF • Priority • RR
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3 Basic Concepts Multiprogramming is needed for efficient CPU utilization CPU Scheduling: deciding which processes to execute when Process execution begins with a CPU burst , followed by an I/O burst CPU–I/O Burst Cycle – Process execution consists of a cycle of CPU execution and I/O wait 4 Alternating Sequence of CPU And I/O Bursts
Image of page 2
5 Histogram of CPU-burst Durations 6 Process State As a process executes, it changes state new : The process is being created ready : The process is waiting to be assigned to a process running : Instructions are being executed waiting : The process is waiting for some event to occur terminated : The process has finished execution
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
7 CPU Scheduler Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them ! short-term scheduler CPU scheduling decisions may take place when a process: 1. Switches from running to waiting state 2. Switches from running to ready state 3. Switches from waiting to ready 4. Terminates Scheduling under 1 and 4 is nonpreemptive/cooperative Once a process gets the CPU, keeps it until termination/switching to waiting state/release of the CPU All other scheduling is preemptive Most OS use this Cost associated with access to shared data i.e. time quota expires 8 Dispatcher Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; Its function involves: switching context switching to user mode jumping to the proper location in the user program to restart that program Dispatch latency – time it takes for the dispatcher to stop one process and start another running
Image of page 4
9 Scheduling Criteria CPU utilization – keep the CPU as busy as possible --> maximize Throughput – # of processes that complete their execution per time unit --> maximize Turnaround time
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern