SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Advanced Operating Systems
                                 Lecture notes

                   Dr. Clifford Neuman
                   University of Southern California
                   Information Sciences Institute




Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Administration
         • Class e-mail: csci555@usc.edu
         • Office hours: No office hours today. Dr.
           Neuman is out of town.
         • Reading report #1 will be posted by
           Tuesday
         • Class Web page
                 http://gost.isi.edu/555




Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
CSci555:                                 Advanced Operating Systems
                                                  Lecture 2 – September 1, 2006




                   Dr. Tatyana Ryutov
                   University of Southern California
                   Information Sciences Institute




Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Outline: Communications Models

            • Communication Models:
              – General concepts.
              – Message passing.
              – Distributed shared memory (DSM).
              – Remote procedure call (RPC) [Birrel et al.]
                 ▪ Light-weight RPC [Bershad et al.]
              – DSM case studies
                 ▪ IVY [Li et al.]
                 ▪ Linda [Carriero et al.]

Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Communication Models

             • Support for processes to
               communicate among themselves.
             • Traditional (centralized) OS’s:
                – Provide local (within single
                  machine) communication support.
                – Distributed OS’s: must provide
                  support for communication across
                  machine boundaries.
                   ▪ Over LAN or WAN.
Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Communication Paradigms
      • 2 paradigms
         – Message Passing (MP)
         – Distributed Shared Memory (DSM)
      • Message Passing
         – Processes communicate by sending
           messages.
      • Distributed Shared Memory
         – Communication through a “virtual shared
           memory”.



Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Message Passing
      • Basic communication primitives:
                                                                                                                             Sending Q
        – Send message.                                                                                                       ...
                                                                                            Send

               – Receive message.                                                                                           Receiving Q
                                                                                       Receive                                       ...
      • Modes of communication:
         – Synchronous versus asynchronous.
      • Semantics:
         – Reliable versus unreliable.


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Synchronous Communication

             • Blocking send
                – Blocks until message is transmitted
                – Blocks until message acknowledged
             • Blocking receive
                – Waits for message to be received
             • Process synchronization.




Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Asynchronous Communication
     • Non-blocking send: sending process continues
       as soon message is queued.
     • Blocking or non-blocking receive:
        – Blocking:
           ▪ Timeout.
           ▪ Threads.
        – Non-blocking: proceeds while waiting for
          message.
           ▪ Message is queued upon arrival.
           ▪ Process needs to poll or be interrupted.

Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Reliability of Communication
     • Unreliable communication:
       – “best effort” - send and hope for the best
       – No ACKs or retransmissions.
       – Application must provide its own reliability.
       – Example: User Datagram Protocol (UDP)
          ▪ Applications using UDP either don’t need
            reliability or build their own (e.g., UNIX NFS
            and DNS (both UDP and TCP), some audio
            or video applications)


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Reliability of Communication
     • Reliable communication:
       – Different degrees of reliability.
       – Processes have some guarantee that messages
         will be delivered.
       – Example: Transmission Control Protocol (TCP)
       – Reliability mechanisms:
           ▪ Positive acknowledgments (ACKs).
           ▪ Negative Acknowledgments (NACKs).
       – Possible to build reliability atop unreliable
         service (E2E argument).

Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Distributed Shared Memory

             • Motivated by development of shared-
               memory multiprocessors which do
               share memory.
             • Abstraction used for sharing data
               among processes running on
               machines that do not share memory.
             • Processes think they read from and
               write to a “virtual shared memory”.

Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
DSM 2

             • Primitives: read and write.
             • OS ensures that all processes see all
               updates.
                – Happens transparently to
                  processes.




Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
DSM and MP
     • DSM is an abstraction!
       – Gives programmers the flavor of a centralized
         memory system, which is a well-known
         programming environment.
       – No need to worry about communication and
         synchronization.
     • But, it is implemented atop MP.
       – No physically shared memory.
       – OS takes care of required communication.


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Caching in DSM

             • For performance, DSM caches data locally.
                – More efficient access (locality).
                – But, must keep caches consistent.
                – Caching of pages for of page-based
                  DSM.
             • Issues:
                – Page size.
                – Consistency mechanism.


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Approaches to DSM

             • Hardware-based:
                – Multi-processor architectures with
                  processor-memory modules connected
                  by high-speed LAN (E.g., Stanford’s
                  DASH).
                – Specialized hardware to handle reads
                  and writes and perform required
                  consistency mechanisms.


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Approaches to DSM

             • Page-based:
                – Example: IVY.
                – DSM implemented as region of
                  processor’s virtual memory;
                  occupies same address space
                  range for every participating
                  process.
                – OS keeps DSM data consistency
                  as part of page fault handling.
Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Approaches to DSM

             • Library-based:
                – Or language-based.
                – Example: Linda.
                – Language or language extensions.
                – Compiler inserts appropriate library
                  calls whenever processes access DSM
                  items.
                – Library calls access local data and
                  communicate when necessary.


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
DSM Case Studies: IVY

      • Environment:”loosely coupled”
        multiprocessor.
         – Memory is physically distributed.
         – Memory mapping managers (OS kernel):
                       ▪ Map local memories to shared virtual space.
                       ▪ Local memory as cache of shared virtual space.
                       ▪ Memory reference may cause page fault; page
                         retrieved and consistency handled.




Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
IVY

             • Issues:
                – Read-only versus writable data.
                – Locality of reference.
                – Granularity (1 Kbyte page size).
                  ▪ Bigger pages versus smaller
                    pages.



Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
IVY

             • Memory coherence strategies:
                – Page synchronization
                   ▪ Invalidation
                   ▪ Write broadcast
                – Page ownership
                   ▪ Fixed: page always owned by same
                     processor
                   ▪ Dynamic


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
IVY Page Synchronization
     • Invalidation:
        – On write fault, invalidate all copies; give
          faulting process write access; gets copy of
          page if not already there.
        – Problem: must update page on reads.
     • Write broadcast:
        – On write fault, fault handler writes to all
          copies.
        – Expensive!



Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
IVY Memory Coherence

          • Paper discusses approaches to memory
            coherence in page-based DSM.
             – Centralized: single manager
               residing on a single processor
               managing all pages.
             – Distributed: multiple managers
               on multiple processors managing
               subset of pages.


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
DSM Case Studies: Linda

         • Language-based approach to DSM.
         • Environment:
            – Similar to IVY, ie, loosely coupled
              machines connected via fast
              broadcast bus.
            – Instead of shared address space,
              processes make library calls inserted by
              compiler when accessing DSM.
            – Libraries access local data and
              communicate to maintain consistency.

Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Linda

             • DSM: tuple space.
             • Basic operations:
                – out (data): data added to tuple space.
                – in (data): removes matching data from
                  TS; destructive.
                – read (data): same as “in”, but tuple
                  remains in TS (non-destructive).



Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Linda Primitives: Examples

             • out (“P”, 5, false) : tuple (“P”, 5, false)
               added to TS.
                – “P” : name
                – Other components are data values.
                – Implementation reported on the paper:
                  every node stores complete copy of TS.
                – out (data) causes data to be broadcast
                  to every node.



Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Linda Primitives: Examples

             • in (“P”, int I, bool b): tuple (“P”, 5,
               false) removed from TS.
                – If matching tuple found locally,
                   local kernel tries to delete tuple on
                   all nodes.




Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Remote Procedure Call

             • Builds on MP.
             • Main idea: extend traditional (local)
               procedure call to perform transfer of
               control and data across network.
             • Easy to use: analogous to local calls.
             • But, procedure is executed by a different
               process, probably on a different machine.
             • Fits very well with client-server model.


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
RPC Mechanism
     1. Invoke RPC.
     2. Calling process suspends.
     3. Parameters passed across network to target
        machine.
     4. Procedure executed remotely.
     5. When done, results passed back to caller.
     6. Caller resumes execution.
     Is this synchronous or asynchronous?



Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
RPC Advantages

             • Easy to use.
             • Well-known mechanism.
             • Abstract data type
               – Client-server model.
               – Server as collection of exported
                 procedures on some shared
                 resource.
               – Example: file server.
             • Reliable.
Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
RPC Semantics 1

             • Delivery guarantees.
             • “Maybe call”:
                – Clients cannot tell for sure
                  whether remote procedure was
                  executed or not due to message
                  loss, server crash, etc.
                – Usually not acceptable.


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
RPC Semantics 2

             • “At-least-once” call:
                – Remote procedure executed at
                  least once, but maybe more than
                  once.
                – Retransmissions but no duplicate
                  filtering.
                – Idempotent operations OK; e.g.,
                  reading data that is read-only.
Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
RPC Semantics 3

             • “At-most-once” call
                – Most appropriate for non-idempotent
                  operations.
                – Remote procedure executed 0 or 1 time,
                  ie, exactly once or not at all.
                – Use of retransmissions and duplicate
                  filtering.
                – Example: Birrel et al. implementation.
                    ▪ Use of probes to check if server
                      crashed.

Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
RPC Implementation (Birrel et al.)
                                 Caller                                                                 Callee
                                 User                RPC                                          RPC     Server
            User                 stub                runtime Call                                 runtime stub                       Server
                                                             packet                                rcv                               call
             call                                   xmit                                                   unpk
                                  pck
                                  args
                                                                                                                                     work

                                                                            Result
                                                                                                                            pck
             return              unpk                 rcv                                          xmit                              return
                                                                                                                            result
                                 result

Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
RPC Implementation 2

             • RPC runtime mechanism responsible
               for retransmissions,
               acknowledgments.
             • Stubs responsible for data packaging
               and un-packaging;
                – AKA marshalling and un-
                  marshalling: putting data in form
                  suitable for transmission.
                  Example: Sun’s XDR.
Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Binding
     • How to determine where server is? Which
       procedure to call?
        – “Resource discovery” problem
           ▪ Name service: advertises servers and
             services.
           ▪ Example: Birrel et al. uses Grapevine.
     • Early versus late binding.
        – Early: server address and procedure name
          hard-coded in client.
        – Late: go to name service.


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
Synchronous & Asynchronous RPC

                     Synchronous                                                   Asynchronous
             Client                      Server                                          Client                     Server




Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
RPC Performance
      • Sources of overhead
         – data copying
         – scheduling and context switch.
      • Light-Weight RPC
         – Shows that most invocations took place on a
           single machine.
         – LW-RPC: improve RPC performance
           for local case.
         – Optimizes data copying and thread
           scheduling for local case.


Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
LW-RPC 1

             • Argument copying
                – RPC: 4 times
                – copying between kernel and user
                  space.

                      – LW-RPC: common data area (A-stack)
                        shared by client and server and used to
                        pass parameters and results; access by
                        client or server, one at a time.

Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
LW-RPC 2

     • A-stack avoids copying between kernel
       and user spaces.
     • Client and server share the same thread:
       less context switch (like regular calls).
             user                                                                          4. executes & returns
                    1. copy args
                    2. traps                                            A                  3. upcall
                client                                                                                        server

             kernel
Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE

Weitere ähnliche Inhalte

Was ist angesagt?

Advanced Operating System- Introduction
Advanced Operating System- IntroductionAdvanced Operating System- Introduction
Advanced Operating System- IntroductionDebasis Das
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical ClocksDilum Bandara
 
Distributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionDistributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionSHIKHA GAUTAM
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.Ravi Kumar Patel
 
Concurrency control
Concurrency  controlConcurrency  control
Concurrency controlJaved Khan
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Meghaj Mallick
 
multiprocessors and multicomputers
 multiprocessors and multicomputers multiprocessors and multicomputers
multiprocessors and multicomputersPankaj Kumar Jain
 
Distributed file system
Distributed file systemDistributed file system
Distributed file systemAnamika Singh
 
Concurrency Control Techniques
Concurrency Control TechniquesConcurrency Control Techniques
Concurrency Control TechniquesRaj vardhan
 
Parallel computing and its applications
Parallel computing and its applicationsParallel computing and its applications
Parallel computing and its applicationsBurhan Ahmed
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSKathirvel Ayyaswamy
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process ConceptsMukesh Chinta
 
Concurrency Control in Database Management System
Concurrency Control in Database Management SystemConcurrency Control in Database Management System
Concurrency Control in Database Management SystemJanki Shah
 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemorySHIKHA GAUTAM
 

Was ist angesagt? (20)

Advanced Operating System- Introduction
Advanced Operating System- IntroductionAdvanced Operating System- Introduction
Advanced Operating System- Introduction
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical Clocks
 
Distributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionDistributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock Detection
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
Concurrency control
Concurrency  controlConcurrency  control
Concurrency control
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
 
Mainframe systems
Mainframe systemsMainframe systems
Mainframe systems
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Os Threads
Os ThreadsOs Threads
Os Threads
 
multiprocessors and multicomputers
 multiprocessors and multicomputers multiprocessors and multicomputers
multiprocessors and multicomputers
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Acid properties
Acid propertiesAcid properties
Acid properties
 
Concurrency Control Techniques
Concurrency Control TechniquesConcurrency Control Techniques
Concurrency Control Techniques
 
Parallel computing and its applications
Parallel computing and its applicationsParallel computing and its applications
Parallel computing and its applications
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Concurrency Control in Database Management System
Concurrency Control in Database Management SystemConcurrency Control in Database Management System
Concurrency Control in Database Management System
 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared Memory
 

Andere mochten auch

Andere mochten auch (10)

Complete Operating System notes
Complete Operating System notesComplete Operating System notes
Complete Operating System notes
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Final Exam OS fall 2012-2013 with answers
Final Exam OS fall 2012-2013 with answersFinal Exam OS fall 2012-2013 with answers
Final Exam OS fall 2012-2013 with answers
 
Os Question Bank
Os Question BankOs Question Bank
Os Question Bank
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
 
Operating system notes pdf
Operating system notes pdfOperating system notes pdf
Operating system notes pdf
 
Operating system notes
Operating system notesOperating system notes
Operating system notes
 
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
 

Mehr von Anirudhan Guru

ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. CIVIL ENGINEER...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. CIVIL ENGINEER...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. CIVIL ENGINEER...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. CIVIL ENGINEER...Anirudhan Guru
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...Anirudhan Guru
 
Gate 2013- how to prepare
Gate 2013-  how to prepare Gate 2013-  how to prepare
Gate 2013- how to prepare Anirudhan Guru
 
Electromechanical Energy Conversion ppt 2
Electromechanical Energy Conversion ppt 2Electromechanical Energy Conversion ppt 2
Electromechanical Energy Conversion ppt 2Anirudhan Guru
 
Electromechnical Energy Conversion ppt
Electromechnical Energy Conversion pptElectromechnical Energy Conversion ppt
Electromechnical Energy Conversion pptAnirudhan Guru
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...Anirudhan Guru
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.TECH. INFORMATION T...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.TECH. INFORMATION T...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.TECH. INFORMATION T...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.TECH. INFORMATION T...Anirudhan Guru
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. COMPUTER SCIENCE...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. COMPUTER SCIENCE...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. COMPUTER SCIENCE...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. COMPUTER SCIENCE...Anirudhan Guru
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. AERONAUTICAL E...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. AERONAUTICAL E...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. AERONAUTICAL E...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. AERONAUTICAL E...Anirudhan Guru
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. ELECTRICAL AND...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. ELECTRICAL AND...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. ELECTRICAL AND...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. ELECTRICAL AND...Anirudhan Guru
 

Mehr von Anirudhan Guru (12)

London Olympics 2012
London Olympics 2012London Olympics 2012
London Olympics 2012
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. CIVIL ENGINEER...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. CIVIL ENGINEER...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. CIVIL ENGINEER...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. CIVIL ENGINEER...
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...
 
Gate 2013- how to prepare
Gate 2013-  how to prepare Gate 2013-  how to prepare
Gate 2013- how to prepare
 
Electromechanical Energy Conversion ppt 2
Electromechanical Energy Conversion ppt 2Electromechanical Energy Conversion ppt 2
Electromechanical Energy Conversion ppt 2
 
Electromechnical Energy Conversion ppt
Electromechnical Energy Conversion pptElectromechnical Energy Conversion ppt
Electromechnical Energy Conversion ppt
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. BIOMEDICAL ENGIN...
 
Stickyteaching
StickyteachingStickyteaching
Stickyteaching
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.TECH. INFORMATION T...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.TECH. INFORMATION T...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.TECH. INFORMATION T...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.TECH. INFORMATION T...
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. COMPUTER SCIENCE...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. COMPUTER SCIENCE...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. COMPUTER SCIENCE...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2008 B.E. COMPUTER SCIENCE...
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. AERONAUTICAL E...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. AERONAUTICAL E...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. AERONAUTICAL E...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. AERONAUTICAL E...
 
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. ELECTRICAL AND...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. ELECTRICAL AND...ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. ELECTRICAL AND...
ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R - 2008 B.E. ELECTRICAL AND...
 

Kürzlich hochgeladen

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 

Kürzlich hochgeladen (20)

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

Advanced Operating System Lecture Notes

  • 1. Advanced Operating Systems Lecture notes Dr. Clifford Neuman University of Southern California Information Sciences Institute Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 2. Administration • Class e-mail: csci555@usc.edu • Office hours: No office hours today. Dr. Neuman is out of town. • Reading report #1 will be posted by Tuesday • Class Web page http://gost.isi.edu/555 Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 3. CSci555: Advanced Operating Systems Lecture 2 – September 1, 2006 Dr. Tatyana Ryutov University of Southern California Information Sciences Institute Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 4. Outline: Communications Models • Communication Models: – General concepts. – Message passing. – Distributed shared memory (DSM). – Remote procedure call (RPC) [Birrel et al.] ▪ Light-weight RPC [Bershad et al.] – DSM case studies ▪ IVY [Li et al.] ▪ Linda [Carriero et al.] Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 5. Communication Models • Support for processes to communicate among themselves. • Traditional (centralized) OS’s: – Provide local (within single machine) communication support. – Distributed OS’s: must provide support for communication across machine boundaries. ▪ Over LAN or WAN. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 6. Communication Paradigms • 2 paradigms – Message Passing (MP) – Distributed Shared Memory (DSM) • Message Passing – Processes communicate by sending messages. • Distributed Shared Memory – Communication through a “virtual shared memory”. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 7. Message Passing • Basic communication primitives: Sending Q – Send message. ... Send – Receive message. Receiving Q Receive ... • Modes of communication: – Synchronous versus asynchronous. • Semantics: – Reliable versus unreliable. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 8. Synchronous Communication • Blocking send – Blocks until message is transmitted – Blocks until message acknowledged • Blocking receive – Waits for message to be received • Process synchronization. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 9. Asynchronous Communication • Non-blocking send: sending process continues as soon message is queued. • Blocking or non-blocking receive: – Blocking: ▪ Timeout. ▪ Threads. – Non-blocking: proceeds while waiting for message. ▪ Message is queued upon arrival. ▪ Process needs to poll or be interrupted. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 10. Reliability of Communication • Unreliable communication: – “best effort” - send and hope for the best – No ACKs or retransmissions. – Application must provide its own reliability. – Example: User Datagram Protocol (UDP) ▪ Applications using UDP either don’t need reliability or build their own (e.g., UNIX NFS and DNS (both UDP and TCP), some audio or video applications) Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 11. Reliability of Communication • Reliable communication: – Different degrees of reliability. – Processes have some guarantee that messages will be delivered. – Example: Transmission Control Protocol (TCP) – Reliability mechanisms: ▪ Positive acknowledgments (ACKs). ▪ Negative Acknowledgments (NACKs). – Possible to build reliability atop unreliable service (E2E argument). Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 12. Distributed Shared Memory • Motivated by development of shared- memory multiprocessors which do share memory. • Abstraction used for sharing data among processes running on machines that do not share memory. • Processes think they read from and write to a “virtual shared memory”. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 13. DSM 2 • Primitives: read and write. • OS ensures that all processes see all updates. – Happens transparently to processes. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 14. DSM and MP • DSM is an abstraction! – Gives programmers the flavor of a centralized memory system, which is a well-known programming environment. – No need to worry about communication and synchronization. • But, it is implemented atop MP. – No physically shared memory. – OS takes care of required communication. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 15. Caching in DSM • For performance, DSM caches data locally. – More efficient access (locality). – But, must keep caches consistent. – Caching of pages for of page-based DSM. • Issues: – Page size. – Consistency mechanism. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 16. Approaches to DSM • Hardware-based: – Multi-processor architectures with processor-memory modules connected by high-speed LAN (E.g., Stanford’s DASH). – Specialized hardware to handle reads and writes and perform required consistency mechanisms. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 17. Approaches to DSM • Page-based: – Example: IVY. – DSM implemented as region of processor’s virtual memory; occupies same address space range for every participating process. – OS keeps DSM data consistency as part of page fault handling. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 18. Approaches to DSM • Library-based: – Or language-based. – Example: Linda. – Language or language extensions. – Compiler inserts appropriate library calls whenever processes access DSM items. – Library calls access local data and communicate when necessary. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 19. DSM Case Studies: IVY • Environment:”loosely coupled” multiprocessor. – Memory is physically distributed. – Memory mapping managers (OS kernel): ▪ Map local memories to shared virtual space. ▪ Local memory as cache of shared virtual space. ▪ Memory reference may cause page fault; page retrieved and consistency handled. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 20. IVY • Issues: – Read-only versus writable data. – Locality of reference. – Granularity (1 Kbyte page size). ▪ Bigger pages versus smaller pages. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 21. IVY • Memory coherence strategies: – Page synchronization ▪ Invalidation ▪ Write broadcast – Page ownership ▪ Fixed: page always owned by same processor ▪ Dynamic Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 22. IVY Page Synchronization • Invalidation: – On write fault, invalidate all copies; give faulting process write access; gets copy of page if not already there. – Problem: must update page on reads. • Write broadcast: – On write fault, fault handler writes to all copies. – Expensive! Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 23. IVY Memory Coherence • Paper discusses approaches to memory coherence in page-based DSM. – Centralized: single manager residing on a single processor managing all pages. – Distributed: multiple managers on multiple processors managing subset of pages. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 24. DSM Case Studies: Linda • Language-based approach to DSM. • Environment: – Similar to IVY, ie, loosely coupled machines connected via fast broadcast bus. – Instead of shared address space, processes make library calls inserted by compiler when accessing DSM. – Libraries access local data and communicate to maintain consistency. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 25. Linda • DSM: tuple space. • Basic operations: – out (data): data added to tuple space. – in (data): removes matching data from TS; destructive. – read (data): same as “in”, but tuple remains in TS (non-destructive). Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 26. Linda Primitives: Examples • out (“P”, 5, false) : tuple (“P”, 5, false) added to TS. – “P” : name – Other components are data values. – Implementation reported on the paper: every node stores complete copy of TS. – out (data) causes data to be broadcast to every node. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 27. Linda Primitives: Examples • in (“P”, int I, bool b): tuple (“P”, 5, false) removed from TS. – If matching tuple found locally, local kernel tries to delete tuple on all nodes. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 28. Remote Procedure Call • Builds on MP. • Main idea: extend traditional (local) procedure call to perform transfer of control and data across network. • Easy to use: analogous to local calls. • But, procedure is executed by a different process, probably on a different machine. • Fits very well with client-server model. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 29. RPC Mechanism 1. Invoke RPC. 2. Calling process suspends. 3. Parameters passed across network to target machine. 4. Procedure executed remotely. 5. When done, results passed back to caller. 6. Caller resumes execution. Is this synchronous or asynchronous? Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 30. RPC Advantages • Easy to use. • Well-known mechanism. • Abstract data type – Client-server model. – Server as collection of exported procedures on some shared resource. – Example: file server. • Reliable. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 31. RPC Semantics 1 • Delivery guarantees. • “Maybe call”: – Clients cannot tell for sure whether remote procedure was executed or not due to message loss, server crash, etc. – Usually not acceptable. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 32. RPC Semantics 2 • “At-least-once” call: – Remote procedure executed at least once, but maybe more than once. – Retransmissions but no duplicate filtering. – Idempotent operations OK; e.g., reading data that is read-only. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 33. RPC Semantics 3 • “At-most-once” call – Most appropriate for non-idempotent operations. – Remote procedure executed 0 or 1 time, ie, exactly once or not at all. – Use of retransmissions and duplicate filtering. – Example: Birrel et al. implementation. ▪ Use of probes to check if server crashed. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 34. RPC Implementation (Birrel et al.) Caller Callee User RPC RPC Server User stub runtime Call runtime stub Server packet rcv call call xmit unpk pck args work Result pck return unpk rcv xmit return result result Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 35. RPC Implementation 2 • RPC runtime mechanism responsible for retransmissions, acknowledgments. • Stubs responsible for data packaging and un-packaging; – AKA marshalling and un- marshalling: putting data in form suitable for transmission. Example: Sun’s XDR. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 36. Binding • How to determine where server is? Which procedure to call? – “Resource discovery” problem ▪ Name service: advertises servers and services. ▪ Example: Birrel et al. uses Grapevine. • Early versus late binding. – Early: server address and procedure name hard-coded in client. – Late: go to name service. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 37. Synchronous & Asynchronous RPC Synchronous Asynchronous Client Server Client Server Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 38. RPC Performance • Sources of overhead – data copying – scheduling and context switch. • Light-Weight RPC – Shows that most invocations took place on a single machine. – LW-RPC: improve RPC performance for local case. – Optimizes data copying and thread scheduling for local case. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 39. LW-RPC 1 • Argument copying – RPC: 4 times – copying between kernel and user space. – LW-RPC: common data area (A-stack) shared by client and server and used to pass parameters and results; access by client or server, one at a time. Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE
  • 40. LW-RPC 2 • A-stack avoids copying between kernel and user spaces. • Client and server share the same thread: less context switch (like regular calls). user 4. executes & returns 1. copy args 2. traps A 3. upcall client server kernel Copyright © 1995-2006 Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE