Systemy RT i embedded Wykład 11 Systemy RTOS

Size: px
Start display at page:

Download "Systemy RT i embedded Wykład 11 Systemy RTOS"

Transcription

1 Systemy RT i embedded Wykład 11 Systemy RTOS Wrocław 2013

2 Plan Introduction Tasks Queues Interrupts Resources Memory management Multiprocessor operation

3 Introduction

4 What s an Operating System? Provides environment for executing programs Process abstraction for multitasking/concurrency Scheduling Hardware abstraction layer (device drivers) Filesystems Communication Can be Real-Time

5 Classic OS vs RTOS Desktop OS OS is in control at all times and runs applications, OS runs in different address space RTOS OS and embedded software are integrated, ES starts and activates the OS both run in the same address space (RTOS is less protected) RTOS includes only service routines needed by the ES application RTOS vendors: FreeRTOS, VxWorks, VTRX, Nucleus, LynxOS, uc/os Desirable RTOS properties: use less memory, application programming interface, debugging tools, support for variety of microprocessors, already-debugged network drivers

6 Most Real-Time Systems are embedded An embedded system is a computer built into a system but not seen by users as being a computer Examples FAX machines Copiers Printers Scanners Routers Robots

7 Characteristics of Real-Time Operating Systems Deterministic Operations are performed at fixed, predetermined times or within predetermined time intervals Concerned with how long the operating system delays before acknowledging an interrupt

8 Characteristics of Real-Time Operating Systems Responsiveness How long, after acknowledgment, it takes the operating system to service the interrupt Includes amount of time to begin execution of the interrupt Includes the amount of time to perform the interrupt

9 Characteristics of Real-Time Operating Systems User control User specifies priority Specify paging What processes must always reside in main memory Disks algorithms to use Rights of processes

10 Characteristics of Real-Time Operating Systems Reliability Degradation of performance may have catastrophic consequences Attempt either to correct the problem or minimize its effects while continuing to run Most critical, high priority tasks execute

11 Characteristics of Real-Time Operating Systems Fail-soft operation ability of a system to fail in such a way as to preserve as much capability and data as possible; the RTOS tries to correct the problem or minimize its effects while continuing to run; RTOS is stable, i.e. it will meet the deadlines of its most critical, highest-priority tasks, even if some less critical task deadlines are not always met.

12 Features of Real-Time Operating Systems Fast context switch Small size Ability to respond to external interrupts quickly Multitasking with interprocess communication tools such as semaphores, signals, and events

13 Features of Real-Time Operating Systems Use of special sequential files that can accumulate data at a fast rate Preemptive scheduling based on priority Minimization of intervals during which interrupts are disabled Delay tasks for fixed amount of time Special alarms and timeouts

14 RTOS is it necessary? Not always Simplest approach: cyclic executive loop do part of task 1 do part of task 2 do part of task 3 end loop

15 Cyclic Executive Plus Interrupts Works fine for many signal processing applications Insanely cheap, predictable interrupt handler: When interrupt occurs, execute a single userspecified instruction This typically copies peripheral data into a circular buffer No context switch, no environment save, no delay

16 Drawbacks of CE + Interrupts Main loop still running in lockstep Programmer responsible for scheduling Scheduling static Sporadic events handled slowly

17 Cooperative Multitasking A cheap alternative Non-preemptive Processes responsible for relinquishing control Examples: Original Windows A process had to periodically call get_next_event() to let other processes proceed Drawbacks: Programmer had to ensure this was called frequently An errant program would lock up the whole system Alternative: preemptive multitasking

18 Preemptive Multitasking Tasks are swapped either voluntarily or automaticaly by the RTOS Tasks normally selected based upon priority

19 Preemptive Multitasking - example

20 RTOS KERNEL

21 Tasks

22 Tasks A task a simple subroutine ES application makes calls to the RTOS functions to start tasks, passing to the OS, start address, stack pointers, etc. of the tasks Task States: Running Ready (possibly: suspended, pended) Blocked (possibly: waiting, dormant, delayed) [Exit] Scheduler schedules/shuffles tasks between Running and Ready states Blocking is self-blocking by tasks, and moved to Running state via other tasks interrupt signaling (when block-factor is removed/satisfied) When a task is unblocked with a higher priority over the running task, the scheduler switches context immediately (for all pre-

23

24 Tasks Most tasks are blocked or ready most of the time because generally only one task can run at a time per CPU The number of items in the ready queue can vary greatly, depending on the number of tasks the system needs to perform and the type of scheduler that the system uses

25

26

27 Tasks and Data Each tasks has its won context - not shared, private registers, stack, etc. In addition, several tasks share common data (via global data declaration; use of extern in one task to point to another task that declares the shared data Shared data cause the shared-data problem or use of Reentrancy characterization of functions

28

29 Reentrant functions Reentrancy A function that works correctly regardless of the number of tasks that call it between interrupts Characteristics of reentrant functions Only access shared variable in an atomicway, or when variable is on callee s stack A reentrant function calls only reentrant functions A reentrant function uses system hardware (shared resource) atomically

30 Semaphores and Shared Data Semaphore a variable/lock/flag used to control access to shared resource (to avoid shared-data problems in RTOS) Protection at the start is via primitive function, called take, indexed by the semaphore Protection at the end is via a primitive function, called release, also indexed similarly Simple semaphores Binary semaphores are often adequate for shared data problems in RTOS

31 Semaphores and Shared Data Semaphore Problems The initial values of semaphores when not set properly or at the wrong place The symmetry of takes and releases must match or correspond each take must have a corresponding release somewhere in the ES application Taking the wrong semaphore unintentionally (issue with multiple semaphores) Holding a semaphore for too long can cause waiting tasks deadline to be missed

32

33 Semaphores and Shared Data Variants: Binary semaphores single resource, one-at-a time, alternating in use (also for resources) Counting semaphores multiple instances of resources, increase/decrease of integer semaphore variable Mutex protects data shared while dealing with priority inversion problem Summary Protecting shared data in RTOS Disabling/Enabling interrupts (for task code and interrupt routines), faster Taking/Releasing semaphores (can t use them in interrupt routines), slower, affecting response times of those tasks that need the semaphore Disabling task switches (no effect on interrupt routines), holds all other tasks response

34 Task Synchronization Events Messages Semaphores Mutexes

35 Semaphores

36 Semaphores Invented by Edgser Dijkstra in the mid- 1960s Offered by most multitasking kernels Used for: Mutual exclusion Signaling the occurrence of an event Synchronizing activities among tasks

37 Semaphores (cont.) A semaphore is a key that the code acquires in order to continue execution If the key is already in use, the requesting task is suspended until the key is released There are two types Binary semaphores 0 or 1 Counting semaphores >= 0

38 Semaphore Operations Initialize (or create) Value must be provided Waiting list is initially empty Wait (or pend) Used for acquiring the semaphore If the semaphore is available (the semaphore value is positive), the value is decremented, and the task is not blocked Otherwise, the task is blocked and placed in the waiting list Most kernels allow you to specify a timeout If the timeout occurs, the task will be unblocked and an error code will be returned to the task

39 Semaphore Operations (cont.) Signal (or post) Used for releasing the semaphore If no task is waiting, the semaphore value is incremented Otherwise, make one of the waiting tasks ready to run but the value is not incremented Which waiting task to receive the key? Highest-priority waiting task First waiting task

40 Sharing I/O Devices

41 Encapsulating a Semaphore

42 Applications of Counting Semaphores A counting semaphore is used when a resource can be used by more than one task at the same time Example: Managing a buffer pool of 10 buffers

43 Tasks scheduling

44 Scheduling Algorithms in RTOS What is it? Multi-tasking requires all tasks get scheduled to run on CPU according to some pre pre-determined scheme Types of Scheduling: Co-operative, Pre-emptive Round-robin, Deadline Monotonic, Least Slack Slack- Time etc. Issues: Task dead-lines Missed dead-lines may have severe consequences Context Switch Time

45 Scheduling Algorithms in RTOS Off-line scheduling algorithms The algorithm is executed on the entire task set before actual task activation. The schedule generated in this way is stored in a table and later executed by a dispatcher. On-line scheduling algorithms The scheduling decisions are taken at runtime every time a new task enters the system or when a running task terminates.

46 Priority inversion Priority inversion: low-priority process keeps high-priority process from running. Improper use of system resources can cause scheduling problems: Low-priority process grabs I/O device. High-priority device needs I/O device, but can t get it until low-priority process is done. Can cause deadlock.

47 Solving priority inversion Give priorities to system resources. Have process inherit the priority of a resource that it requests. Low-priority process inherits priority of device if higher.

48 Context-switching time Non-zero context switch time can push limits of a tight schedule. Hard to calculate effects---depends on order of context switches. In practice, OS context switch overhead is small.

49 Off-line scheduling algorithms The main advantage of this approach is that the run-time overhead is low and does not depend on the complexity of the scheduling algorithm used to build the schedule. However, the system is quite inflexible to environmental changes.

50 On-line scheduling algorithms With on-line algorithms, each task is assigned a priority, according to one of its temporal parameters. These priorities can be either fixed priorities or dynamic priorities fixed priorities: based on fixed parameters and assigned to the tasks before their activation dynamic priorities: based on dynamic parameters that may change during system evolution When task activations are not known, an on-line guarantee test has to be done every time a new task enters the system.

51 Scheduling Algorithms in RTOS Off-line scheduling algorithms: Clock Driven Scheduling Weighted Round Robin Scheduling On-line scheduling algorithms: Static: Rate monotonic Inverse deadline (deadline monotonic) Dynamic: Earliest deadline first Least laxity first

52 Scheduling Algorithms in RTOS Clock Driven Simplest All parameters about jobs (execution time/deadline) known in advance. Schedule can be computed offline or at some regular time instances. Minimal runtime overhead. Not suitable for many applications.

53 Scheduling Algorithms in RTOS Weighted Round Robin Jobs scheduled in FIFO manner Time quantum given to jobs is proportional to it s weight Example use : High speed switching network QoS guarantee. Not suitable for precedence constrained jobs. Job A can run only after Job B. No point in giving time quantum to Job B before Job A.

54 Rate Monotonic Scheduling For a set of periodic tasks, assigning the priorities according to the rate monotonic (RM) algorithm means that tasks with shorted periods (higher request rates) get higher priorities. It is an optimal, preemptive, staticpriority, scheduling algorithm used in real-time operating systems. If a task set cannot be scheduled using the RMA algorithm, it cannot be scheduled using any static-priority

55 Rate Monotonic Scheduling The inputs to the algorithm are processes (tasks, threads) with: No resource sharing (processes do not share resources, e.g. a hardware resource, a queue, or a semaphore) Deterministic deadlines exactly equal to periods Static priorities (whenever a processor is free or a new task period begins, the task with the highest static priority is selected to preempt all other tasks) Static priorities assigned according to the rate monotonic principle (tasks with shorter periods/deadlines are given higher priorities)

56 RMS The RM algorithm assigns different priorities proportional to the frequency of tasks RM can schedule a set of tasks to meet deadlines if total resource utilization is less than 69.3% The RM algorithm provides no support for dynamically changing task periods and/or priorities and tasks that may experience priority inversion

57 RMS - example

58 RMS Summary One major limitation of fixed-priority scheduling and RMS is that it is not always possible to fully utilize the CPU.

59 Inverse deadline algorithm Inverse deadline allows a weakening of the condition which requires equality between periods and deadlines in staticpriority schemes. The inverse deadline algorithm (IDA) assigns priorities to tasks according to their deadlines: The task with the shortest relative deadline is assigned the highest priority

60 IDA - example

61 Earliest deadline first algorithm The EDF algorithm assigns priority to tasks according to their absolute deadlines: The task with the earliest deadline will be executed at the highest priority. This algorithm is optimal in the sense that feasibility. If there exists a feasible schedule for a task set, then EDF is able to find it.

62 Earliest deadline first algorithm EDF does not make any assumption about the periodicity of the tasks; hence it can be used for scheduling periodic as well as aperiodic tasks.

63 EDF implementation On each timer interrupt: compute time to deadline; choose process closest to deadline. Generally considered too expensive to use in practice.

64 EDF - example

65 Least Laxity first algorithm The LLF algorithm assigns priority to tasks according to their relative laxity. The task with the smallest laxity will be executed at the highest priority. LLF is optimal and the schedulability of a set of tasks can be guaranteed using the EDF schedulability test.

66 Least Laxity first algorithm When a task is executed, its relative laxity is constant. The relative laxity of ready tasks decreases. When the laxity of the tasks is computed only at arrival times, the LLF schedule is equivalent to EDF. If the laxity is computed at every time t, more context-switching will be necessary.

67 LLF example 1

68 LLF example 2

69 Hybrid task scheduling Some real-time applications may require aperiodic tasks. Hybrid task sets contain both types of tasks. Periodic tasks usually have hard timing constraints and are scheduled with one of the four basic algorithms. Aperiodic tasks have either soft or hard timing constraints.

70 Hybrid task scheduling The main objective of the system is to guarantee the schedulability of all the periodic tasks. If the aperiodic tasks have soft real timing constraints, the system aims to provide good average response times. If the aperiodic tasks have hard timing constraints, the system aims to maximize the guarantee ratio of these aperiodic tasks.

71 Scheduling of soft aperiodic tasks Three main types: Background scheduling Task server Slack stealing

72 Background scheduling Aperiodic tasks are scheduled in the background when there are no periodic tasks ready to execute. Aperiodic tasks are queued according to first-come-first-serve strategy. The major advantage of background scheduling is its simplicity. Its major drawback is that, for high loads due to periodic tasks, response time of aperiodic requests can be high.

73 Background scheduling - example

74 Task Servers A server is a periodic task whose purpose is to server aperiodic requests. A server is characterized by a period and a computation time called server capacity. The server is scheduled with the algorithm used for the periodic tasks and, once it is active, it serves the aperiodic requests within the limit of server capacity. The ordering of aperiodic requests does not depend on the scheduling algorithm used for periodic tasks.

75 Types of Task Servers Polling server The simplest servers serves pending aperiodic request at regular intervals equal to its period. Deferred server, priority exchange server sporadic server More improved Better aperiodic responsiveness

76 Polling server The polling server becomes active at regular intervals equal to its period. It serves pending aperiodic requests within the limit of its capacity. If no aperiodic quests are pending, the polling server suspends itself until the beginning the its next period and the time originally reserved for aperiodic requests is used by periodic tasks.

77 Polling Server - example

78 Deferrable server The deferrable server is an extension of the polling server which improves the response time of aperiodic requests. The deferrable server looks like the polling server, with some differences: the deferrable server preserves its capacity if no aperiodic requests are pending at the beginning of its period. Thus an aperiodic request that enters the system just after the server suspends itself can be executed immediately.

79 Sporadic server Like the deferrable server, the sporadic server preserves its capacity until an aperiodic request occurs. It differs in the way it replenishes this capacity. It does not recover its capacity to its full value at the beginning of each new period, but only after it has been consumed by aperiodic task executions.

80 Sporadic Server - example

81 Slack stealing and joint scheduling These two techniques are quite similar and both use the laxity of the periodic tasks to schedule aperiodic tasks. Slack stealing The tasks are scheduled with RMA Joint scheduling The tasks are scheduled with EDF

82 Slack stealing and joint scheduling Unlike the server techniques, they do not require the use of a periodic task for aperiodic task service. Each time an aperiodic request enters the system, time for servicing this request is made by stealing processing time from the periodic tasks without causing deadline missing. The laxity of the periodic tasks is used to schedule aperiodic requests as soon as possible.

83 Slack Stealing - example

84 Scheduling of hard aperiodic tasks The hard aperiodic task can be mapped onto a periodic task and scheduled with the periodic task set not always usable! Two main types: Background scheduling Joint scheduling of aperiodic and periodic tasks

85 Background scheduling The principle of this technique consists in scheduling aperiodic tasks in the background when there are no periodic tasks ready to execute according to EDF. The aperiodic requests have hard timing constraints and as they are accepted, they are queued according to a strict increasing order of deadlines.

86 Joint scheduling of aperiodic and periodic tasks Each time a new aperiodic task enters the system, a new EDF schedule is built with a task set which is composed of the periodic requests, the previously accepted requests, and the new request. If this schedule meets all the deadlines, then the new requests is accepted.

87 Example

88 Message passing

89 Message passing Tasks must be able to communicate with one another to coordinate their activities or to share data. Tasks can use shared data and semaphores to allow taskcommunication. There are several other methods that most RTOSs offer: queues, mailboxes, and pipes

90 What is a queue Queues are the primary form of intertask communications Can be used to send messages between tasks, and between interrupts and tasks In most cases they are used as thread safe FIFO (First In First Out) buffers with new data being sent to the back of the queue, although data can also be sent to the front

91 What is a queue Messages are sent through queues by copy, not by reference!!!

92 Queue - remarks Most RTOSs require to initialize the queues before use There can be many queues If the code tries to write to a full queue then the RTOS either returns an error or blocks the task until some other task reads data from the queue and thereby creates some space

93 What is a mailbox Mailboxes are like queues The typical RTOS has functions: to create, to write to, To read from mailboxes, to check whether the mailbox contains any messages. to destroy the mailbox if it is no longer needed

94 What is a mailbox Some RTOSs allow a certain number of messages in each mailbox (chosen during compile time), Others allow only one message in a mailbox at a time. In certain RTOS, mailbox messages can be prioritized.

95 What is a pipe Pipes are also like queues. The RTOS can create, write, read, and so on. Pipes in some RTOSs are entirely byteoriented. Some RTOSs use the standard C library functions fread and fwrite to read from and write to pipes

96 Queue, mailbox, pipe - problems #1: Queues, mailboxes, and pipes make it easy to share data among tasks, but they also make it easy to insert bugs #2: Most RTOSs do not restrict which tasks can read from or write to any given queue, mailbox, or pipe #3: RTOS cannot ensure that data written onto a queue, mailbox, or pipe will be properlyinterpreted by the task that reads it

97 Queue, mailbox, pipe - problems #4: Running out of space in queues, mailboxes, or pipes is usually a disaster for embedded software #5: Passing pointers from one task to another through a queue, mailbox, or pipe is one of several ways to create shared data inadvertently

98 Interrupts

99 Interrupts Embedded applications running on top of (RTOSes) require Interrupt Service Routines (ISRs) to handle interrupts generated by external events Since application code execution is interrupted (delayed) during the execution of an ISR, the amount of code in the ISR should be minimized

100 RTOS Interrupt Architectures Base problem: supporting asynchronous access to internal RTOS data structures by interrupt routines and RTOS services Modifications to the same structure can be catastrophic Two solutions: Unified Interrupt Architecture Segmented Interrupt Architecture

101 Unified Interrupt Architecture Interrupts are locked out while an ISR or system service is modifying critical data structures inside the RTOS

102 Segmented Interrupt Architecture Less popular approach is not to allow any asynchronous access to critical data structures by ISRs or other service calls Service call access to critical data structures from an ISR is deferred to a secondary routine - ISR2 ISR2 is executed along with application threads under scheduler control

103 Interrupts - nesting Nesting means when an interrupt source call of higher priority occurs then the control is passed to higher priority and on return from the higher priority the lower priority ISR starts executing. Each ISR on letting a higher priority interrupt call sends the ISM to the RTOS. Common stack for the ISR nested calls, similar to the nested function calls.

104 Resources

105 Resource Allocation in RTOS Resource Allocation The issues with scheduling applicable here. Resources can be allocated in Weighted Round Robin Priority Based Some resources are non preemptible Example : semaphores Priority Inversion if priority scheduling is used

106 Memory management

107 Memory management Two types of memory management in RTOSs: The first type is used to provide tasks with temporary data space The second type of memory management is used to dynamically swap code in and out of main memory

108 Memory management First type: The system s free memory is divided into fixed sized memory blocks, which can be requested by tasks When a task finishes using a memory block it must return it to the pool Access to pools can be prioritized

109 Memory management Second type used techinques: Memory swapping method keeps the OS and one task in memory at the same time. When another task needs to run, it replaces the first task in main memory, after the first task and its context have been saved to secondary memory In the Overlays method, the code is partitioned into smaller pieces, which are swapped from disk to memory. In this way, programs larger than the available memory

110 Memory management Second type used techinques: In MFT (multiprogramming with a fixed number of tasks) method, a fixed number of equalized code parts are in memory at the same time. As needed, these parts are overlaid from disk MVT (variable number of tasks) method is similar to MFT except that the size of the partition depends on the needs of the program in MVT Demand paging systems have fixed-size pages that are given to programs as

111 Multiprocessor operation

112 Multiprocessoroperation Most RTOSs that are multiprocessorcapable use a separate instance of the kernel on each processor The multiprocessor ability comes from the kernel s ability to send and receive information between processors

113 Multiprocessoroperation In many RTOSs that support multiprocessing, there is no difference between the single processor case and the multiprocessor case from the task s point of view The RTOS uses a table in each local kernel that contains the location of each task in the system When one task sends a message to another task the local kernel looks up the location of the destination task and routes the message appropriately. From the task s point of view all tasks are

114 RTOS Design hints

115 Basic Design using RTOS Large number of tasks - pros: better control of the priorities and by this of the relative response times, better modularity, cleaner code, more effective encapsulation of data, better hardware sharing, simpler tasks

116 Basic Design using RTOS Large number of tasks - cons: more data sharing, more semaphores, more time on handling semaphores more bugs, more time on message passing between tasks

117 Basic Design using RTOS Use as few tasks as possible Add more tasks to your design only for clear reason Write short ISRs Avoid creating and destroying tasks while the system is running, because: it is time consuming it may be difficult to destroy a task without leaving something behind; it may be better to create all the tasks at system startup and leave them

118 RTOS market view

119 RTOS - Market view RTOSes on the market can be categorized into: RTOS for small footprint, mobile and connected devices: FreeRTOS µc/os RTOS for complex, hard real-time applications General purpose RTOS in the embedded industry VxWorks RTOS for the Java Platform Objected-oriented RTOS

120 Thank you for your attention

121 References [1] Plus/Instructor_Led_FreeRTOS_Training/FreeRTOS_Training.shtml [2] c.pdf [3] [4] [5] [6] 10/1326.pdf [7] [8] F%B8q/12%20Scheduling%20of%20Independent%20Tasks.pdf

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable What s An OS? Provides environment for executing programs Process abstraction for multitasking/concurrency scheduling Hardware abstraction layer (device drivers) File systems Communication Do we need an

More information

Multiprocessor and Real-Time Scheduling. Chapter 10

Multiprocessor and Real-Time Scheduling. Chapter 10 Multiprocessor and Real-Time Scheduling Chapter 10 1 Roadmap Multiprocessor Scheduling Real-Time Scheduling Linux Scheduling Unix SVR4 Scheduling Windows Scheduling Classifications of Multiprocessor Systems

More information

What s an Operating System? Real-Time Operating Systems. Cyclic Executive. Do I Need One? Handling an Interrupt. Interrupts

What s an Operating System? Real-Time Operating Systems. Cyclic Executive. Do I Need One? Handling an Interrupt. Interrupts What s an Operating System? Real-Time Operating Systems Provides environment for executing programs Prof. Stephen A. Edwards Process abstraction for multitasking/concurrency Scheduling Hardware abstraction

More information

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9 Implementing Scheduling Algorithms Real-Time and Embedded Systems (M) Lecture 9 Lecture Outline Implementing real time systems Key concepts and constraints System architectures: Cyclic executive Microkernel

More information

Multiprocessor and Real- Time Scheduling. Chapter 10

Multiprocessor and Real- Time Scheduling. Chapter 10 Multiprocessor and Real- Time Scheduling Chapter 10 Classifications of Multiprocessor Loosely coupled multiprocessor each processor has its own memory and I/O channels Functionally specialized processors

More information

UNIT -3 PROCESS AND OPERATING SYSTEMS 2marks 1. Define Process? Process is a computational unit that processes on a CPU under the control of a scheduling kernel of an OS. It has a process structure, called

More information

Tasks. Task Implementation and management

Tasks. Task Implementation and management Tasks Task Implementation and management Tasks Vocab Absolute time - real world time Relative time - time referenced to some event Interval - any slice of time characterized by start & end times Duration

More information

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory Commercial Real-time Operating Systems An Introduction Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory swamis@iastate.edu Outline Introduction RTOS Issues and functionalities LynxOS

More information

Real-Time Programming

Real-Time Programming Real-Time Programming Week 7: Real-Time Operating Systems Instructors Tony Montiel & Ken Arnold rtp@hte.com 4/1/2003 Co Montiel 1 Objectives o Introduction to RTOS o Event Driven Systems o Synchronization

More information

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Embedded Systems: OS Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Standalone Applications Often no OS involved One large loop Microcontroller-based

More information

Embedded Systems. 6. Real-Time Operating Systems

Embedded Systems. 6. Real-Time Operating Systems Embedded Systems 6. Real-Time Operating Systems Lothar Thiele 6-1 Contents of Course 1. Embedded Systems Introduction 2. Software Introduction 7. System Components 10. Models 3. Real-Time Models 4. Periodic/Aperiodic

More information

Embedded Systems: OS

Embedded Systems: OS Embedded Systems: OS Jinkyu Jeong (Jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu ICE3028: Embedded Systems Design, Fall 2018, Jinkyu Jeong (jinkyu@skku.edu) Standalone

More information

OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! ANALYZE!!!

OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! ANALYZE!!! OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! Processor Management Memory Management IO Management File Management Multiprogramming Protection and Security Network Management UNDERSTAND!!! IMPLEMENT!!!

More information

Real-time operating systems and scheduling

Real-time operating systems and scheduling Real-time operating systems and scheduling Problem 21 Consider a real-time operating system (OS) that has a built-in preemptive scheduler. Each task has a unique priority and the lower the priority id,

More information

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski Operating Systems Design Fall 2010 Exam 1 Review Paul Krzyzanowski pxk@cs.rutgers.edu 1 Question 1 To a programmer, a system call looks just like a function call. Explain the difference in the underlying

More information

ECE519 Advanced Operating Systems

ECE519 Advanced Operating Systems IT 540 Operating Systems ECE519 Advanced Operating Systems Prof. Dr. Hasan Hüseyin BALIK (10 th Week) (Advanced) Operating Systems 10. Multiprocessor, Multicore and Real-Time Scheduling 10. Outline Multiprocessor

More information

Reference Model and Scheduling Policies for Real-Time Systems

Reference Model and Scheduling Policies for Real-Time Systems ESG Seminar p.1/42 Reference Model and Scheduling Policies for Real-Time Systems Mayank Agarwal and Ankit Mathur Dept. of Computer Science and Engineering, Indian Institute of Technology Delhi ESG Seminar

More information

6/17/2011. Real-time Operating Systems

6/17/2011. Real-time Operating Systems 1 1 Real-time Operating Systems 2 2 Real-time Operating Systems 3 3 What is an RTOS Provides efficient mechanisms and services for real-time scheduling and resource management Must keep its own time and

More information

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5 OPERATING SYSTEMS CS3502 Spring 2018 Processor Scheduling Chapter 5 Goals of Processor Scheduling Scheduling is the sharing of the CPU among the processes in the ready queue The critical activities are:

More information

Introduction to Real-Time Operating Systems

Introduction to Real-Time Operating Systems Introduction to Real-Time Operating Systems GPOS vs RTOS General purpose operating systems Real-time operating systems GPOS vs RTOS: Similarities Multitasking Resource management OS services to applications

More information

Timers 1 / 46. Jiffies. Potent and Evil Magic

Timers 1 / 46. Jiffies. Potent and Evil Magic Timers 1 / 46 Jiffies Each timer tick, a variable called jiffies is incremented It is thus (roughly) the number of HZ since system boot A 32-bit counter incremented at 1000 Hz wraps around in about 50

More information

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system Real world exposed programs Programs written to interact with the real world, outside the computer Programs handle input and output of data in pace matching the real world processes Necessitates ability

More information

DSP/BIOS Kernel Scalable, Real-Time Kernel TM. for TMS320 DSPs. Product Bulletin

DSP/BIOS Kernel Scalable, Real-Time Kernel TM. for TMS320 DSPs. Product Bulletin Product Bulletin TM DSP/BIOS Kernel Scalable, Real-Time Kernel TM for TMS320 DSPs Key Features: Fast, deterministic real-time kernel Scalable to very small footprint Tight integration with Code Composer

More information

Multiprocessor scheduling

Multiprocessor scheduling Chapter 10 Multiprocessor scheduling When a computer system contains multiple processors, a few new issues arise. Multiprocessor systems can be categorized into the following: Loosely coupled or distributed.

More information

Micrium µc/os II RTOS Introduction EE J. E. Lumpp

Micrium µc/os II RTOS Introduction EE J. E. Lumpp Micrium µc/os II RTOS Introduction (by Jean Labrosse) EE599 001 Fall 2012 J. E. Lumpp μc/os II μc/os II is a highly portable, ROMable, very scalable, preemptive real time, deterministic, multitasking kernel

More information

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008.

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008. CSC 4103 - Operating Systems Spring 2008 Lecture - XII Midterm Review Tevfik Ko!ar Louisiana State University March 4 th, 2008 1 I/O Structure After I/O starts, control returns to user program only upon

More information

IT 540 Operating Systems ECE519 Advanced Operating Systems

IT 540 Operating Systems ECE519 Advanced Operating Systems IT 540 Operating Systems ECE519 Advanced Operating Systems Prof. Dr. Hasan Hüseyin BALIK (5 th Week) (Advanced) Operating Systems 5. Concurrency: Mutual Exclusion and Synchronization 5. Outline Principles

More information

Real-Time Systems. Real-Time Operating Systems

Real-Time Systems. Real-Time Operating Systems Real-Time Systems Real-Time Operating Systems Hermann Härtig WS 2018/19 Outline Introduction Basic variants of RTOSes Real-Time paradigms Common requirements for all RTOSes High level resources Non-Real-Time

More information

NuttX Realtime Programming

NuttX Realtime Programming NuttX RTOS NuttX Realtime Programming Gregory Nutt Overview Interrupts Cooperative Scheduling Tasks Work Queues Realtime Schedulers Real Time == == Deterministic Response Latency Stimulus Response Deadline

More information

Chapter 6 Concurrency: Deadlock and Starvation

Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles Chapter 6 Concurrency: Deadlock and Starvation Seventh Edition By William Stallings Operating Systems: Internals and Design Principles When two trains

More information

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS EECS 571 Principles of Real-Time Embedded Systems Lecture Note #10: More on Scheduling and Introduction of Real-Time OS Kang G. Shin EECS Department University of Michigan Mode Changes Changes in mission

More information

REAL-TIME OPERATING SYSTEMS SHORT OVERVIEW

REAL-TIME OPERATING SYSTEMS SHORT OVERVIEW Faculty of Computer Science Institute of Systems Architecture, Operating Systems Group REAL-TIME OPERATING SYSTEMS SHORT OVERVIEW HERMANN HÄRTIG, WS 2017/18 OUTLINE Basic Variants of Real-Time Operating

More information

Techno India Batanagar Department of Computer Science & Engineering. Model Questions. Multiple Choice Questions:

Techno India Batanagar Department of Computer Science & Engineering. Model Questions. Multiple Choice Questions: Techno India Batanagar Department of Computer Science & Engineering Model Questions Subject Name: Operating System Multiple Choice Questions: Subject Code: CS603 1) Shell is the exclusive feature of a)

More information

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

More information

UNIT:2. Process Management

UNIT:2. Process Management 1 UNIT:2 Process Management SYLLABUS 2.1 Process and Process management i. Process model overview ii. Programmers view of process iii. Process states 2.2 Process and Processor Scheduling i Scheduling Criteria

More information

Computer Science 4500 Operating Systems

Computer Science 4500 Operating Systems Computer Science 4500 Operating Systems Module 6 Process Scheduling Methods Updated: September 25, 2014 2008 Stanley A. Wileman, Jr. Operating Systems Slide 1 1 In This Module Batch and interactive workloads

More information

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Processes and Non-Preemptive Scheduling. Otto J. Anshus Processes and Non-Preemptive Scheduling Otto J. Anshus Threads Processes Processes Kernel An aside on concurrency Timing and sequence of events are key concurrency issues We will study classical OS concurrency

More information

Microkernel/OS and Real-Time Scheduling

Microkernel/OS and Real-Time Scheduling Chapter 12 Microkernel/OS and Real-Time Scheduling Hongwei Zhang http://www.cs.wayne.edu/~hzhang/ Ack.: this lecture is prepared in part based on slides of Lee, Sangiovanni-Vincentelli, Seshia. Outline

More information

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date: Subject Name: OPERATING SYSTEMS Subject Code: 10EC65 Prepared By: Kala H S and Remya R Department: ECE Date: Unit 7 SCHEDULING TOPICS TO BE COVERED Preliminaries Non-preemptive scheduling policies Preemptive

More information

Enriching Enea OSE for Better Predictability Support

Enriching Enea OSE for Better Predictability Support Enriching Enea OSE for Better Predictability Support Master of Science Thesis Naveed Ul Mustafa naveedum@kth.se Stockholm, August 2011 Examiner: Ingo Sander KTH ingo@kth.se Supervisor: Mehrdad Saadatmand

More information

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria A Predictable RTOS Mantis Cheng Department of Computer Science University of Victoria Outline I. Analysis of Timeliness Requirements II. Analysis of IO Requirements III. Time in Scheduling IV. IO in Scheduling

More information

Real-Time Systems Hermann Härtig Real-Time Operating Systems Brief Overview

Real-Time Systems Hermann Härtig Real-Time Operating Systems Brief Overview Real-Time Systems Hermann Härtig Real-Time Operating Systems Brief Overview 02/02/12 Outline Introduction Basic variants of RTOSes Real-Time paradigms Common requirements for all RTOSes High level resources

More information

Cs703 Current Midterm papers solved by Naina_Mailk. Q: 1 what are the Characteristics of Real-Time Operating system?

Cs703 Current Midterm papers solved by Naina_Mailk. Q: 1 what are the Characteristics of Real-Time Operating system? Cs703 Current Midterm papers solved by Naina_Mailk Q: 1 what are the Characteristics of Real-Time Operating system? Characteristics of Real-Time Operating Systems Deterministic Operations are performed

More information

Introduction to Real-Time Systems and Multitasking. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Introduction to Real-Time Systems and Multitasking. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff Introduction to Real-Time Systems and Multitasking Real-time systems Real-time system: A system that must respond to signals within explicit and bounded time requirements Categories Soft real-time system:

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Sanjit A. Seshia UC Berkeley EECS 9/9A Fall 0 008-0: E. A. Lee, A. L. Sangiovanni-Vincentelli, S. A. Seshia. All rights reserved. Chapter : Operating Systems, Microkernels,

More information

Process Scheduling Part 2

Process Scheduling Part 2 Operating Systems and Computer Networks Process Scheduling Part 2 pascal.klein@uni-due.de Alexander Maxeiner, M.Sc. Faculty of Engineering Agenda Process Management Time Sharing Synchronization of Processes

More information

Precedence Graphs Revisited (Again)

Precedence Graphs Revisited (Again) Precedence Graphs Revisited (Again) [i,i+6) [i+6,i+12) T 2 [i,i+6) [i+6,i+12) T 3 [i,i+2) [i+2,i+4) [i+4,i+6) [i+6,i+8) T 4 [i,i+1) [i+1,i+2) [i+2,i+3) [i+3,i+4) [i+4,i+5) [i+5,i+6) [i+6,i+7) T 5 [i,i+1)

More information

Back to RTOS. CSE466 Autumn 00-1

Back to RTOS. CSE466 Autumn 00-1 Back to RTOS Scheduling Deadline Laxity Rate Monotonic Shared Code in Multiprocessing Share Resources: Deadlock avoidance Process Synchronization and Communication Memory Management CSE466 Autumn 00-1

More information

Embedded Systems. 5. Operating Systems. Lothar Thiele. Computer Engineering and Networks Laboratory

Embedded Systems. 5. Operating Systems. Lothar Thiele. Computer Engineering and Networks Laboratory Embedded Systems 5. Operating Systems Lothar Thiele Computer Engineering and Networks Laboratory Embedded Operating Systems 5 2 Embedded Operating System (OS) Why an operating system (OS) at all? Same

More information

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University CS 571 Operating Systems Midterm Review Angelos Stavrou, George Mason University Class Midterm: Grading 2 Grading Midterm: 25% Theory Part 60% (1h 30m) Programming Part 40% (1h) Theory Part (Closed Books):

More information

Module 8. Industrial Embedded and Communication Systems. Version 2 EE IIT, Kharagpur 1

Module 8. Industrial Embedded and Communication Systems. Version 2 EE IIT, Kharagpur 1 Module 8 Industrial Embedded and Communication Systems Version 2 EE IIT, Kharagpur 1 Lesson 37 Real-Time Operating Systems: Introduction and Process Management Version 2 EE IIT, Kharagpur 2 Instructional

More information

Unit 3 : Process Management

Unit 3 : Process Management Unit : Process Management Processes are the most widely used units of computation in programming and systems, although object and threads are becoming more prominent in contemporary systems. Process management

More information

Lecture notes Lectures 1 through 5 (up through lecture 5 slide 63) Book Chapters 1-4

Lecture notes Lectures 1 through 5 (up through lecture 5 slide 63) Book Chapters 1-4 EE445M Midterm Study Guide (Spring 2017) (updated February 25, 2017): Instructions: Open book and open notes. No calculators or any electronic devices (turn cell phones off). Please be sure that your answers

More information

SMD149 - Operating Systems

SMD149 - Operating Systems SMD149 - Operating Systems Roland Parviainen November 3, 2005 1 / 45 Outline Overview 2 / 45 Process (tasks) are necessary for concurrency Instance of a program in execution Next invocation of the program

More information

General Objectives: To understand the process management in operating system. Specific Objectives: At the end of the unit you should be able to:

General Objectives: To understand the process management in operating system. Specific Objectives: At the end of the unit you should be able to: F2007/Unit5/1 UNIT 5 OBJECTIVES General Objectives: To understand the process management in operating system Specific Objectives: At the end of the unit you should be able to: define program, process and

More information

8: Scheduling. Scheduling. Mark Handley

8: Scheduling. Scheduling. Mark Handley 8: Scheduling Mark Handley Scheduling On a multiprocessing system, more than one process may be available to run. The task of deciding which process to run next is called scheduling, and is performed by

More information

Interprocess Communication By: Kaushik Vaghani

Interprocess Communication By: Kaushik Vaghani Interprocess Communication By: Kaushik Vaghani Background Race Condition: A situation where several processes access and manipulate the same data concurrently and the outcome of execution depends on the

More information

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013) CPU Scheduling Daniel Mosse (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013) Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process

More information

Chapter 5 Concurrency: Mutual Exclusion and Synchronization

Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles Chapter 5 Concurrency: Mutual Exclusion and Synchronization Seventh Edition By William Stallings Designing correct routines for controlling concurrent

More information

Main Points of the Computer Organization and System Software Module

Main Points of the Computer Organization and System Software Module Main Points of the Computer Organization and System Software Module You can find below the topics we have covered during the COSS module. Reading the relevant parts of the textbooks is essential for a

More information

Module 1. Introduction:

Module 1. Introduction: Module 1 Introduction: Operating system is the most fundamental of all the system programs. It is a layer of software on top of the hardware which constitutes the system and manages all parts of the system.

More information

Process- Concept &Process Scheduling OPERATING SYSTEMS

Process- Concept &Process Scheduling OPERATING SYSTEMS OPERATING SYSTEMS Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne PROCESS MANAGEMENT Current day computer systems allow multiple

More information

Your (ES1) programs so far (ES1) software development so far

Your (ES1) programs so far (ES1) software development so far genda Introduction to dvanced Embedded Systems (The Course) (ES1) software development so far The limitations of your current examples. Challenges: concurrency, real-time & resource sharing. dvanced ES

More information

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU BCA-3 rd Semester 030010304-Fundamentals Of Operating Systems Unit: 1 Introduction Short Answer Questions : 1. State two ways of process communication. 2. State any two uses of operating system according

More information

RT3 - FreeRTOS Real Time Programming

RT3 - FreeRTOS Real Time Programming Formation FreeRTOS Real Time Programming: Real-time programming applied to the FreeRTOS operating system - Systèmes d'exploitation: RTOS RT3 - FreeRTOS Real Time Programming Real-time programming applied

More information

Dr. Rafiq Zakaria Campus. Maulana Azad College of Arts, Science & Commerce, Aurangabad. Department of Computer Science. Academic Year

Dr. Rafiq Zakaria Campus. Maulana Azad College of Arts, Science & Commerce, Aurangabad. Department of Computer Science. Academic Year Dr. Rafiq Zakaria Campus Maulana Azad College of Arts, Science & Commerce, Aurangabad Department of Computer Science Academic Year 2015-16 MCQs on Operating System Sem.-II 1.What is operating system? a)

More information

Operating Systems. Computer Science & Information Technology (CS) Rank under AIR 100

Operating Systems. Computer Science & Information Technology (CS) Rank under AIR 100 GATE- 2016-17 Postal Correspondence 1 Operating Systems Computer Science & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence Examination Oriented Theory, Practice Set Key concepts,

More information

The Real Time Thing. What the hack is real time and what to do with it. 22C3 30. December Erwin Erkinger e.at

The Real Time Thing. What the hack is real time and what to do with it. 22C3 30. December Erwin Erkinger e.at The Real Time Thing What the hack is real time and what to do with it 22C3 30. December 2005 Erwin Erkinger vindaome@p e.at Content Part 1: Introduction the vocabulary and the concepts Part 2: Practical

More information

Operating Systems Overview. Chapter 2

Operating Systems Overview. Chapter 2 Operating Systems Overview Chapter 2 Operating System A program that controls the execution of application programs An interface between the user and hardware Masks the details of the hardware Layers and

More information

Operating System Study Notes Department of Computer science and Engineering Prepared by TKG, SM and MS

Operating System Study Notes Department of Computer science and Engineering Prepared by TKG, SM and MS Operating System Study Notes Department of Computer science and Engineering Prepared by TKG, SM and MS Chapter1: Introduction of Operating System An operating system acts as an intermediary between the

More information

Operating Systems, Fall

Operating Systems, Fall Input / Output & Real-time Scheduling Chapter 5.1 5.4, Chapter 7.5 1 I/O Software Device controllers Memory-mapped mapped I/O DMA & interrupts briefly I/O Content I/O software layers and drivers Disks

More information

Scheduling Algorithm and Analysis

Scheduling Algorithm and Analysis Scheduling Algorithm and Analysis Model and Cyclic Scheduling (Module 27) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Task Scheduling Schedule: to determine which task

More information

OVERVIEW. Last Week: But if frequency of high priority task increases temporarily, system may encounter overload: Today: Slide 1. Slide 3.

OVERVIEW. Last Week: But if frequency of high priority task increases temporarily, system may encounter overload: Today: Slide 1. Slide 3. OVERVIEW Last Week: Scheduling Algorithms Real-time systems Today: But if frequency of high priority task increases temporarily, system may encounter overload: Yet another real-time scheduling algorithm

More information

Real Time Kernels and Operating Systems Introduction

Real Time Kernels and Operating Systems Introduction Real Time Kernels and Operating Systems Introduction Typical embedded system solves a complex problem By decomposing it into a number of smaller simpler pieces That work together in an organized way Such

More information

CHAPTER NO - 1 : Introduction:

CHAPTER NO - 1 : Introduction: Sr. No L.J. Institute of Engineering & Technology Semester: IV (26) Subject Name: Operating System Subject Code:21402 Faculties: Prof. Saurin Dave CHAPTER NO - 1 : Introduction: TOPIC:1 Basics of Operating

More information

SYNCHRONIZATION M O D E R N O P E R A T I N G S Y S T E M S R E A D 2. 3 E X C E P T A N D S P R I N G 2018

SYNCHRONIZATION M O D E R N O P E R A T I N G S Y S T E M S R E A D 2. 3 E X C E P T A N D S P R I N G 2018 SYNCHRONIZATION M O D E R N O P E R A T I N G S Y S T E M S R E A D 2. 3 E X C E P T 2. 3. 8 A N D 2. 3. 1 0 S P R I N G 2018 INTER-PROCESS COMMUNICATION 1. How a process pass information to another process

More information

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13 PROCESS SCHEDULING II CS124 Operating Systems Fall 2017-2018, Lecture 13 2 Real-Time Systems Increasingly common to have systems with real-time scheduling requirements Real-time systems are driven by specific

More information

Performance Throughput Utilization of system resources

Performance Throughput Utilization of system resources Concurrency 1. Why concurrent programming?... 2 2. Evolution... 2 3. Definitions... 3 4. Concurrent languages... 5 5. Problems with concurrency... 6 6. Process Interactions... 7 7. Low-level Concurrency

More information

Operating System Review Part

Operating System Review Part Operating System Review Part CMSC 602 Operating Systems Ju Wang, 2003 Fall Virginia Commonwealth University Review Outline Definition Memory Management Objective Paging Scheme Virtual Memory System and

More information

Processes Prof. James L. Frankel Harvard University. Version of 6:16 PM 10-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved.

Processes Prof. James L. Frankel Harvard University. Version of 6:16 PM 10-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved. Processes Prof. James L. Frankel Harvard University Version of 6:16 PM 10-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved. Process Model Each process consists of a sequential program

More information

Table of Contents 1. OPERATING SYSTEM OVERVIEW OPERATING SYSTEM TYPES OPERATING SYSTEM SERVICES Definition...

Table of Contents 1. OPERATING SYSTEM OVERVIEW OPERATING SYSTEM TYPES OPERATING SYSTEM SERVICES Definition... Table of Contents 1. OPERATING SYSTEM OVERVIEW... 1 Definition... 1 Memory Management... 2 Processor Management... 2 Device Management... 2 File Management... 2 Other Important Activities... 3. OPERATING

More information

Handout. The ARM Instruction Set. Real Time Systems. Real Time Operating Systems. Real Time System Organization. Classification of Real Time Systems

Handout. The ARM Instruction Set. Real Time Systems. Real Time Operating Systems. Real Time System Organization. Classification of Real Time Systems Real Time Systems A system whose behavior is constrained by operational deadlines. Real Time Operating Systems Steven P. Smith Mark McDermott More formally, a real time system is one in which the correctness

More information

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5) Announcements Reading Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) 1 Relationship between Kernel mod and User Mode User Process Kernel System Calls User Process

More information

Lecture 3: Concurrency & Tasking

Lecture 3: Concurrency & Tasking Lecture 3: Concurrency & Tasking 1 Real time systems interact asynchronously with external entities and must cope with multiple threads of control and react to events - the executing programs need to share

More information

Following are a few basic questions that cover the essentials of OS:

Following are a few basic questions that cover the essentials of OS: Operating Systems Following are a few basic questions that cover the essentials of OS: 1. Explain the concept of Reentrancy. It is a useful, memory-saving technique for multiprogrammed timesharing systems.

More information

Priority Based Assignment of Shared resources in RTOS

Priority Based Assignment of Shared resources in RTOS RESEARCH ARTICLE OPEN ACCESS Priority Based Assignment of Shared resources in RTOS Ms. Raana Syeda*, Ms. Manju Ahuja**, Ms. Sneha Khatwani*** Mrs. Swara Pampatwar**** *(Department of Computer Science &

More information

GLOSSARY. VisualDSP++ Kernel (VDK) User s Guide B-1

GLOSSARY. VisualDSP++ Kernel (VDK) User s Guide B-1 B GLOSSARY Application Programming Interface (API) A library of C/C++ functions and assembly macros that define VDK services. These services are essential for kernel-based application programs. The services

More information

Introduction. Real Time Systems. Flies in a bottle. Real-time kernel

Introduction. Real Time Systems. Flies in a bottle. Real-time kernel Introduction eal Time Systems A thread is a light-weight (cheap) process which has low start-up costs, low context switch costs and is intended to come and go easily. Threads are schedulable activities

More information

QUESTION BANK UNIT I

QUESTION BANK UNIT I QUESTION BANK Subject Name: Operating Systems UNIT I 1) Differentiate between tightly coupled systems and loosely coupled systems. 2) Define OS 3) What are the differences between Batch OS and Multiprogramming?

More information

Scheduling. Scheduling 1/51

Scheduling. Scheduling 1/51 Scheduling 1/51 Learning Objectives Scheduling To understand the role of a scheduler in an operating system To understand the scheduling mechanism To understand scheduling strategies such as non-preemptive

More information

Process Coordination and Shared Data

Process Coordination and Shared Data Process Coordination and Shared Data Lecture 26 In These Notes... Sharing data safely When multiple threads/processes interact in a system, new species of bugs arise 1. Compiler tries to save time by not

More information

MARUTHI SCHOOL OF BANKING (MSB)

MARUTHI SCHOOL OF BANKING (MSB) MARUTHI SCHOOL OF BANKING (MSB) SO IT - OPERATING SYSTEM(2017) 1. is mainly responsible for allocating the resources as per process requirement? 1.RAM 2.Compiler 3.Operating Systems 4.Software 2.Which

More information

CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable)

CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable) CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable) Past & Present Have looked at two constraints: Mutual exclusion constraint between two events is a requirement that

More information

Exam Review TexPoint fonts used in EMF.

Exam Review TexPoint fonts used in EMF. Exam Review Generics Definitions: hard & soft real-time Task/message classification based on criticality and invocation behavior Why special performance measures for RTES? What s deadline and where is

More information

(b) External fragmentation can happen in a virtual memory paging system.

(b) External fragmentation can happen in a virtual memory paging system. Alexandria University Faculty of Engineering Electrical Engineering - Communications Spring 2015 Final Exam CS333: Operating Systems Wednesday, June 17, 2015 Allowed Time: 3 Hours Maximum: 75 points Note:

More information

Dealing with Issues for Interprocess Communication

Dealing with Issues for Interprocess Communication Dealing with Issues for Interprocess Communication Ref Section 2.3 Tanenbaum 7.1 Overview Processes frequently need to communicate with other processes. In a shell pipe the o/p of one process is passed

More information

Verification of Real-Time Systems Resource Sharing

Verification of Real-Time Systems Resource Sharing Verification of Real-Time Systems Resource Sharing Jan Reineke Advanced Lecture, Summer 2015 Resource Sharing So far, we have assumed sets of independent tasks. However, tasks may share resources to communicate

More information

Course Syllabus. Operating Systems

Course Syllabus. Operating Systems Course Syllabus. Introduction - History; Views; Concepts; Structure 2. Process Management - Processes; State + Resources; Threads; Unix implementation of Processes 3. Scheduling Paradigms; Unix; Modeling

More information

Lecture Topics. Announcements. Today: Advanced Scheduling (Stallings, chapter ) Next: Deadlock (Stallings, chapter

Lecture Topics. Announcements. Today: Advanced Scheduling (Stallings, chapter ) Next: Deadlock (Stallings, chapter Lecture Topics Today: Advanced Scheduling (Stallings, chapter 10.1-10.4) Next: Deadlock (Stallings, chapter 6.1-6.6) 1 Announcements Exam #2 returned today Self-Study Exercise #10 Project #8 (due 11/16)

More information

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling Uniprocessor Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Three level scheduling 2 1 Types of Scheduling 3 Long- and Medium-Term Schedulers Long-term scheduler Determines which programs

More information