Scheduling2016 (1) - BITS Pilani Pilani Campus Operating...

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

BITS Pilani, Pilani Campus Operating Systems Prof J P Misra BITS, Pilani Process Scheduling
Image of page 1

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

BITS Pilani, Pilani Campus Operating Systems 2 Scheduling Processes in different state maintain Queue. The different queues are maintained for different purpose Ready Queue : Processes waiting for CPU Blocked : processes waiting for I/O to complete Transition form a state where queue is maintained to next state involves decision making such as When to move process from one state to another Which process to move When transitions occur, OS may be required to carry out some house keeping activity such as context switch, Mode switch etc. These activities are considered as overhead and must be carried out in efficient manner.
Image of page 2
BITS Pilani, Pilani Campus Operating Systems 3 What is Scheduling ? Scheduling is To manage queues to minimize queuing delay to optimize performance in queuing environment Scheduling determines which process will wait and which will progress
Image of page 3

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

BITS Pilani, Pilani Campus Operating Systems 4 Types of Scheduling (Based on frequency of invocation of scheduler) Long Term Scheduling Decision to add to the pool of processes to be executed Mid Term Scheduler The decision to add to the number of processes that are partially or fully in main memory Short Term Scheduler Which process will execute on processor I/O Scheduling Which process’s pending I/O request is handled by an available I/O device.
Image of page 4
BITS Pilani, Pilani Campus Operating Systems 5
Image of page 5

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

BITS Pilani, Pilani Campus Operating Systems 6
Image of page 6
BITS Pilani, Pilani Campus Operating Systems 7 Long-Term Scheduling Long-Term Scheduling Long-term scheduler is invoked very infrequently (seconds, minutes) ( may be slow ). Invoked to move a new process to ready or ready suspend queue Determines which programs are admitted to the system for processing Controls the degree of multiprogramming 2 decisions involved in Long term Scheduling OS can take one or more additional processes Which job or jobs to accept and turn into processes.
Image of page 7

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

BITS Pilani, Pilani Campus Operating Systems 8 Long-term Scheduling More processes=> smaller percentage of time each process is executed Processes can be described as either: I/O- bound process – spends more time doing I/O than computations; very short CPU bursts. CPU- bound process – spends more time doing computations; very long CPU bursts. The long term scheduler must select a good process mix of I/O bound and CPU bound processes
Image of page 8
BITS Pilani, Pilani Campus Operating Systems 9 Medium-Term Scheduling Medium-Term Scheduling Part of the swapping function Based on the need to manage the degree of multiprogramming Done to free up some memory when required Invoked to move a process from ready suspend to ready or block to block suspend and vice-versa
Image of page 9

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

BITS Pilani, Pilani Campus Operating Systems 10 Short-Term Scheduling Short-Term Scheduling Known as the dispatcher
Image of page 10
Image of page 11
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