## July 20, 2018

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 Question.1
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:

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

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)

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)
Min4=0.2*15=3(approx)
Min5=0.2*14=2.8=3(approx)

Laxity = (deadline –(current time +minimum execution time))
L1=(20-(0+3))=17
L2=(30-(20+2))=8
L3=(50-(40+3))=7
L4=(60-(50+3))=7
L5=(30-(25+2))=3
Average Laxity=9

Time utilized =Min exec time + Average Laxity
TU1=3+9=12
TU2=2+9=11
TU3=4+9=13
TU4=3+9=12
TU5=3+9=12

Slack Available = WCET-Time Utilised
S1=13-12=1
S2=12-11=1
S3=18-13=5
S4=15-12=3
S5=14-12=2

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.