Question: how to solve sjf problem?
Answer: Step 1) At time= 1, Process P3 arrives. ...  Step 2) At time =2, process P1 arrives and is added to the waiting queue. ...  Step 3) At time = 3, process P4 will finish its execution. ...  Step 4) At time = 4, process P5 arrives and is added to the waiting queue.