Algorithm Scheduling

Only available on StudyMode
  • Topic: Scheduling algorithm, Round-robin scheduling, AirTrain Newark
  • Pages : 11 (2087 words )
  • Download(s) : 124
  • Published : April 22, 2012
Open Document
Text Preview
REAL TIME AND EMBEDDED SYSTEMS [ECWM611]
Coursework 1: Report
Submitted by: Louis Thompson

TASK 1
(A)
An embedded system contains the following independent software tasks:

Control: The system performs closed-loop control of a robot. Loop processing takes 10 milliseconds.
Alarm monitoring: A set of 5 alarm sensors are connected to the processor via a slow speed serial link. Each individual monitoring transaction (per alarm point) takes 10 milliseconds. It is assumed that all points are scanned in sequence.

Display driving: A standard monitor is used to display system status to an operator. The display subsystem has a dedicated graphics board. It takes a maximum of 20 milliseconds to update the display information.

System identification: A processing algorithm used to mathematically model the robot system. This takes 100 milliseconds to execute.

Organize the execution schedule of these tasks using simple scheduling (FIFO). Use timing diagram to show your solution.

(A) Solution
Through the execution order used by the scheduling algorithm the TT (turnaround time; time taken for each process to complete) can be optimized, in that processing tasks with a smaller execution time first leads to better overall TT.

In the case above we have display driving aided by the use of a dedicated Graphics card therefore the execution/ TT for this process should increase (n+1) fold where n represents the number of I/O devices being used in this case 1 therefore TT for this process is increased 2fold i.e. (display driving should take 10ms).

Based on this info scheduling is done as follows:

PROCESS| EXECUTION TIME|
P1:CONTROL | 10ms|
P2:DISPLAY| 10ms [as there is dedicated GPU]| P3:ALARM MONITORING CONTROL| 50ms| P4:SYSTEM IDENTIFICATION| 100ms|

10

20
70
170
100ms
50ms
10ms
10ms
0
P4
P1
P2
P3
TIMING DIAGRAM FIFO SCHEDULING
P4 = SYSTEM IDENTIFICATION
P3 = ALARM MONITORING SYSTEM
P1 = CONTROL
P2 = DISPLAY
Time(ms)
execution
Fig [ 1 ]: Timing diagram representing the execution order of processes in FIFO scheduling. 10

20
70
170
100ms
50ms
10ms
10ms
0
P4
P1
P2
P3
TIMING DIAGRAM FIFO SCHEDULING
P4 = SYSTEM IDENTIFICATION
P3 = ALARM MONITORING SYSTEM
P1 = CONTROL
P2 = DISPLAY
Time(ms)
execution
Fig [ 1 ]: Timing diagram representing the execution order of processes in FIFO scheduling.

(A.1)
Based on the FIFO scheduling used above it can be seen that the system loops after 170ms which is equal to 0.17(seconds) this value represents the period (T) therefore the update rate (Frequency) for the Control Loop may be calculated as follows:

Freq. Hz=1T=10.17s=5.88Hz

(A.2)
Assuming that the alarm sensor that goes into alarm is the first alarm to be checked in the alarm scanning sequence and that system Identification is the process that will recognize this condition then based on the execution schedule shown in (fig 1.) the worst case delay between an Alarm Sensor going into Alarm and the system recognising the condition is found to be 40ms + 100ms = 140ms the diagram below shows how this figure was derived Fig [ 2 ]: Diagram representing the worst-case delay between an alarm being triggered and that trigger being recognized by the system. Fig [ 2 ]: Diagram representing the worst-case delay between an alarm being triggered and that trigger being recognized by the system. Alarm triggered

10ms+10ms+10ms+10ms = 40ms
100ms
Worst case delay: 40ms+100ms = 140ms
Alarm triggered
10ms+10ms+10ms+10ms = 40ms
100ms
Worst case delay: 40ms+100ms = 140ms

(B)
Reorganise the execution schedule for the...
tracking img