Os Concepts

4,436 views

Published on

Published in: Technology
1 Comment
6 Likes
Statistics
Notes
No Downloads
Views
Total views
4,436
On SlideShare
0
From Embeds
0
Number of Embeds
29
Actions
Shares
0
Downloads
0
Comments
1
Likes
6
Embeds 0
No embeds

No notes for slide

Os Concepts

  1. 1. PARADIGM-GLOBAL INFOSERVICES Ltd. www.paradigm-global.com
  2. 2. OBJECTIVES <ul><li>OS Introduction </li></ul><ul><li>Evolution of OS </li></ul><ul><li>Real - Time Systems </li></ul><ul><li>Classification of Real-time systems </li></ul><ul><li>What is an RTOS ? </li></ul><ul><li>Components of RTOS </li></ul><ul><ul><ul><li>Task Management </li></ul></ul></ul><ul><ul><ul><li>Memory Management </li></ul></ul></ul><ul><ul><ul><li>Intertask Communication </li></ul></ul></ul><ul><ul><ul><li>Intertask Synchronization. </li></ul></ul></ul><ul><li>Requirements of an RTOS </li></ul>
  3. 3. OPERATING SYTEMS <ul><li>Converts hardware of the system into virtual machine. </li></ul><ul><li>Acts as an interface between users and hardware of the system. </li></ul><ul><li>Controls and coordinates use of hardware among various application programs among users. </li></ul>
  4. 4. <ul><li>OS can be viewed as an: </li></ul><ul><li>Organized collection of software. </li></ul><ul><li>Consists of control routines for operating the computer. </li></ul><ul><li>Provides environment for execution of programs. </li></ul>
  5. 5. Functions of OS <ul><li>Government - Proper use of resources. </li></ul><ul><li>Resource Allocator - Manages the resources of computer systems such as CPU time, memory, file storage, I/O devices, etc. </li></ul><ul><li>Resolves conflicting requests for resources in concurrent execution of programs. </li></ul><ul><li>I/O Management - Need to control I/O devices. </li></ul>
  6. 6. Functions of OS (Contd.) <ul><li>File management - Opening, editing, closing, manipulations and deleting of files. </li></ul><ul><li>Memory management - Manages the allocation of memory space to the applications. </li></ul><ul><li>Program execution and error detection. </li></ul><ul><li>Protection - Sharing of common resources such as I/O, memory, CPU scheduling need protection. </li></ul>
  7. 7. Evolution of OS OS was evolved in the following way: 1) Serial processing 2) Batch processing 3) Multi-Programming Serial Processing RTOS Batch Processing Multi programming
  8. 8. <ul><li>Program was executed in a serial manner. </li></ul><ul><li>Ex: Punched cards, Paper tapes, language translator. </li></ul><ul><li>Serial execution causes either processor or I/O devices to be idle at sometime. </li></ul>Serial Processing
  9. 9. Serial Programming Drawbacks 1) Low utilization of system resources. 2) User productivity is low. Program 1 Program 2 P1 IDLE P1 IDLE P2 IDLE P2 IDLE P1 P2
  10. 10. <ul><li>Intent to increase system resource utilization. </li></ul><ul><li>Prearrange submitted jobs so that similar ones are placed in same batch - “phasing”. </li></ul><ul><li>Os commands are written in job control language. </li></ul><ul><li>JCL includes job begin & end commands for loading & execution of programs and commands to announce resource needs. </li></ul><ul><li>Batch monitor reads, interprets and executes OS commands. </li></ul><ul><li>Drawbacks : </li></ul><ul><li>Turnaround time is too long. Phasing increases turnaround time. </li></ul><ul><li>2) Offline debugging. </li></ul>Batch Processing
  11. 11. Multi - Programming Program1 Program2 P1 P2 P1 P2 P1 P2
  12. 12. Types of OS OS Size Function Multi-Programming Ex:Unix,WinNT Multi-Tasking Ex:RTX-51 Smaller Ex:RTX-51 Larger EX:WinNT,Unix
  13. 13. 1) Architecture For Larger OS CPU I/O Devices I/O Sub System File Manager Language Support Utilities Application Programs Kernel Scheduler Dispatcher Int.handler
  14. 14. 2) Architecture For Smaller OS CPU I/O Devices Application Programs Kernel Scheduler Dispatcher Int.handler
  15. 15. <ul><li>An instance of program in execution is </li></ul><ul><li>called “Process / Task”. </li></ul><ul><li>Capability of OS to perform more than one task at same time. </li></ul><ul><li>Ability of OS to support concurrent execution of two (or) more programs. </li></ul><ul><li>OS switches from task to task simultaneously. </li></ul><ul><li>Two types are: </li></ul><ul><li> 1) Cooperative </li></ul><ul><li> 2) Preemptive </li></ul>3) Multi-tasking OS
  16. 16. 3) Multi-Programming OS = Multi-Tasking + * Forms of memory protection * Enforces concurrency control when processes access shared I/O devices and files. 3) Multi-Programming OS
  17. 17. Real-Time Systems Systems in which correct responses are produced within a definite time limit. If computer responses exceed these time boundary then performance degradation and/or malfunction results. (or) Systems that are used in environments where a larger number of events, mostly external to computer system, must be accepted and processed in short time / within certain deadlines. (or) Any system in which time at which output is produced is significant.This is because input corresponds to some movement in physical world and output has to relate to that same movement.The lag from input time to output time must be small for acceptable timeliness.
  18. 18. <ul><li>Timeliness in a real-time system is critical. </li></ul><ul><li>Ex: Flight control, Industrial control, military applications, robotics, nuclear power plant control, automobile engine control, etc. </li></ul>
  19. 19. Classification of Real-Time Systems Hard Real-Time Systems Soft
  20. 20. Classification of Real-Time Systems <ul><li> Soft </li></ul><ul><ul><ul><ul><ul><li>Acceptance of lower performance for lateness. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Rising cost for lateness of system. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Ex: vending machine, Temperature controller </li></ul></ul></ul></ul></ul><ul><li> Hard </li></ul><ul><ul><ul><ul><ul><li>No lateness is accepted under any circumstances. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Catastrophic failure if deadline missed </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Cost of missing deadline is infinitely high </li></ul></ul></ul></ul></ul><ul><li>Ex: Missile system, aircraft. </li></ul>
  21. 21. REAL TIME SYSTEMS <ul><li>1. CLOCK BASED(Cyclic,Periodic) </li></ul><ul><li>Signals from the real time clock interrupts the operations of the computer at a predetermined time. </li></ul><ul><li>2.EVENT BASED </li></ul><ul><li>Actions perfomed in response to some event Using polling or interrupts </li></ul><ul><li>3.INTERACTIVE SYSTEMS </li></ul><ul><li>Based on average response time. </li></ul>
  22. 22. RTOS Real-time operating systems helps to build real-time system.
  23. 23. System tasks Application tasks Resource allocation Command Processor IO subsystem File manager Task management Interrupt service routine Real time clock User level Operating system level Structure of a real time OS
  24. 24. Components of RTOS <ul><li>Task Management </li></ul><ul><li>Memory Management </li></ul><ul><li>Intertask Communication </li></ul><ul><li>Intertask Synchronization </li></ul>
  25. 25. Functions of RTOS – 1.Task Management Allocation of memory and CPU time to task. a) Scheduler: To keep a record of the state of each task To schedule the allocation of CPU time to each task. b) Dispatcher: To perform the context-switching.
  26. 26. Task State Diagram New Ready Running Halted Waiting
  27. 27. CPU Scheduling <ul><li>Deals with the problem of deciding which of the process(Task) is to be allocated with CPU. </li></ul><ul><li>Intention is to </li></ul><ul><li>a) To maximize CPU utilization among different tasks in a multi-tasking program. </li></ul><ul><li>b) To minimize waiting time. </li></ul>
  28. 28. Scheduling Algorithms a) First-Come-First-Served (FCFS) b) Shortest Job First (SJF) c) Priority based Pre-emption d) Round-Robin (RR)
  29. 29. <ul><li>Dynamic memory Allocation </li></ul><ul><li>Used for storing intermediate results </li></ul><ul><li>Memory allocation and deallocation must exist within constant time limits. </li></ul>Functions of RTOS – 2.Memory Management
  30. 30. Various mechanism available are (a) Pipes (b) Message queues (c) Remote procedural calls (RPC) Functions of RTOS – 3.Intertask Communication
  31. 31. <ul><li>(a) Pipes </li></ul><ul><li>Simple communication channel that can be used to send data from one task to another. </li></ul><ul><li>Pipe can be opened,closed,written to and read just like files. </li></ul><ul><li>Perform operation in only one direction. </li></ul><ul><li>(b) RPC </li></ul><ul><li>Procedure in one process can directly call procedure in another process. </li></ul><ul><li>Two process may be running on same computer or on 2 different computers connected by network. </li></ul>
  32. 32. <ul><li>(c) Message Queues </li></ul><ul><li>It allows transmission of messages from one task to another task. </li></ul><ul><li>4) Intertask Synchronization </li></ul><ul><li>Classified as (a) Signals </li></ul><ul><li> (b) Semaphores </li></ul><ul><li>(a) Signals </li></ul><ul><ul><li>Used when task synchronization is required without data exchange. </li></ul></ul><ul><ul><li>Simplest and fastest method. </li></ul></ul>
  33. 33. <ul><li>(b) Semaphore: </li></ul><ul><li>Resources can be shared free of conflicts between the individual tasks. </li></ul><ul><li>Consists of a data item and a pair of operations, wait and release. </li></ul>
  34. 34. Requirements of an RTOS <ul><li>An RTOS has to be multi-tasking and preemptible. </li></ul><ul><li>The motion of task priority has to exist. </li></ul><ul><li>The OS has to support task synchronization </li></ul><ul><li>mechanisms. </li></ul><ul><li>A system of priority inversion has to exist. </li></ul><ul><li>System should be deterministic. </li></ul>
  35. 35. End

×