Title: 2P13
12P13
2(No Transcript)
3Classes of Real-Time Scheduling Algorithms
4Deadline Scheduling
- Real-time operating systems are designed with the
objective of starting real-time tasks as rapidly
as possible and emphasize rapid interrupt
handling and task dispatching - Real-time applications are generally not
concerned with sheer speed but rather with
completing (or starting) tasks at the most
valuable times - Priorities provide a crude tool and do not
capture the requirement of completion (or
initiation) at the most valuable time
5Information Used for Deadline Scheduling
One or the other but not both
6Table 10.2Execution Profile of Two Periodic Tasks
Process Arrival Time Execution Time Ending Deadline
A(1) 0 10 20
A(2) 20 10 40
A(3) 40 10 60
A(4) 60 10 80
A(5) 80 10 100
B(1) 0 25 50
B(2) 50 25 100
7Figure 10.5 Scheduling of Periodic Real-Time
Tasks With Completion Deadlines (Based on Table
10.2)
8Figure 10.6 Scheduling of Aperiodic Real-Time
Tasks With Starting Deadlines
9Table 10.3Execution Profile of Five Aperiodic
Tasks
Process Arrival Time Execution Time Starting Deadline
A 10 20 110
B 20 20 20
C 40 20 50
D 50 20 90
E 60 20 70
10Rate Monotonic Scheduling
Figure 10.7
11Periodic Task Timing Diagram
Figure 10.8
12- Table 10.4 Value of the RMS Upper Bound
n
1 1.0
2 0.828
3 0.779
4 0.756
5 0.743
6 0.734
? ln 2 ? 0.693
13(No Transcript)
14Categories of I/O Devices
- External devices that engage in I/O with
computer systems can be grouped into three
categories
15(No Transcript)
16Differences in I/O Devices
- Devices differ in a number of areas
17Organization of the I/O Function
- Three techniques for performing I/O are
- Programmed I/O
- the processor issues an I/O command on behalf of
a process to an I/O module that process then
busy waits for the operation to be completed
before proceeding - Interrupt-driven I/O
- the processor issues an I/O command on behalf of
a process - if non-blocking processor continues to execute
instructions from the process that issued the I/O
command - if blocking the next instruction the processor
executes is from the OS, which will put the
current process in a blocked state and schedule
another process - Direct Memory Access (DMA)
- a DMA module controls the exchange of data
between main memory and an I/O module
18Techniques for Performing I/O
19Evolution of the I/O Function
20(No Transcript)
21(No Transcript)
22Hierarchical Design
- Functions of the operating system should be
separated according to their complexity, their
characteristic time scale, and their level of
abstraction - Leads to an organization of the operating system
into a series of layers - Each layer performs a related subset of the
functions required of the operating system - Layers should be defined so that changes in one
layer do not require changes in other layers
23(No Transcript)
24(No Transcript)
25(No Transcript)
26- Table 11.2 Comparison of Disk Scheduling
Algorithms
(a) FIFO (starting at track 100) (a) FIFO (starting at track 100) (b) SSTF (starting at track 100) (b) SSTF (starting at track 100) (c) SCAN (starting at track 100, in the direction of increasing track number) (c) SCAN (starting at track 100, in the direction of increasing track number) (d) C-SCAN (starting at track 100, in the direction of increasing track number) (d) C-SCAN (starting at track 100, in the direction of increasing track number)
Next track accessed Number of tracks traversed Next track accessed Number of tracks traversed Next track accessed Number of tracks traversed Next track accessed Number of tracks traversed
55 45 90 10 150 50 150 50
58 3 58 32 160 10 160 10
39 19 55 3 184 24 184 24
18 21 39 16 90 94 18 166
90 72 38 1 58 32 38 20
160 70 18 20 55 3 39 1
150 10 150 132 39 16 55 16
38 112 160 10 38 1 58 3
184 146 184 24 18 20 90 32
Average seek length 55.3 Average seek length 27.5 Average seek length 27.8 Average seek length 35.8
27The End