JavaScript is required

Cho thuật toán điều phối FIFO, với bảng sau

Cho thuật toán điều phối FIFO, với bảng sau Thời gian chờ của tất cả các tiến trình là: (ảnh 1)

Thời gian chờ của tất cả các tiến trình là:

A.

24s

B.

25s

C.

27s

D.
30s
Trả lời:

Đáp án đúng: B


The FIFO (First-In, First-Out) algorithm executes processes in the order they arrive. P1 arrives at 0, waits 0. P2 arrives at 2, P1 finishes at 10, waits 8. P3 arrives at 3, P1 finishes at 10, P2 finishes at 17, waits 14. P4 arrives at 5, P1 finishes at 10, P2 finishes at 17, P3 finishes at 22, waits 17. P5 arrives at 9, P1 finishes at 10, P2 finishes at 17, P3 finishes at 22, P4 finishes at 27, waits 18. Total wait time: 0 + 8 + 14 + 17 + 18 = 57. None of the given options match this calculation.

Câu hỏi liên quan