Course Title : Real Time Operating Systems
Assignment Questions
QB1. Define least laxity (slack) first algorithm and explain with the following example
suppose that we have a set of 3 jobs. Release times ri , deadlines Di , and execution times Ci
are as follows:
• J1: r1 = 0, D1 = 33, C1 = 10
• J2: r2 = 4, D2 = 28, C2 = 3
• J3: r3 = 5, D3 = 29, C3 = 10
Generate a graphical representation of schedules for this task set, using Least Laxity (LL)
scheduling algorithms! For LL scheduling, indicate laxities for all tasks at all context
switch times. Will any task miss its deadline?
QB2. a) What is the makespan (maximum flow) and utilization of the following set of 5 tasks
T(e,d): T1(1,5),T2(4,13),T3(2,15), T4(2,22) and T5(2,21)
b) Compute the hyperperiod of the following set of 3 tasks T(e,p):T1(4,5), T2(3,10) and
T3(7,15).
QB3. Consider a system which displays the vacant car parking slots at the Main entry and at
entry of each floor. As the car is parked the display number increases and decreases at exit in
each floor and also at main entry. If the parking is full, the bar doors should be closed otherwise
are open. Considering Multi-Floor parking, design the system using Raspberry Pi board
mentioning the required sensors and actuators. Also mention the work/task flow of
jobs/functions of the system. 5M
Considering a 3 level parking system.
The following are the system requirements:
Raspberry pi board
Power supply
Entry sensors for each floor
Exit sensors for each floor
4 LCD displays(output)
DC motors or each floor (actuator)
Block Diagram:
Task Flowchart:
QB4. Design a real time system to make an office as smart office. As an embedded designer
you need to formulate a model for the same. Identify what type of a system model should be
used. List out the critical tasks and non-critical tasks. Identify what type of a system should
be used open loop or closed loop with substantiation. Explain the algorithm and scenario for
the same.
a. Identify critical and non-critical tasks.
b. Which scheduling algorithm do you use? Justify the same.
c. Can we apply priority inversion or not? If so identify the tasks.
d. Give the Model and Schedule
Critical tasks:
Authentication of authorized person (biometric)
Sensor detection (automatic door opening for human beings)
Identification of number of persons in a room for temperature control and light
intensity control
Non-critical tasks:
Temperature control
Intensity control of light
System is closed loop
Model is hard real time system and it is an event driven model
QB5 Construct a Raspberry Pi Model Robot System for smart irrigation management
system. It should handle all exceptions for smart water management. Identify the tasks and
subtasks in the above process (Critical / non-critical / exceptional). Develop the python script
for the same. Draw a block diagram of the model illustrating the components that would be
used. Identify the scheduling algorithm which would be effective in tasks modelling and
schedule the tasks.
Solution:
Critical Task :
sensor signal for soil, moisture and water level monitoring, switching the pump on to irrigate,
Power supply to the device, Alert signals to concern person,Performance monitoring
Non Critical Task: log files
Major Functions:
Design for the sensors,
Designing the sensor node
Design of the remote server
Clock driven scheduling algorithm.
Sensor and Wireless
Processing Communicat
Actuatore
and memory ion unit
unit
unit
Power
management
unit
QB6 Design a Raspberry Pi based system for a smart hospital in the absence of doctors to
carry out surgeries. Highlight the tasks associated. Identify the nature and type of real time
system. Which algorithm would be suitable in such a scenario and explain the same with an
example.
Solution:
Tasks:
Critical: Oxygen supply, Anaesthesia level, Power supply, Ventilator operation.
Exceptional: Action when BP is high, Seizure attack etc.
System: Event driven or activity oriented. It is hard real time system and closed loop model.
Algorithm:IRIS( Increased Reward with Increased Service)
QB7 Let us consider a real time system has three periodic Task (T1, T2, and T3). The first
task T1 is appearing in the system with a periodicity(p) 20 and every time it required 3 unit
of execution time(e). The second task T2 have phase (ø)value 4 and periodicity (p) 8. This
task T2 have execution time (e) 1. The last task T3 have a relative deadline (D) 7. The T3
also has a periodicity (p) 5and execution time (e) 2. Draw a Network Flow Graph and
calculate the Hyper-period and the Maximum Flow of the network. 5M
Hyper-period – 20.
Maximum Flow – 13.
QB8 Design a real time scheduling schema for coffee shop, where the customers are ordering for
different type of foods and beverages.
Items Preparation Order taken at Delivery time
time (minutes)
Cappuccino 2 10am 11:05am
Coffee Late 2.5 10:20am 12:30pm
Coffee mocha 2.5 11am 11:10am
Chicken 10 12noon 12:30pm
sandwich
Hot Dog 15 12noon 1:00pm
French fries 15 10am 11am
Propose a suitable real time scheduling algorithm with substantiation for the above mention situations
so that all the customers can be served in time. And also draw the time line diagram for the proposed
schema.
QB9. Suppose you are an embedded designer and need to develop an automated car which should
work in the absence of a driver. As an embedded designer you need to formulate a model for the
same. Identify what type of a system model should be used. List out the critical tasks and non-
critical tasks. Identify what type of a system should be used open loop or closed loop with
substantiation. Which scheduling algorithm would be used in this situation explain with a small
example the simulation.
QB10 . You want to set up a lemonade stand. In no particular order, you need to:
a.mix lemon juice and water,
b.buy lemons and sugar (at the grocery store),
c. buy a table (at another store),
d. mix the lemon juice, sugar, and water,
e. set up the table and a sign,
f. make a sign, and
g. pour the lemonade into cups
Show a precedence graph that for all these activities.
QB11 . Design a real time system for a bank which also acts as a security system for intruder detection
and alert. Identify what would be the prerequisites for the same. Explain the algorithm and scenario for
the same. (model, algorithm and Cheddar implementation)
QB12 Design a real time system for a child protection system in the house in absence of parents
at home to raise an alert to parents in case of any problem. (model, algorithm and Cheddar
implementation)
QB13. Design a real time system for raising an emergency alert in a building. The hazards could
be fire, accidents in foundry, current shock, etc. . (model, algorithm and Cheddar
implementation)
QB14. Design a real time system to track telephone calls. (model, algorithm and Cheddar
implementation)
QB15 Design a real time system to update a real time database. The data needs to be consistent
and atomic transactions need to be performed serially.
QB16. Design a real time database for banking transactions that would record actions of all
transactions credited and debited. The algorithm should raise an alert to the bank manager in
case any unauthorized debit is made. (model, algorithm and Cheddar implementation)
QB17. Design a smart card check system to ensure no unauthorised entry is made into a
financial organization. (model, algorithm and Cheddar implementation)
QB18 .Design a hard real time system in Boiler temperature management system. The system
should check the temperature and intimate the operator if a threshold has been exceeded to
start a coolant. (model, algorithm and Cheddar implementation)
QB19. Design a soft real time system for a car driving video game. Identify the basic tasks
required and implement the same with an appropriate scheduling algorithm. (model, algorithm
and Cheddar implementation)
QB20 .Design a soft real time system for a vending machine that provides chocolates. Identify
the different tasks and implement the same with a suitable scheduling algorithm. (model,
algorithm and Cheddar implementation)