Deadlock and starvation hypothetical scenario

118 views Asked by At

Q - If a system was running low on memory, jobs are often moved to disk in Linux when the system considers memory to be low. (ie. swapped) Can an OS that behaves in this fashion have processes that deadlock with main memory contention? Could a process be starved? Discuss

My attempted answer (incorrect)

Yes, main memory is a reusable resource. If there were 3 processes A B and C all competing for main memory. Any one of those has the potential to be overlooked each time a new spot in main memory is allocated. Starvation.

Also, there is potential for deadlock if the 4 conditions for deadlock are met with different processes competing for main memory. (circular wait, failed mutual exclusion, hold and wait, no preemption)

My answer was incorrect, I got half credit, but no correction on what I was mistaken on. Would someone be able to give a full complete answer for both parts of the question so that I may see my mistake?

0

There are 0 answers