Presentation is loading. Please wait.

Presentation is loading. Please wait.

Page 1 2P13 Week 10. Page 2 Page 3 Static table-driven approaches performs a static analysis of feasible schedules of dispatching result is a schedule.

Similar presentations


Presentation on theme: "Page 1 2P13 Week 10. Page 2 Page 3 Static table-driven approaches performs a static analysis of feasible schedules of dispatching result is a schedule."— Presentation transcript:

1 Page 1 2P13 Week 10

2 Page 2

3 Page 3 Static table-driven approaches performs a static analysis of feasible schedules of dispatching result is a schedule that determines, at run time, when a task must begin execution Static priority-driven preemptive approaches a static analysis is performed but no schedule is drawn up analysis is used to assign priorities to tasks so that a traditional priority-driven preemptive scheduler can be used Dynamic planning-based approaches feasibility is determined at run time rather than offline prior to the start of execution one result of the analysis is a schedule or plan that is used to decide when to dispatch this task Dynamic best effort approaches no feasibility analysis is performed system tries to meet all deadlines and aborts any started process whose deadline is missed

4 Page 4 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

5 Page 5 resources required by the task while it is executing Resource requirements measures relative importance of the task Priority a task may be decomposed into a mandatory subtask and an optional subtask Subtask scheduler time task becomes ready for execution Ready time time task must begin Starting deadline time task must be completed Completion deadline time required to execute the task to completion Processing time One or the other but not both

6 Page 6 Table 10.2 Execution Profile of Two Periodic Tasks ProcessArrival TimeExecution TimeEnding Deadline A(1)01020 A(2)201040 A(3)401060 A(4)601080 A(5)8010100 B(1)02550 B(2)5025100

7 Page 7 Figure 10.5 Scheduling of Periodic Real-Time Tasks With Completion Deadlines (Based on Table 10.2)

8 Page 8 Figure 10.6 Scheduling of Aperiodic Real-Time Tasks With Starting Deadlines

9 Page 9 Table 10.3 Execution Profile of Five Aperiodic Tasks ProcessArrival TimeExecution TimeStarting Deadline A1020110 B20 C402050 D 2090 E602070

10 Page 10 Figure 10.7 Rate Monotonic Schedulin g

11 Page 11 Periodic Task Timing Diagram Figure 10.8

12 Page 12 Table 10.4 Value of the RMS Upper Bound n 11.0 20.828 30.779 40.756 50.743 60.734  ln 2  0.693

13 Page 13

14 Page 14 External devices that engage in I/O with computer systems can be grouped into three categories: suitable for communicating with the computer user printers, terminals, video display, keyboard, mouse Human readable suitable for communicating with electronic equipment disk drives, USB keys, sensors, controllers Machine readable suitable for communicating with remote devices modems, digital line drivers Communication

15 Page 15

16 Page 16 Devices differ in a number of areas: Data Rate there may be differences of magnitude between the data transfer rates Application the use to which a device is put has an influence on the software Complexity of Control the effect on the operating system is filtered by the complexity of the I/O module that controls the device Unit of Transfer data may be transferred as a stream of bytes or characters or in larger blocks Data Representation different data encoding schemes are used by different devices Error Conditions the nature of errors, the way in which they are reported, their consequences, and the available range of responses differs from one device to another

17 Page 17 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

18 Page 18 Techniques for Performing I/O

19 Page 19 1 Processor directly controls a peripheral device 2 A controller or I/O module is added 3 Same configuration as step 2, but now interrupts are employed 4 The I/O module is given direct control of memory via DMA 5 The I/O module is enhanced to become a separate processor, with a specialized instruction set tailored for I/O 6 The I/O module has a local memory of its own and is, in fact, a computer in its own right

20 Page 20

21 Page 21

22 Page 22 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 Page 23

24 Page 24

25 Page 25

26 Page 26 Table 11.2 Comparison of Disk Scheduling Algorithms (a) FIFO (starting at track 100) (b) SSTF (starting at track 100) (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 access ed Numb er of tracks traver sed Next track access ed Numb er of tracks traver sed Next track access ed Numb er of tracks traver sed Next track access ed Numb er of tracks traver sed 554590101505015050 583 321601016010 39195531842418424 18213916909418166 907238158323820 160701820553391 1501015013239165516 3811216010381583 1841461842418209032 Avera ge seek length 55.3Avera ge seek length 27.5Avera ge seek length 27.8Avera ge seek length 35.8

27 Page 27 The End


Download ppt "Page 1 2P13 Week 10. Page 2 Page 3 Static table-driven approaches performs a static analysis of feasible schedules of dispatching result is a schedule."

Similar presentations


Ads by Google