Symmetric
Multiprocessing (SMP)
Term that refers to a computer hardware architecture and also
to the OS behavior that exploits that architecture
Several processes can run in parallel
Multiple processors are transparent to the user
these processors share same main memory and I/O
facilities
all processors can perform the same functions
The OS takes care of scheduling of threads or processes on
individual processors and of synchronization among
processors
Scheduling and
Resource Management
Keyresponsibility of an OS is managing
resources
Resource allocation policies must consider:
fairness
efficiency
differential
responsiveness
Different Architectural
Approaches
Demands on operating systems require new
ways of organizing the OS
Different approaches and design elements have been tried:
• Microkernel architecture
• Multithreading
• Symmetric multiprocessing
• Distributed operating systems
• Object-oriented design
Microkernel Architecture
Assigns only a few essential functions to the
kernel:
interprocess
address basic
communication
spaces scheduling
(IPC)
The approach:
is well suited to a
simplifies provides
distributed
implementation flexibility
environment
Technique in which a process, executing an application, is
divided into threads that can run concurrently
Thread
• dispatchable unit of work
• includes a processor context and its own data area to enable subroutine
branching
• executes sequentially and is interruptible
Process
• a collection of one or more threads and associated system resources
• programmer has greater control over the modularity of the application and the
timing of application related events
SMP Advantages
more than one process can be
Performance running simultaneously, each on a
different processor
failure of a single process does not
Availability halt the system
Incremental performance of a system can be
enhanced by adding an
Growth additional processor
vendors can offer a range of products
Scaling based on the number of processors
configured in the system
Virtualization
enables a single PC or server to simultaneously run multiple
operating systems or multiple sessions of a single OS
a machine can host numerous applications, including those
that run on different operating systems, on a single platform
host operating system can support a number
of virtual machines (VM)
each has the characteristics of a particular
OS and, in some versions of virtualization,
the characteristics of a particular hardware
platform
Virtual
Memory
Concept
Process perspective:
• the machine on which it executes consists of the virtual memory space assigned
to the process
• the processor registers it may use
• the user-level machine instructions it may execute
• OS system calls it may invoke for I/O
• ABI defines the machine as seen by a process
Application perspective:
• machine characteristics are specified by high-level language capabilities and OS
system library calls
• API defines the machine for an application
OS perspective:
• processes share a file system and other I/O resources
• system allocates real memory and I/O resources to the processes
• ISA provides the interface between the system and machine
Process and System Virtual Machines
Process and System Virtual Machines
Symmetric Multiprocessor
OS Considerations
A multiprocessor OS must provide all the functionality of a multiprogramming
system plus additional features to accommodate multiple processors
Key design issues:
Simultaneous Scheduling Memory Reliability
concurrent Synchronization
management and fault
processes or tolerance
any
threads with multiple the reuse of
processor
may perform active processes physical
kernel routines having potential pages is the the OS
need to be scheduling,
which access to shared biggest should
reentrant to address spaces problem of provide
allow several complicates
the task of or shared I/O concern graceful
processors to resources, care degradation
execute the enforcing a
scheduling must be taken to in the face of
same kernel provide effective processor
code policy
synchronization failure
simultaneously
Kernel-Mode Components
of Windows
Executive
contains the core OS services
Kernel
controls execution of the processors
Hardware Abstraction Layer (HAL)
maps between generic hardware commands and responses and those
unique to a specific platform
Device Drivers
dynamic libraries that extend the functionality of the Executive
Windowing and Graphics System
implements the GUI functions
User-Mode Processes
Four basic types are supported by Windows:
Special System • user-mode services needed to manage the system
Processes
• the printer spooler, event logger, and user-mode components that
Service Processes cooperate with device drivers, and various network services
Environment • provide different OS personalities (environments)
Subsystems
• executables (EXEs) and DLLs that provide the functionality users
User Applications run to make use of the system
Windows OS services, Advantages:
environmental subsystems,
and applications are all it simplifies the Executive
structured using the it improves reliability
client/server model
it provides a uniform
Common in distributed means for applications to
systems, but can be used communicate with
internal to a single system services via RPCs
without restricting
Processes communicate flexibility
via RPC it provides a suitable base
for distributed computing
Two important characteristics of Windows are its support for
threads and for symmetric multiprocessing (SMP)
OS routines can run on any available processor, and different routines can
execute simultaneously on different processors
Windows supports the use of multiple threads of execution within a single
process. Multiple threads within the same process may execute on different
processors simultaneously
Server processes may use multiple threads to process requests from more
than one client simultaneously
Windows provides mechanisms for sharing data and resources between
processes and flexible interprocess communication capabilities
Windows Objects
Windows draws heavily on the concepts of object-
oriented design
Key object-oriented concepts used by Windows
are:
Object
Encapsulation class and Inheritance Polymorphism
instance
Changes and improvements:
Engineering improvements
the system is now built in layers which can be separately tested
Performance improvements
amount of memory required has been reduced
Reliability improvements
user-mode heap is more tolerant of memory allocation errors by
C/C++ programmers
Energy efficiency
many improvements have been made
Security
BitLocker is now easier to set up and use
Thread improvements
can support hundreds of CPUs
Dynamic Fair Share Scheduling (DFSS)