July 20, 2018

Real Time Operating System Importance - Important QnA

Text Books
T1 Liu, Jane W.S., Real Time Systems, Pearson Education, 2000
T2 Laplante, Phillip A., Real-Time Systems Design and Analysis, Wiley, 3rd Ed., 2004
T3 Jared Hendrix, Raspberry Pi: Essential guide on starting your own raspberry pi3 projects with ingenious tips and tricks
T4 Arshdeep Bahga, Vijay Madisetti, Internet Of Things A hands on Approach


Design a Biometric Facial Authentication device for a small company of 25 employees. The device should be capable of Enrolling and verifying the face. If the face matches then allow access into the company. The enrollment of New Ids should be stored in the organization database server and the ex-employees access should be denied.Draw the block diagram including the Components required for the design.List out the tasks: periodic, aperiodic and sporadic tasks of the system. Which scheduling algorithm should be used. Illustrate the same with an example. 


Components required:

Periodic tasks
LCD  display 
Reading data base till match is found or END of database- 

Aperiodic Task
Face sensing through sensor 
Temporary storing of minutiae points from the image 
Matching the temporary image and database image 
Allowing access into organization(ex: opening of gate etc)

Sporadic tasks: None

Clock driven scheduling algorithm using the above parameters.

Question. 2
Consider a task set comprising of 5 tasksT(e,d) T1(13,20), T2(12,30), T3(18,40), T4(15,50) and T5(14,60) to be scheduled on 2 processors. Which scheduling strategy would ensure tasks get an optimal share of resources. The resource actually consumed is 20% (rounded off to the nearest integer). Assume the first task starts at 0.Construct the schedule and obtain the makespan.


The algorithm for Optimal utilization is Uniform Laxity based method as it uniformly dispenses slack improving resource allocation.

Minimum execution time = 20% of Actual execution time
Min 1 =0.2*13=2.6 = 3 (approx)
Min2= 0.2*12=2.4 = 2(approx)
Min3=0.2*18=3.6=4 (approx)

Laxity = (deadline –(current time +minimum execution time))
Average Laxity=9

Time utilized =Min exec time + Average Laxity

Slack Available = WCET-Time Utilised

Makespan on P1= 12+11 = 23 units
Makespan on P2= 13+12+12 = 37 units

Question. 3
Draw petrinet model for vending machine, The machine dispenses two kinds of snack bars – 20c and 15c.
Only two types of coins can be used – 10c coins and 5c coins. The machine does not return any change.

3 scenarios can be considered,
  Scenario 1: 
Deposit 5c, deposit 5c, deposit 5c, deposit 5c, take 20c snack bar.

  Scenario 2:
Deposit 10c, deposit 5c, take 15c snack bar.

  Scenario 3:

Deposit 5c, deposit 10c, deposit 5c, take 20c snack bar.

Question. 4
Given seven tasks, A, B, C, D, E, F, and G, construct the precedence graph from the
following precedence relations:.
A → C
B →C B→ D
C →E C→ F
D →F D→ G
Then, assuming that all tasks arrive at time t = 0, have deadline D = 25, and computation
times 2, 3, 3, 5, 1, 2, 5, respectively, modify their arrival times and deadlines to schedule
them by EDF.


The precedence graph is shown below:

Question. 5
Let us consider an automatic car body painting machine has two robotic arms R1 and R2. The real time system that is responsible for paint operation has five different processes P1, P2, P3, P4 and P5. The release time and CPU burst time of each process is ri=(7, 5, 4, 2 and 0) and ei=(3, 3, 2, 6 and 6) respectively. The process P1 requires the robotic arm R1 for duration of 1 unit of time and it is required at time 8. Similarly the process P2 and P5 needs another arm R2 at time 6 and 1 respectively. The process P2 and P5 needs those resources for a period of 1 and 4 unit of time respectively. However, the process P4 required both the robotic arm R1 and R2 for a period of 4 and 1.5 unit of time and at 3 and 9 unit of time. The priority of the process varies with its number i.e. P1 has maximum and P5 has minimum priority. Now schedule those processes by considering the priority ceiling protocol. Determine that if there is any process will be blocked because of resource conflict also find the time of block. Also draw the time line diagram illustrating the above example. Assume you have only one CPU and the robotic arm are non-pre-emptible.