edited by
2,144 views
0 votes
0 votes

There are 5 processes in a job queue

Process Memory Required Time
P1 600kb 10 ms
P2 1000kb 5 ms
P3 300kb 20 ms
P4 700kb  8 ms
P5 500kb 15 ms

Memory is byte addressable

If the size of the memory is 2000 kb and contiguous memory allocation is used, then after 30 ms, which processes will be in memory?

(A) P4,P5 only

(B) P1, P2 only

(C) P3, P4 only

(D) None of these

edited by

1 Answer

Best answer
3 votes
3 votes

Answer will be D) None of these

Time 0 Ms : Schedule P1, P2, P3 (Memory still you have 100 KB)

Time 5 Ms : P2 Get completed then you will have memory (1100 KB), Now you can schedule P4, (memory still you have is 400 KB)

Time 10 Ms: P1 get completed the you will have memory (1000 KB), Now you can schedule P5.

Time 13 Ms: P4 will get completed.

Time 20 Ms: P3 will get completed.

Time 25Ms: P5 will get completed.

Time 30Ms: No processor is in the memory.

selected by

Related questions

0 votes
0 votes
2 answers
1
HeadShot asked Nov 6, 2018
1,387 views
Why option A is wrong ?It is contiguous allocation policy hence suffers fragmentation.
1 votes
1 votes
1 answer
2
1 votes
1 votes
2 answers
4
kapilbk1996 asked Jul 28, 2018
2,519 views
"Linked allocation of files on a disk space can lead to internal fragmentation"Is this statement true or false? Justify your answer.