0% found this document useful (0 votes)
123 views3 pages

Solution: 4 Scanners

The document discusses three real-time scheduling problems involving periodic tasks and semaphores: 1. A system with 4 scanning tasks and 1 data handling task must be scheduled within a heartbeat timer period to avoid overflow. The maximum period is calculated. 2. If one scanner changes periodicity, the new maximum heartbeat period is calculated. 3. A system with 3 priority tasks connected to interrupts is scheduled. The minimum period for triggers is calculated to avoid overflow.

Uploaded by

Arnab Pal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views3 pages

Solution: 4 Scanners

The document discusses three real-time scheduling problems involving periodic tasks and semaphores: 1. A system with 4 scanning tasks and 1 data handling task must be scheduled within a heartbeat timer period to avoid overflow. The maximum period is calculated. 2. If one scanner changes periodicity, the new maximum heartbeat period is calculated. 3. A system with 3 priority tasks connected to interrupts is scheduled. The minimum period for triggers is calculated to avoid overflow.

Uploaded by

Arnab Pal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

A real-time system consists of 4 scanner tasks which scan sensor data from the field in a real-life plant and writes on to a buffer which is read by a data handler once in every 100 ms. Each scanner takes 5 ms. and the data handler takes a further 20 ms. If the whole system is controlled by a heart-beat timer which takes 20 micro-sec. each time it is triggered, what should be the maximum periodicity of the timer, so that no overflow occurs. Assume RM scheduling for the tasks. Solution: 4 Scanners Ps=100ms Cs=5ms Us=(5/100)*4ms Ud=(20/100)ms Ut=20*(10^-3)/P ms U=(Us+Ud+Ut) Now, Solve U>=0.69 and find P. 2. If now, one of the scanners update the data at a higher periodicity, i.e. once in 50 ms. and the data handling load for this increases by 40%, what should be the new period for the heart-beat timer? Solution: For 3 scanners Us=(5/100)*3ms And for one scanner 5/50ms Add them together and find total Us. Then 40% increase on data handler i.e. (20/100)+(20/100)*40% which is Ud Ut=20*(10^-3)/P ms U=(Us+Ud+Ut) Now, Solve U>=0.69 and find P.

3. A real-time embedded system is developed around an intel 8088 based system with a single 8259. It comprises three tasks T1, T2 and T3, with priorities in the same sequence which are connected to IRQs 4,5 and 6 respectively, with a default priority assignment for the IRQs. If the tasks are associated with execution times of 20, 25 and 30 msec. respectively, and the interrupt latency is 5 micro-sec., what is the response time of the system, if interrupt driven scheduling is assumed? If the period at which the triggers arrive is same and it is P, what should be the minimum value of P if no overflow occurs, assuming scheduling overhead is 10%? Sketch the execution profile for two cycles if P is reduced below this value. Solution: T1=20 T2=25 T3=30 1)Max response time=max(20,25,30)=30 2)scheduling overhead = 10% Utilization= (20\P) +(25/P)+(30/P)=(75/P) Now,(75/P)=(1 - 0.1)=.9 P=83.33 So, Period=83.33ms Total exec time=75 ms Overhead=(83.33 - 75)ms=8.33ms Sketch : chalk and board

4.

3 tasks T1, T2 and T3, with priorities in the same sequence are synchronized using a flag

semaphore. Initially,T1 and T2 are in the blocked state when T3 runs for 50 ms after having set the semaphore, when it is pre-empted by T2. T2 runs for 30 ms. more before it is blocked

again , while trying to set the same semaphore, and T3 runs for a further period of 10 ms. when it is pre-empted by T1 which runs for 20 ms. and gets blocked again when it tries to set the semaphore set by T1.T3 then runs for 15ms. and resets the semaphore. If T2 and T1 take further 20 ms. each to complete the activities for the particular cycle, draw the execution profile and calculate the time spent by T1 in blocked mode assuming a) a burst mode semaphore and b) a FIFO mode semaphore. What is the processor utilization in this case? Does this depend on the execution profile or the semaphore mode? Solution: chalk and board

You might also like