1 Providing Dynamic Update in an Operating System By Liao,Hsiao-Win Andrew Baumann, Gernot Heiser University of New South Wales & National ICT Australia.

Slides:



Advertisements
Similar presentations
Computing Systems Organization
Advertisements

Memory Protection: Kernel and User Address Spaces  Background  Address binding  How memory protection is achieved.
Autonomic Systems Justin Moles, Winter 2006 Enabling autonomic behavior in systems software with hot swapping Paper by: J. Appavoo, et al. Presentation.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 3 Memory Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Assembler/Linker/Loader Mooly Sagiv html:// Chapter 4.3 J. Levine: Linkers & Loaders
System Programming Mr. M. V. Nikum (B.E.I.T). Introduction What is System? System is the collection of various components Ex:- College is a system What.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement.
Chap 4 Multithreaded Programming. Thread A thread is a basic unit of CPU utilization It comprises a thread ID, a program counter, a register set and a.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Memory Management Questions answered in this lecture: How do processes share memory? What is static relocation? What is dynamic relocation? What is segmentation?
K42: Building a Complete OS Orran Krieger, Marc Auslander, Bryan Rosenburg, Robert Wisniewski, Jimi Xenidis, Dilma Da Silva, Michal Ostrowski, Jonathan.
Tornado: Maximizing Locality and Concurrency in a Shared Memory Multiprocessor Operating System Ben Gamsa, Orran Krieger, Jonathan Appavoo, Michael Stumm.
The Process Model.
1 Enabling autonomic behavior in systems software with hot swapping By J. Appavoo, K. Hui, C. A. N. Soules, R. W. Wisniewski, D. M. Da Silva, O. Krieger,
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Memory Management (II)
03/09/2007CSCI 315 Operating Systems Design1 Memory Management Notice: The slides for this lecture have been largely based on those accompanying the textbook.
CS 104 Introduction to Computer Science and Graphics Problems Operating Systems (4) File Management & Input/Out Systems 10/14/2008 Yang Song (Prepared.
3.5 Interprocess Communication
Run time vs. Compile time
Chapter 3.7 Memory and I/O Systems. 2 Memory Management Only applies to languages with explicit memory management (C or C++) Memory problems are one of.
Memory Management Five Requirements for Memory Management to satisfy: –Relocation Users generally don’t know where they will be placed in main memory May.
1 Supporting Hot-Swappable Components for System Software Kevin Hui, Jonathan Appavoo, Robert Wisniewski, Marc Auslander, David Edelsohn, Ben Gamsa Orran.
Threads. Processes and Threads  Two characteristics of “processes” as considered so far: Unit of resource allocation Unit of dispatch  Characteristics.
Experience with K42, an open- source, Linux-compatible, scalable operation-system kernel IBM SYSTEM JOURNAL, VOL 44 NO 2, 2005 J. Appovoo 、 M. Auslander.
03/05/2008CSCI 315 Operating Systems Design1 Memory Management Notice: The slides for this lecture have been largely based on those accompanying the textbook.
6/10/2005 FastOS PI Meeting/Workshop K42 Internals Dilma da Silva for K42 group IBM TJ Watson Research.
Pattern Abstract Factory
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 4: Threads.
System Calls 1.
CS 6560 Operating System Design Lecture 13 Finish File Systems Block I/O Layer.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Chapter 4: Threads. 4.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Threads A thread (or lightweight process) is a basic unit of CPU.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
© 2004, D. J. Foreman 1 Memory Management. © 2004, D. J. Foreman 2 Building a Module -1  Compiler ■ generates references for function addresses may be.
April 29, 2006DynAMOS -- SMTPS '061 On-the-Fly Kernel Updates for High-Performance Computing Clusters Kristis Makris Arizona State University Kyung Dong.
Chapter 3.5 Memory and I/O Systems. 2 Memory Management Memory problems are one of the leading causes of bugs in programs (60-80%) MUCH worse in languages.
Scheduler Activations: Effective Kernel Support for the User- Level Management of Parallelism. Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska,
The Structure of Processes (Chap 6 in the book “The Design of the UNIX Operating System”)
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
An OBSM method for Real Time Embedded Systems Veronica Eyo Sharvari Joshi.
Memory Management Operating Systems CS550. Memory Manager Memory manager - manages allocation and de-allocation of main memory Plays significant impact.
Multithreaded Programing. Outline Overview of threads Threads Multithreaded Models  Many-to-One  One-to-One  Many-to-Many Thread Libraries  Pthread.
M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young MACH: A New Kernel Foundation for UNIX Development Presenter: Wei-Lwun.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
OpenMP for Networks of SMPs Y. Charlie Hu, Honghui Lu, Alan L. Cox, Willy Zwaenepoel ECE1747 – Parallel Programming Vicky Tsang.
Tornado: Maximizing Locality and Concurrency in a Shared Memory Multiprocessor Operating System Ben Gamsa, Orran Krieger, Jonathan Appavoo, Michael Stumm.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Securing Distributed Systems with Information Flow Control.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 31 Memory Management.
1 Read-Copy Update Paul E. McKenney Linux Technology Center IBM Beaverton Jonathan Appavoo Department.
Processes and Threads MICROSOFT.  Process  Process Model  Process Creation  Process Termination  Process States  Implementation of Processes  Thread.
Saurav Karmakar. Chapter 4: Threads  Overview  Multithreading Models  Thread Libraries  Threading Issues  Operating System Examples  Windows XP.
CS533 Concepts of Operating Systems Jonathan Walpole.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Hello world !!! ASCII representation of hello.c.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Processes Chapter 3. Processes in Distributed Systems Processes and threads –Introduction to threads –Distinction between threads and processes Threads.
Threads prepared and instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University 1July 2016Processes.
Lecture 3 Translation.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Chapter 2: The Linux System Part 4
Memory management.
Chapter 11: File System Implementation
Chapter 12: File System Implementation
Threads CSSE 332 Operating Systems Rose-Hulman Institute of Technology
Programming Models for Distributed Application
Page Replacement.
CSE 451: Operating Systems Winter 2011 Processes
Chapter 4: Threads.
Presentation transcript:

1 Providing Dynamic Update in an Operating System By Liao,Hsiao-Win Andrew Baumann, Gernot Heiser University of New South Wales & National ICT Australia Jonathan Appavoo, Dilma Da Silva, Orran Krieger, Robert W. Wisniewski IBM T.J. Watson Research Center Jeremy Kerr IBM Linux Technology Center

2 Classification for dynamic update  Updates that only affect code, where any data structures remain unchanged across the update.  Updates that affect both code and global, single-instance, data.  Updates that affect multiple-instance data structures.

3 Fundamental Requirements for Dynamic Update  Updatable unit  Safe point  State tracking  State transfer  Redirection of invocations  Version management

4 Dynamic update requirement in K42 ( I )  Updatable unit Hot-swapping object instance Hot-swapping object instance  Safe point Detect quiescent state (generation count mechanism) similar to RCU Detect quiescent state (generation count mechanism) similar to RCU

5 Dynamic update requirement in K42 ( II )  State tracking factory object factory object  State transfer transfer function ( intermediate format ) transfer function ( intermediate format )  Redirection of invocations object translation table object translation table  Version management Version numbers on factory objects Version numbers on factory objects

6 Dynamic Update Implementation  Module loader  Factory mechanism  Steps in a dynamic update

7 Module loader  Consist of Object in kernel that allocates pinned memory in the kernel text area and a trusted user-space program that access to kernel’s symbol table  Perform the relocations and symbol table management at user-level, and leave only the space allocator object in the kernel

8 Factory mechanism  Use the factory design pattern  Factory object provides an interface for creating and destroying objects of one particular class, and maintains the set of objects that it has created.  The majority of the factory implementation is factored out using inheritance and preprocessor macros.

9 Factory object

10 Example of Factory mechanism ProcessReplicated::Create( ProcessReplicated::Create( ProcessRef &out, HATRef h, PMRef pm, ProcessRef &out, HATRef h, PMRef pm, ProcessRef creator, const char *name); ProcessRef creator, const char *name); This leads to problems for dynamic update This leads to problems for dynamic update → Create call is bound at compile-time, and cannot easily be redirected to an updated implementation of the ProcessReplicated object → Create call is bound at compile-time, and cannot easily be redirected to an updated implementation of the ProcessReplicated object → we rely on the caller of this method to track the newly created instance → we rely on the caller of this method to track the newly created instance

11 Example of Factory mechanism DREF_FACTORY_DEFAULT(ProcessRe plicated)->create(...); DREF_FACTORY_DEFAULT(ProcessRe plicated)->create(...); But where (...) represents the arguments as before. But where (...) represents the arguments as before.

12 Example of Factory mechanism (*ProcessReplicated::Factory::factoryRef) (*ProcessReplicated::Factory::factoryRef) ->create(...); ->create(...); Using a factory reference allows us to hot-swap the factory itself. Using a factory reference allows us to hot-swap the factory itself.

13 Steps in a dynamic update

14 Steps in a dynamic update Before update, the old factory tracks instances of a class

15 Steps in a dynamic update Instantiate a new factory for the updated class

16 Steps in a dynamic update Hot-swap old factory with its replacement (transferring set of instances)

17 Steps in a dynamic update New instantiations handled by the updated factory

18 Steps in a dynamic update Hot-swap each old instance to updated replacement (in parallel on each CPU)

19 Steps in a dynamic update Destroy old factory

20 Experiments  All the experiments were conducted on an IBM pSeries 630 Model 6E4 system, with four 1.2GHz POWER4+ processors and 8GB of main memory.  Each test was repeated 10,000 times  The total time measured using the processor’s cycle counter.

21 Overhead of factory mechanism  Microbenchmarks for creation cost using factories:  No noticeable performance degradation on system throughput, as measured by a version of SPEC SDET

22 The end The end