[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Operating System :: Process Management - Discussion

Home > Operating System > Process Management > MCQs Questions Discussion

18 / 41

Choose the correct option.

Shortest Job First executes first the job

Awith the least processor needs

Bthat first entered the queue

Cthat has been in the queue for the longest

Dthat last entered the queue

Answer: Option (Login/Signup)

Show Explanation

Shortest Job First(SJF) scheduling: The basic principle of SJF algorithm is to allocate the CPU to the process with least CPU burst time. The processes are available in the ready queue. CPU is always assigned to the process with least CPU burst time requirements.

Example-

ProcessCPU burst time
P15
P210
P38
P43

Since, the process with smallest CPU burst time is executed first, so these processes would be scheduled in P4 --> P1 --> P3 --> P2 order. SO, average waiting time = (0+3+8+16) / 4 = 6.75 ms.

SJF is an optimal algorithm since this algorithm gives minimum average waiting rime.


Asked In :: Cisco Societe Generale

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here