Unit No: 1 Real Time Operating Systems Prepared by: Pavan R Jaiswal



Unit 1 objectives ◦ ◦ ◦ ◦ ◦

To To To To To

understand operating system architecture know in depth various kernel types learn and use real time systems differentiate various real time systems understand real time operating system

Real Time OS

2

     

Basics of operating systems Kernel & its types Real time tasks Real time systems Types of real time tasks Real time operating system

Real Time OS

3



Computer = set of resources ◦ Processor(s), memory, I/O & communication devices



OS ◦ Enables use of resources ◦ Manages resources

 

Resources not limited to hardware Shift from ◦ Pure efficient use of resources ◦ Enhance user experience

to

Real Time OS

4

Real Time OS

5



Kernel ◦ Substance, core, essence, centre, heart, heart & soul, marrow ,etc.



Pieces of software that performs OS tasks



Has privileged access to resources

Real Time OS

6



Kernel mode or kernel space



User mode or user space



System call ◦ User mode functionality

program

invokes

kernel

Real Time OS

mode

7



Processor scheduler



Memory manager



I/O manager



Inter-process communication manager



File system manager

Real Time OS

8



OS tends to be complex because ◦ Provides many services ◦ Support variety of hardware and software



   

Monolithic Layered Micro Distributed Exo

Real Time OS

9

Real Time OS

10



Part of UNIX OS that contains code for ◦ Controlling execution of process ◦ Scheduling process fairly

◦ Allocating main memory ◦ Allocating secondary memory

◦ Handling peripherals

Real Time OS

11



Loading and existence into main memory



Mostly written in C and assembly language





User programs accesses kernel services via system call interface Provides its services transparently

Real Time OS

12



File system



Process management



Input / output



Inter-process communication



Memory management

◦ Directory hierarchy, regular files, peripherals ◦ Multiple file system ◦ How processes share CPU, memory and signals ◦ How processes access files, terminals

Real Time OS

13



Kernel services are implemented with several data structures ◦ Process table ◦ Open file table





When process executes a system call, execution mode of process changes from user mode to kernel mode

In kernel mode, process access system data structures

Real Time OS

14

Real Time OS

15

Main function

OS services

Utility functions

Real Time OS

16



All OS functionality is included in single address

space 

Strong points – well understood, good performance



Problems ◦ Kernel components aren’t protected from each other ◦ Not easily extended / modified ◦ May be unclear structure



Eg – UNIX, Linux, most commercial system

Real Time OS

17

Real Time OS

18

Real Time OS

19



Provides set of minimal core services



Interface to hardware layer



Max functionality is moved to user space



Essential functions in kernel ◦ Primitive memory management ◦ I/O & interrupt management ◦ Inter-process communication ◦ Basic scheduling



Message passing is a communication mean



Eg – Win NT, Amoeba, Chorus, Mach, L4

Real Time OS

20



Benefits ◦ Extensibility / reliability  Easier to extend  More reliable  More secure  Rigorously tested

◦ Portability  Easier to port

◦ Distributed system support  Messages are sent without knowing target machine

◦ Object oriented OS

Real Time OS

21



Motivation ◦ Traditional centralized resource management cannot be specialized, extended or replaced ◦ Privileged applications applications

must

be

used

by

all

◦ Fixed high level abstractions to costly for good efficiency

Real Time OS

22



Goals ◦ Implement traditional abstraction entirely at application level ◦ Focus on managing security not resources



Design principles ◦ Track resource ownership ◦ Ensure protection by guarding resource usage

◦ Revoke access to resources ◦ Expose hardware allocation and revocation

Real Time OS

23



Separates resource allocation & protection from resource management



Relies on application specific library OS to provide user modification



Incomplete without library OS



Multiplexes hardware directly



Provides primitives for secure management of physical resources



Applications use them to develop appropriate abstraction

Real Time OS

24

Real Time OS

25



The operating system, and in particular the scheduler, is perhaps the most important component

•control of laboratory experiments •process control in industrial plants

Examples:

•robotics •air traffic control

•telecommunications •military command and control systems



 

Correctness of the system depends not only on the logical result of the computation but also on the time at which the results are produced Tasks or processes attempt to control or react to events that take place in the outside world These events occur in “real time” and tasks must be able to keep up with them Real Time OS

26

Hard real-time task 



one that must meet its deadline otherwise it will cause unacceptable damage or a fatal error to the system

Soft real-time task 



Has an associated deadline that is desirable but not mandatory It still makes sense to schedule and complete the task even if it has passed its deadline

Real Time OS

27



Periodic tasks ◦ requirement may be stated as:  



once per period T exactly T units apart

Aperiodic tasks

◦ has a deadline by which it must finish or start ◦ may have a constraint on both start and finish time

Real Time OS

28

Real-time operating systems have requirements in five general areas: Determinism

Responsiveness User control

Reliability Fail-soft operation

Real Time OS

29





Concerned with how long an operating system delays before acknowledging an interrupt Operations are performed at fixed, predetermined times or within predetermined time intervals  when multiple processes are competing for resources and processor time, no system will be fully deterministic The extent to which an operating system can deterministically satisfy requests depends on:

the speed with which it can respond to interrupts

whether the system has sufficient capacity to handle all requests within the required time Real Time OS

30



How to achieve determinism? ◦ Maximum delay between arrival of event and response to the event

Real Time OS

31





Concerned with how long, after acknowledgment, it takes an operating system to service the interrupt Together with determinism make up the response time to external events  critical for real-time systems that must meet timing requirements imposed by individuals, devices, and data flows external to the system Responsiveness includes: •amount of time required to initially handle the interrupt and begin execution of the interrupt service routine (ISR) •amount of time required to perform the ISR •effect of interrupt nesting

Real Time OS

32

  



Execution of ISR If process switch then delay included Time of execution of ISR depends hardware In case another interrupt occurs

Real Time OS

on

33









Generally much broader in a real-time operating system than in ordinary operating systems It is essential to allow the user fine-grained control over task priority User should be able to distinguish between hard and soft tasks and to specify relative priorities within each class May allow user to specify such characteristics as: paging or process swapping

what processes must always be resident in main memory

what disk transfer algorithms are to be used Real Time OS

what rights the processes in various priority bands have

34

 

More important for real-time systems than non-real time systems (reboot) Real-time systems respond to and control events in real time so loss or degradation of performance may have catastrophic consequences such as:  financial loss  major equipment damage  loss of life

Real Time OS

35





A characteristic that refers to the ability of a system to fail in such a way as to preserve as much capability and data as possible Important aspect is stability  a real-time system is stable if the system will meet the deadlines of its most critical, highest-priority tasks even if some less critical task deadlines are not always met

Real Time OS

36







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

Real Time OS

37

Ready time

Starting deadline

• time task becomes ready for execution

Resource requirements

• time task must begin Priority

Completion • time task must be completed deadline Processing time

•resources required by the task while it is executing

• time required to execute the task to completion

Subtask scheduler

Real Time OS

•measures relative importance of the task

•a task may be decomposed into a mandatory subtask and an optional subtask

38

Real Time OS

39

Real Time OS

40

Real Time OS

41

 

  



Used in hard real time system Schedules task using static priority policy with pre-emption Priority is based on execution time Less time left highest priority Task rate (in Hertz ) is inversely proportional to its period. A task with 50ms period will occur at rate of 20Hz

Real Time OS

42

Real Time OS

43

Real Time OS

44

Real Time OS

45



Standalone Applications ◦ Often no OS involved ◦ Micro controller based Embedded Systems



Some Real Time Applications are huge & complex ◦ ◦ ◦ ◦

Multiple threads Complicated Synchronization Requirements Filesystem / Network / Windowing support OS primitives reduce the software design time

Real Time OS

46



Scheduling.



Resource Allocation.



Interrupt Handling.



Other issues like kernel size.

Real Time OS

47



More information known ◦ ◦ ◦ ◦ ◦



about

the

tasks

are

No of tasks Resource Requirements Release Time Execution time Deadlines

Being a more deterministic system better scheduling algorithms can be devised.

Real Time OS

48

Real Time OS

49

1. 2. 3. 4. 5. 6.

Define operating system. Draw and explain its architecture Write short notes on core functions of operating system. What is kernel? Explain with neat diagram any two types of kernel. What is real time task? Differentiate between soft, hard and firm real time tasks. Write short notes on real time systems. Real Time OS

50

7. 8. 9. 10. 11.

12.

Explain in details the concept of real time operating system and its necessity. Explain in detail kernel services of real time operating system. Write description on periodic and aperiodic tasks. Explain with example deadline scheduling. Explain with example rate monotonic scheduling. Define embedded system. List few examples of embedded system. Real Time OS

51

[1] Maurice J. Bach, “The Design of UNIX Operating

System”, PHI, ISBN 978-81-203-0516-8 [2] Lyla B. Das, “Embedded Systems: An Integrated Approach” Pearson, ISBN:978-81-317- 8766-3

Real Time OS

52

Thank You http://www.pavanjaiswal.com/

Real Time OS

53

EOS Unit 1 - RTOS.pdf

To learn and use real time systems. ◦ To differentiate various real time systems. ◦ To understand real time operating system. Real Time OS 2. Page 2 of 53 ...

3MB Sizes 4 Downloads 173 Views

Recommend Documents

EOS Unit 2 - ARM.pdf
integrated processors. ◦ To understand ARM processor architecture. ◦ To learn and execute ARM instruction set. ◦ To learn ARM 9 and Cortex M3 architecture.

EOS Unit 3 - Embedded Linux.pdf
Data Center Linux (DCL). 4. Desktop Linux (DTL). Open Source Development Labs. Embedded Linux 4. Page 4 of 44. EOS Unit 3 - Embedded Linux.pdf.

UNIT-1 - PDFKUL.COM
If P is a permutation matrix of order 5 x 5, why is P6 = I? Also find a non-zero vector x so that (I – P)x = 0. 30. Solve using Gauss-Jordan method: 1 a b. 1. 0. 0. 0. 1.

UNIT-1 -
From the cubics P3 to the fourth degree polynomials P4. What matrix ... There are 2 bases : v1, v2 ,…..vn and w1, w2,….wn for Rn. If a vector x Є Rn is such that.

Curriculum Unit 1 - Pearson
Curriculum Unit 4. What Would You Rather Be? (Data Analysis) attribute compare data describe equation representation sorting survey tally mark. Curriculum Unit 5. Fish Lengths and Animal Jumps. (Measurement) distance height in-between inch length lon

EOS : Unstoppable Stateful PHP
managed in the database or in transactional queues [4, 7, etc.], but this entails a ... spinlock-based shared/exclusive latches. 1.1 Review of Interaction Contracts. The framework considers a set of interacting components of three different types. (i

Unit 1 Chapter 1.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Unit 1 Chapter ...

unit 1 understanding groups - eGyanKosh
collective security. Third, the group became both a creator and a transmitter of culture, language and technical know-how beliefs and art forms, games and.

unit 1.pdf
need for DBMS exploding. DBMS encompasses most of CS. OS, languages, theory, AI, multimedia, logic. Files vs. DBMS. Application must stage large ...

Unit 1 Ecommerce.pdf
E-commerce is based on the electronic processing and transmission of data. It is encompasses. many devices activities including electronic trading of goods and ...

Unit 1 Vocabulary
2. Aristocracy- any class or group considered to be superior, as through education, ability, wealth, or social prestige. 3. Autocracy- a form of government in which a country is ruled by a person or group with total power. 4. Constitution- the system

Course 1 Unit 3 Practice
Feb 19, 2015 - than her brother Dyami. The sum of their ages is. 23 years. How old is Dyami? 25. Corrine and Elizabeth went out for dinner. The check for their dinner was $32.75. Corrine knows her dinner cost $18.95. How much did Elizabeth's dinner c

Course 1 Unit 2 Practice
Robert lives at 5th Street and 8th Avenue. a. Write each location as an ordered pair. b. What is the distance between Jeremy's home and Adriana's home? c.

unit -1.pdf
Adaptation to prefabrication. Speed of erection. Elasticity. Ductility. Toughness. Suitability to provide additions to existing structures. Disadvantages Of ...

unit 1 understanding groups - eGyanKosh
collectivities are differences of kind. No one would suggest that eggs, caterpillars, pupae, and moths are not part of the same life cycle despite -heir apparent.

Course 1 Unit 2 Practice
SpringBoard Course 1, Unit 2 Practice. LeSSon 7-1. 1. Model with mathematics. Identify the integer at each point. a. 28 b. 0 c. 10 d. 8 e. 25 f. 11. 2. Write the opposite of each integer. a. 1 b. 228 c. 0 d. 2(27) e. |2100| f. 23. 3. Write an integer

Unit 1 bootstrapping.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item.

Course 2 Unit 1 Practice
Explain how you would divide a mixed number by a fraction. 13. John cut a 4 ft long piece of lumber into shorter pieces to repair his deck. He cut three pieces each. 3. 4 ft long, and two pieces each. 1. 2 ft long. How much ... SpringBoard Course 2,

UNIT-1.PDF
The File System ... In this mode, whatever you type is ... pwd, cd, mkdir, rmdir, ls, cp, mv, rm, cat, more, wc,. Page 2 of 15. Page 3 of 15. UNIT-1.PDF. UNIT-1.PDF.

unit 1 first impressions -- unit test
My mother says that I am a 1__________because I am very messy and don't follow any rules, but I am not a 2___________ boy. I know that I have to centre ...

EOS : Unstoppable Stateful PHP
INTRODUCTION. A growing number of businesses deliver mission-critical applica- tions (stock trading, auctions, etc.) to their customers as Web. Services.

Algebra 1 Unit 1 Section 1 Patterns Copies.pdf
Algebra 1 Unit 1 Section 1 Patterns Copies.pdf. Algebra 1 Unit 1 Section 1 Patterns Copies.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying ...

PSC unit (1)_NoRestriction.pdf
End encno4g"s- Nnt renrrired Required. 4 G,routing. 5. tnss of Preqllregr --=.- ffi. dead loadi can be counteracted. L^. 6. Dead load counter action ?. Cable Profile.