8.
1-MULTIPROCESSORS SYSTEMS
• 8.1.1 Multiprocessors hardware
• 8.1.2 Multiprocessors operation system types
• 8.1.3 Multiprocessors Synchronization
• 8.1.4 Multiprocessors scheduling
8.1.1- Multiprocessors hardware
UMA Multiprocessors with Bus-Based Architectures
UMA Multiprocessor using a crossbar switch
UMA multiprocessors using multistage switching
networks can be built from 2x2 switches
8.1.2 Multiprocessors operating system types
bus
Each CPU has its own operating system
Bus
Master-Slave multiprocessors
bus
Symmetric Multiprocessors
8.1.3 Multiprocessors Synchronization
TSL instruction can fail if bus already locked
Multiple locks used to avoid cache thrashing
8.1.4 Multiprocessors scheduling
Timesharing
note use of single data structure for
scheduling
Space sharing
multiple threads at same time across multiple
CPUs
Problem with communication between two threads
both belong to process A
both running out of phase
Gang Scheduling
8.2 MULTICOMPUTERS
• 8.2.1 Multicomputer Hardware
• 8.2.2 Low-Level Communication Software
• 8.2.3 User-Level Communication Software
• 8.2.4 Remote Procedure Call
• 8.2.5 Distributed Shared Memory
• 8.2.6 Multicomputer Scheduling
• 8.2.7 Load Balancing
8.2.1 Multicomputer Hardware
Definition:
Tightly-coupled CPUs that do not share memory
Also known as
cluster computers
clusters of workstations (COWs)
Multicomputer Hardware
• Interconnection topologies
(a) single switch (D) DOUBLE
(b) ring TORUS
(c) grid (E) CUBE
(F) HYPERCUBE
Multicomputer Hardware
NETWORK INTERFACE BOARDS IN A MULTICOMPUTER
8.2.2 Low-Level Communication Software
If several processes running on node
_ need network access to send packets …
Map interface board to all process that need it
If kernel needs access to network …
Use two network boards
_ one to user space, one to kernel
8.2.2 Low-Level Communication Software
NODE TO NETWORK INTERFACE COMMUNICATION
• USE SEND & RECEIVE RINGS
• COORDINATES MAIN CPU WITH ON-BOARD CPU
8.2.3 User Level Communication Software
(a) Blocking send call
Minimum services
provided
_ send and receive
commands
Theseare blocking
(synchronous) calls
(b) Nonblocking send call
8.2.4 Remote Procedure Call
Steps in making a remote procedure call
the stubs are shaded gray
Remote Procedure Call
Implementation Issues
Cannot pass pointers
call by reference becomes copy-restore (but might fail)
Weakly typed languages
client stub cannot determine size
Not always possible to determine parameter types
Cannot use global variables
may get moved to remote machine
8.2.5 Distributed Shared Memory
Note layers where it can be implemented
hardware
operating system
user-level software
Distributed Shared Memory
Replication
(a) Pages distributed on 4
machines
(b) CPU 0 reads page 10
(c) CPU 1 reads page 10
Distributed Shared Memory
False Sharing
Must also achieve sequential consistency
8.2.6 Multicomputer Scheduling
Multicomputer scheduling is somewhat similar to multiprocessor scheduling, but not
all of the former’s algorithms apply to the latter. The simplest multiprocessor
algorithm—maintaining a single central list of ready processes—does not work
however, since each process can only run on the CPU it is currently located on.
However, when a new process is created, a choice can be made where to place it, for
example to balance the load
8.2.7 Load Balancing
Process
Graph-theoretic deterministic algorithm
Load Balancing
Sender-initiated distributed heuristic algorithm
overloaded sender
Load Balancing
Receiver-initiated distributed heuristic algorithm
under loaded receiver
8.4 DISTRIBUTED SYSTEMS
• Network Hardware
• Network Services and Protocols
• Document-Based Middleware
• File-System-Based Middleware
• Object-Based Middleware
• Coordination-Based Middleware
What is a Distributed System?
-Definition: a distributed system is one in which components
located at networked computers communicate and coordinate
their action only by passing messages.
8.4.4 File-System-Based
Middleware
Transfer Models
The Directory Hierarchy
Naming Transparency
Semantics of File Sharing
File System-Based Middleware
Transfer Models
(a) upload/download model
(b) remote access model
(b)
(a)
File System-Based Middleware
The Directory Hierarchy
File System-Based Middleware
Naming Transparency
(b) Clients have same view of file system
(c) Alternatively, clients with different view
File System-Based Middleware
Semantics of File sharing
(a) single processor gives sequential consistency
(b) distributed system may return obsolete value
8.4.5 Object-Based Middleware
CORBA (Common Object Request Broker Architecture)
Corba’s object : ORBs (Object Request Brokers)
Corba’s Program : IDL (Interface Definition Language)
Corba’s first version : HOP (Internet InterOrb Protocol).
8.4.6 Coordination-Based
Middleware
Linda
Tuple
Publish/Subscribe
Jini
Coordination-Based Middleware
Linda
independent processes
communicate via abstract tuple space
Tuple
like a structure in C, record in Pascal
Coordination-Based Middleware
Publish-Subscribe
architecture
Coordination-Based Middleware
Jini - based on Linda model
devices plugged into a network
offer, use services
Jini Methods
1. read
2. write
3. take
4. notify