DOC PREVIEW
Berkeley ELENG C249A - An Introduction to Real-Time Operating Systems

This preview shows page 1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16-17-123-124-125-126-127-128-129-130-131-132-133-134-135-136-137-138-139-140-246-247-248-249-250-251-252-253-254-255-256-257-258-259-260-261-262 out of 262 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 262 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

An Introduction to Real-Time Operating Systems and Schedulability AnalysisMarco Di NataleScuola Superiore S. AnnaOutline• Background on Operating Systems• An Introduction to RT Systems• Model-based development of Embedded RT systems– the RTOS in the platform-based design• Scheduling and Resource Management• Schedulability Analysis and Priority Inversion– The Mars Pathfinder case• Implementation issues and standards– OSEKCredits• Paolo Gai (Evidence S.r.l.) – slides on EDF and OSEK• Giuseppe Lipari (Scuola Superiore S. Anna) – slides on OS• Manas Saksena (TimeSys) – examples on blocking time comput.• From Mathworks Simulink and RTW manuals – slides on RT blocksBackground on Operating SystemsFundamentals• Algorithm:– It is the logical procedure to solve a certain problem– It is informally specified a a sequence of elementary steps that an “execution machine” must follow to solve the problem– It is not necessarily expressed in a formal programming language!• Program:– It is the implementation of an algorithm in a programming language– Can be executed several times with different inputs• Process:– An instance of a program that given a sequence of inputs produces a set of outputsOperating System• An operating system is a program that– Provides an “abstraction” of the physical machine– Provides a simple interface to the machine– Each part of the interface is a “service”• An OS is also a resource manager– The OS provides access to the physical resources of a computing machine– The OS provides abstract resources (for example, a file, a virtual page in memory, etc.)Levels of abstractionKim Lisa BillMain Board CPUKeyboardVideo CardNetwork CardPrinterPrinterHard diskOperatingSystemInterface (System API)Virtual Memory Scheduler Virtual File Sys.Device DriverDevice DriverDevice DriverDevice DriverDevice DriverDevice DriverWeb BrowserShell VideogamePrinterDaemonUser LevelProgrammerLevelSystemLevelHW LevelAbstraction mechanisms• Why abstraction?– Programming the HW directly has several drawbacks• It is difficult and error-prone• It is not portable– Suppose you want to write a program that reads a text file from disk and outputs it on the screen• Without a proper interface it is virtually impossible!Abstraction Mechanisms• Application programming interface (API)– Provides a convenient and uniform way to access to one service so that• HW details are hidden to the high level programmer• One application does not depend on the HW• The programmer can concentrate on higher level tasks– Example• For reading a file, linux and many other unix OS provide the open(), read() system calls that, given a “file name” allow to load the data from an external supportthe need for concurrency• there are many reason for concurrency– functional– performance– expressive power• functional– many users may be connected to the same system at the same time• each user can have its own processes that execute concurrently with the processes of the other users– perform many operations concurrently• for example, listen to music, write with a word processor, burn a CD, etc...• they are all different and independent activities• they can be done “at the same time”the need for concurrency (2)• performance– take advantage of blocking time• while some thread waits for a blocking condition, another threadperforms another operation– parallelism in multi-processor machines• if we have a multi-processor machine, independent activities can be carried out on different processors are the same time• expressive power– many control application are inherently concurrent– concurrency support helps in expressing concurrency, making application development simplertheoretical model• a system is a set of concurrent activities– they can be processes or threads• they interact in two ways– they access the hardware resources • processor• disk• memory, etc.– they exchange data• these activities compete for the resources and/or cooperate for some common objectiveProcess• The fundamental concept in any operating system is the “process”– A process is an executing program– An OS can execute many processes at the same time (concurrency)– Example: running a Text Editor and a Web Browser at the same time in the PC• Processes have separate memory spaces– Each process is assigned a private memory space– One process is not allowed to read or write in the memory space of another process– If a process tries to access a memory location not in its space, an exception is raised (Segmentation fault), and the process is terminated– Two processes cannot directly share variablesMemory layout of a ProcessTextInitialized DataBSSStackHeapOther dataContains the process code(machine code)Contains the process code(machine code)Global variables(initialized)Global variables(initialized)Global variables(non initialized)Global variables(non initialized)Stack(variable size)Stack(variable size)Dynamically allocatedmemory(variable size)Dynamically allocatedmemory(variable size)Memory Protection• By default, two processes cannot share their memory– If one process tries to access a memory location outside its space, a processor exception is raised (trap) and the process is terminated– The “Segmentation Fault” error!!TextInitialized DataBSSStackHeapOther dataAny reference to this memory results in a segmentation faultAny reference to this memory results in a segmentation faultProcesses• We can distinguish two aspects in a process• Resource Ownership– A process includes a virtual address space, a process image (code + data)– It is allocated a set of resources, like file descriptors, I/O channels, etc• Scheduling/Execution– The execution of a process follows an ececution path, and generates a trace (sequence of internal states)– It has a state (ready, Running, etc.)– And scheduling parameters (priority, time left in the round, etc.)Multi-threading• Many OS separate these aspects, by providing the concept of thread• The process is the “resource owner”• The thread is the “scheduling entity”– One process can consists of one or more threads– Threads are sometime called (improperly) lightweight processes– Therefore, on process can have many different (and concurrent) traces of execution!Multi-threaded process model• In the multi-threaded process model each


View Full Document

Berkeley ELENG C249A - An Introduction to Real-Time Operating Systems

Documents in this Course
Load more
Download An Introduction to Real-Time Operating Systems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view An Introduction to Real-Time Operating Systems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view An Introduction to Real-Time Operating Systems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?