“Applications are operating system independent” – state whether you agree or
disagree with the statement, with proper justification. Does the shortest job first
scheduling algorithm always give optimal (minimum average waiting time) result in
reality? Give your answer with proper justification.
Answers
Explanation:
Associate with each process the length of its next CPU burst. Use these lengths to schedule the process with the shortest time.
Two schemes:
a) non-preemptive - once CPU given to the process it cannot be preempted until it completes its CPU burst.
b) preemptive - if a new process arrives with CPU burst length less than remaining time of current executing process, preempt. This scheme is known as the Shortest-Remaining Time-First (SRTF).
SJF is optimal - gives minimum average waiting time for a given set of processes
I disagree with the statement
“Applications are operating system independent”. Applications are dependent upon the underlying operating system for such basic services as input and output, timing, memory management, process management, event response, etc. Try executing Microsoft EXCEL or Microsoft PowerPoint on a Mac OS X operating system.
And If applications were operating system independent then no one would care if their phone was an iPhone, Android, or Windows phone since you could just run all apps on all phones.
Of course, shortest job first doesn’t always give optimal result as a long job could go hours or weeks without getting done in a system with limited resources.