Operating System Fundamentals


Case Study Priority Does Not Mean Importance



Download 2.34 Mb.
View original pdf
Page35/66
Date06.03.2023
Size2.34 Mb.
#60834
1   ...   31   32   33   34   35   36   37   38   ...   66
OperatingSystemFundamentals
best answers from c, Lesson 2 C# Windows Forms
Case Study Priority Does Not Mean Importance
A nuclear power plant produces power by having a nuclear reaction heat up water which generates steam and the steam is used to turn a turbine. To slowdown the reaction the plant can insert control rods into the reactor. If the reactor gets too hot, you might cause a nuclear meltdown (you do not want this to happen. Putting in the control rods is usually done by a robot and takes a certain amount of time. Suppose there is a sensor on the reactor that notifies a controlling computer when the temperature gets too hot. Also let us pretend that the computer program to move the control rods into place takes 30 seconds to complete, but if you do not get the task done in 60 seconds there is a meltdown. Meanwhile, inside the break room at the power plant is a coffeemaker. The coffeemaker has a sensor which can detect when the pot is about to overflow, and it sends a signal to a computer program which is responsible for switching off the pot. It takes one second for the computer to switch off the pot, but if you do not switch it off within five seconds the pot will overflow. Due to cost cutting, the owner of the nuclear power plant has decided to buy only one computer to control both the reactor rods and the coffeepot You of course have two processes running,

Operating System Fundamentals
50 one for the coffee and the other for the reactor. Which process should have the higher priority We will assume that both alarms happen at the same time.
Scenario One The Control Rods get Higher Priority
This makes sense because preventing a meltdown is a lot more important
1. Times. Both alarms trigger. Control rod robot activated, ignoring coffeepot. Times. Coffeepot starts overflowing.
3. Times. Control rods in place. Lots of water on the floor. Coffeepot is instructed to switch off.
4. Times. Coffeepot is off. Is this a good solution The plant did not meltdown, therefore this is good. The coffeepot overflowed which means there is a mess in the break room, but we only need a mop.

Download 2.34 Mb.

Share with your friends:
1   ...   31   32   33   34   35   36   37   38   ...   66




The database is protected by copyright ©ininet.org 2024
send message

    Main page