An SJF algorithm is simply a priority algorithm where the priority is the inverse of the (predicted) next CPU burst. That is, the longer the CPU burst, the lower the priority and vice versa.
Priority can be defined either internally or externally. Internally defined priorities use some measurable quantities or qualities to compute priority of a process.
Examples of Internal priorities are
Time limits.
Memory requirements.
File requirements. For example, number of open files.
CPU Vs I/O requirements.
Externally defined priorities are set by criteria that are external to operating system such as
The importance of process.
Type or amount of funds being paid for computer use.
The department sponsoring the work.
Politics.
Priority scheduling can be either pre-emptive or non pre-emptive
- A preemptive priority algorithm will pre-emptive the CPU if the priority of the newly arrival process is higher than the priority of the currently running process.
- A non-preemptive priority algorithm will simply put the new process at the head of the ready queue.
Disediakan Oleh: Che Nurlailatul Ashikin
No comments:
Post a Comment