• Home
  • Queen's University
  • Operating Systems
  • Memory Storage and Synchronization in Operating Systems

Memory Storage and Synchronization in Operating Systems

Question 1: ( 5 Marks ) Why is main memory not suitable for permanent program storage or backup purposes? Furthermore, what is the main disadvantage to storing information on a magnetic disk drive as opposed to main memory? Answer: 1.Storage devices or hard disk drivers, or solid state storage like a flash drive or an SSD are persistent, but slower than RAM in general, some old RAM can be slower than modern high performance SSDs, but beware of the 10-15 year difference in age. 2. Main memory is volatile, software is not ready for it, it has to be connected to power, the main disadvantage is it is slower than RAM in common. Question 2: ( 5 Marks ) Describe the dining-philosophers problem and how it relates to operating systems. Answer: the dining-philosophers is a representation of synchronization, starvation and deadlock situations. The dining philosophers problem states that there are 5 philosophers sharing a circular table and they eat and think alternatively. There is a bowl of rice for each of the philosophers and 5 chopsticks. A philosopher needs both their right and left chopstick to eat. A hungry philosopher may only eat if there are both chopsticks available. Otherwise a philosopher puts down their chopstick and begin thinking again. It relates to the OS because it helps to avoid deadlock, and the problem illustrates a number of computers competing for access to tape drive peripherals.