Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(1) What is the primary problem in FIFO page replacement algorithm? (2) Although

ID: 3721047 • Letter: #

Question

(1) What is the primary problem in FIFO page replacement algorithm? (2) Although paging eliminates external memory fragmentation, it causes another problem. What is it? (3) What is the primary (most essential) advantage in "virtual memory"? 4) Although the contiguous space allocation scheme has a couple of major problems, i is still popularly used in many operating systems today. Mention two (essentially different) examples for the use of contiguous allocation. (5) Between any two processes, if a shared memory, accessible by a pointer, is the only shared resource, deadlock will not happen (i.e., accessing a shared memory by pointers usually does not cause a deadlock). This means that at least one (but potentially some, all) of the four necessary conditions of deadlock never happens. Which of the following condition(s) does (do) not happen? Select all that apply. (a) Mutual exclusion (b) No preemption (c) Hold and wait (d) Circular wait (f) None of the above

Explanation / Answer

1) FIFO page replacement has Belady's anamoly problem. Frames used to accomodate pages.If we increase frames while using FIFO algorithm fro page replacement page faults also increased.

2)Paging reduces external fragmentation.But still it suffers with internal fragmentaton.Internal fragmentation wasted space present in each allocated block.

3) i)Allocating memory is easy and also cheap.

ii) It solves the external fragmentation problem.

4) Contiguous memory allocation doesn't need calculation of overhead address translation while executing.

ii) Process that uses contiguous memory allocation for execution is executes faster.

5) Deadlock exists if and only if 4 conditions.i.e,a)Mututal exclusion b) No preemption c)Hold and wait d) circular wait holds simultaneously.

Mututal Exclusion: not satisfying this condition atleast one resource present in non sharable mode.But,here only one process is present which is in shared mode

Hold and wait: This condition never holds because only one shared resource is present.so, process are not to wait for any other resources. this situation made deadlock not occur

No preemption:This condition holds

Circular wait:This condition not hold because process is not waiting for p2 to complete and process p2 is not wait for completion of process p1.Those are sharing only resource