0

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?

Midge_Mong
  • 33
  • 2
  • 8
  • SO is for computer programming questions, not questions about the design of operating systems. Maybe cs.stackexchange.com would be more appropriate. – Barmar Dec 04 '17 at 16:42
  • I figured out the answer, linux does not allow for processes with memory contention. – Midge_Mong Dec 04 '17 at 16:51
  • The question seems to be more general than just Linux. – Barmar Dec 04 '17 at 16:55
  • could be more general than linux, but it was just required that I know that linux doesn't allow that – Midge_Mong Dec 05 '17 at 17:19
  • Either way, it's off-topic here. Questions about the design of Unix might be more appropriate on unix.stackexchange.com. Although it's more targeted towards users, not minutiae about kernel design. – Barmar Dec 05 '17 at 17:55

0 Answers0