© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Processes and operating systems zInterprocess communication. zOperating system performance.

Slides:



Advertisements
Similar presentations
1 Interprocess Communication 1. Ways of passing information 2. Guarded critical activities (e.g. updating shared data) 3. Proper sequencing in case of.
Advertisements

© 2004 Wayne Wolf Topics Task-level partitioning. Hardware/software partitioning.  Bus-based systems.
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Processes and operating systems zScheduling policies: yRMS; yEDF. zScheduling modeling.
CAS3SH3 Midterm Review. The midterm 50 min, Friday, Feb 27 th Materials through CPU scheduling closed book, closed note Types of questions: True & False,
© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. CPUs CPU performance CPU power consumption. 1.
Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.
Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
Big Picture Lab 4 Operating Systems Csaba Andras Moritz.
© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Multiprocessors zWhy multiprocessors? zCPUs and accelerators. zMultiprocessor performance.
Chapter 2: Processes Topics –Processes –Threads –Process Scheduling –Inter Process Communication (IPC) Reference: Operating Systems Design and Implementation.
Avishai Wool lecture Introduction to Systems Programming Lecture 4 Inter-Process / Inter-Thread Communication.
Concurrent Processes Lecture 5. Introduction Modern operating systems can handle more than one process at a time System scheduler manages processes and.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
1 Last Class: Introduction Operating system = interface between user & architecture Importance of OS OS history: Change is only constant User-level Applications.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
RTOS Design & Implementation Swetanka Kumar Mishra & Kirti Chawla.
1 Race Conditions/Mutual Exclusion Segment of code of a process where a shared resource is accessed (changing global variables, writing files etc) is called.
Operating Systems CSE 411 CPU Management Sept Lecture 11 Instructor: Bhuvan Urgaonkar.
General What is an OS? What do you get when you buy an OS? What does the OS do? What are the parts of an OS? What is the kernel? What is a device.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Real Time Operating Systems Lecture 10 David Andrews
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Processes and operating systems zPriority-driven scheduling zScheduling policies: yRMS; yEDF. zInterprocess communication. zOperating system performance.
© 2000 Morgan Kaufman Overheads for Computers as Components Processes and operating systems zMotivation for processes. zThe process abstraction. zContext.
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Scheduling Lecture 6. What is Scheduling? An O/S often has many pending tasks. –Threads, async callbacks, device input. The order may matter. –Policy,
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
© 2000 Morgan Kaufman Overheads for Computers as Components Processes and operating systems  Operating systems.
© 2000 Morgan Kaufman Overheads for Computers as Components Processes and operating systems Operating systems. 1.
Processes Introduction to Operating Systems: Module 3.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
© 2000 Morgan Kaufman Overheads for Computers as Components Processes and operating systems zScheduling policies: yRMS; yEDF. zScheduling modeling assumptions.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
© 2000 Morgan Kaufman Overheads for Computers as Components Accelerators zAccelerated systems. zSystem design: yperformance analysis; yscheduling and.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
© 2000 Morgan Kaufman Overheads for Computers as Components Processes and operating systems zScheduling policies: yRMS; yEDF. zScheduling modeling assumptions.
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.
UDI Technology Benefits Slide 1 Uniform Driver Interface UDI Technology Benefits.
CSC 660: Advanced Operating SystemsSlide #1 CSC 660: Advanced OS Synchronization.
Low Overhead Real-Time Computing General Purpose OS’s can be highly unpredictable Linux response times seen in the 100’s of milliseconds Work around this.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Big Picture Lab 4 Operating Systems C Andras Moritz
1.3 Operating system services An operating system provide services to programs and to the users of the program. It provides an environment for the execution.
EC6703 EMBEDDED AND REAL TIME SYSTEMS
Threads and Data Sharing
HW & Systems: Operating Systems IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, October 22, 2013 Carolyn Seaman University of Maryland, Baltimore.
Processes and operating systems
Ch4 Process and Operating System
Coordination Lecture 5.
Processes and operating systems
Processes and operating systems
Overheads for Computers as Components 2nd ed.
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Processes and operating systems
Department of Computer Science
Presentation transcript:

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Processes and operating systems zInterprocess communication. zOperating system performance. zPower management.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Interprocess communication zOS provides interprocess communication mechanisms: yvarious efficiencies; ycommunication power.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Interprocess communication zInterprocess communication (IPC): OS provides mechanisms so that processes can pass data. zTwo types of semantics: yblocking: sending process waits for response; ynon-blocking: sending process continues.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. IPC styles zShared memory: yprocesses have some memory in common; ymust cooperate to avoid destroying/missing messages. zMessage passing: yprocesses send messages along a communication channel---no common address space.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Shared memory zShared memory on a bus: CPU 1CPU 2 memory

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Race condition in shared memory zProblem when two CPUs try to write the same location: yCPU 1 reads flag and sees 0. yCPU 2 reads flag and sees 0. yCPU 1 sets flag to one and writes location. yCPU 2 sets flag to one and overwrites location.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Atomic test-and-set zProblem can be solved with an atomic test-and-set: ysingle bus operation reads memory location, tests it, writes it. zARM test-and-set provided by SWP: ADR r0,SEMAPHORE LDR r1,#1 GETFLAG SWP r1,r1,[r0] BNZ GETFLAG

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Critical regions zCritical region: section of code that cannot be interrupted by another process. zExamples: ywriting shared memory; yaccessing I/O device.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Semaphores zSemaphore: OS primitive for controlling access to critical regions. zProtocol: yGet access to semaphore with P(). yPerform critical region operations. yRelease semaphore with V().

© 2008 Wayne Wolf Overheads for Computers as Components Message passing zMessage passing on a network: CPU 1CPU 2 message

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Process data dependencies zOne process may not be able to start until another finishes. zData dependencies defined in a task graph. zAll processes in one task run at the same rate. P1P2 P3 P4

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Signals in UML zMore general than Unix signal---may carry arbitrary data: > aSig p : integer someClass sigbehavior() >

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Evaluating RTOS performance zSimplifying assumptions: yContext switch costs no CPU time,. yWe know the exact execution time of processes. yWCET/BCET don’t depend on context switches.

Scheduling and context switch overhead ProcessExecution time deadline P135 P2310 © 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. With context switch overhead of 1, no feasible schedule. 2TP1 + TP2 = 2*(1+3)+(1_3)=11

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Process execution time zProcess execution time is not constant. zExtra CPU time can be good. zExtra CPU time can also be bad: yNext process runs earlier, causing new preemption.

© 2008 Wayne Wolf Overheads for Computers as Components Processes and caches zProcesses can cause additional caching problems. yEven if individual processes are well- behaved, processes may interfere with each other. zWorst-case execution time with bad behavior is usually much worse than execution time with good cache behavior.

Effects of scheduling on the cache ProcessWCETAvg. CPU time P186 P243 P343 © 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Schedule 1 (LRU cache): Schedule 2 (half of cache reserved for P1):

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Power optimization zPower management: determining how system resources are scheduled/used to control power consumption. zOS can manage for power just as it manages for time. zOS reduces power by shutting down units. yMay have partial shutdown modes.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Power management and performance zPower management and performance are often at odds. zEntering power-down mode consumes yenergy, ytime. zLeaving power-down mode consumes yenergy, ytime.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Simple power management policies zRequest-driven: power up once request is received. Adds delay to response. zPredictive shutdown: try to predict how long you have before next request. yMay start up in advance of request in anticipation of a new request. yIf you predict wrong, you will incur additional delay while starting up.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Probabilistic shutdown zAssume service requests are probabilistic. zOptimize expected values: ypower consumption; yresponse time. zSimple probabilistic: shut down after time T on, turn back on after waiting for T off.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Advanced Configuration and Power Interface zACPI: open standard for power management services. Hardware platform device drivers ACPI BIOS OS kernel applications power management

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. ACPI global power states zG3: mechanical off zG2: soft off xS1: low wake-up latency with no loss of context xS2: low latency with loss of CPU/cache state xS3: low latency with loss of all state except memory xS4: lowest-power state with all devices off zG1: sleeping state zG0: working state