Nonpreemptive scheduling policy: a job scheduling strategy that functions without external interrupts so that once a job captures the processor and begins execution, it remains in the running state uninterrupted until it issues an I/O request or it’s finished.
Preemptive scheduling policy: any process scheduling strategy that, based on predetermined policies, interrupts the processing of a job and transfers the CPU to another job. It is widely used in time-sharing environments.
Nonpreemptive scheduling policy includes the following process scheduling schemes:
- First Come First Serve (FCFS)
- Shortest Job Next (SJN)
- Priority scheduling
- Shortest Remaining Time (SRT)
- Round Robin
- Round Robin with Priority
Process Control Block (PCB) components
- Process identification (PID)
- Unique
- Process status
- Status (HOLD, READY, RUNNING, WAITING)
- Process state
- Process status word register contents, main memory info (segment table, page table), resources (files), process priority
- Accounting
- Billing and performance measurements
- CPU time, total time, memory occupancy, I/O operations, number of input records read, etc.
Interrupts usually temporarily suspend execution of a process
The following figure shows the queuing paths from HOLD to FINISHED process states.
Good process scheduling policy criteria are
- Maximise throughput: Run as many jobs as possible
- Minimise response time: Quickly handle interactive requests
- Minimise turnaround time: Move job through system quickly
- Minimise waiting time: Move job out of READY queue quickly
- Maximise CPU efficiency: Keep CPU busy 100 percent of time
- Ensure fairness for all jobs: Give every job equal CPU and I/O time
- McHoes, A., & Flynn, I.M. (2008). Understanding operating systems (5th ed.). CENGAGE Learning.
- Melbourne Institute of Technology (Semester 1, 2012). BN104 Operating Systems Lecture Notes.
No comments:
Post a Comment