Operating Systems 1
CS 241
Spring 2021
By
Marwa M. A. Elfattah
Main Reference
Operating System Concepts, Abraham Silbrschatz,
10th Edition
Introduction
Abstract View of Computer Systems Components
Computer system mainly has four components:
• Hardware – provides basic computing resources
CPU, memory, I/O devices
Abstract View of Computer Systems Components
Computer system mainly has four components:
• Users
People, machines, other computers
Abstract View of Computer Systems Components
Computer system mainly has four components:
• Application programs – define the ways in which
the system resources are used to solve the
computing problems of the users
Abstract View of Computer Systems Components
Computer system mainly has four components:
• Operating System - A program that acts as an
intermediary between a user and the computer
hardware
What Do Operating Systems Do??
You buy a new computer, with more processors
and memory than the last one. But you don’t have
to get all new software – the OS is the same, the
apps are the same, but the system runs faster.
How does it do that??
Ifone user writes a buggy app, you don’t want it to
crash the system for everyone else. How is that
even possible??
How can multiple programs run simultaneously??
It is the Operating System
What Operating Systems Do
An operating system is similar to a government. It
simply provides an environment within which other
programs can do useful work.
• It is a resource allocator:
Manages all resources
Decides between conflicting requests for
efficient and fair resource use
• It is a control program
Controls execution of programs to prevent
errors and improper use of the computer
What Operating Systems Do
Depends on the point of view
Users want convenience, ease of use, security and
good performance
But shared computer must keep all users happy
• Operating system is a resource allocator
Mobile devices are resource poor, optimized for
usability and battery life
Some computers have little or no user interface,
such as embedded computers in devices and
automobiles
• Run primarily without user intervention
An Overview of
Computer System
Structure
Computer System Organization
One or more CPUs, device controllers connect
through common bus providing access to shared
memory.
Concurrent execution of CPUs and devices
competing for memory.
Computer System Organization
I/O devices and the CPU can execute concurrently
Each device controller is in charge of a particular
device type
Each device controller has a local buffer
Computer System Organization
Each device controller type has an operating system
device driver to manage it
I/O is from the device to local buffer of controller
Computer System Organization
CPU moves data from/to main memory to/from local
buffers
Device controller informs CPU that it has finished its
operation by causing an interrupt
Computer System Architecture
Single processor systems
Multiprocessor systems
Clustered systems
Single Processor System
Use a single general-purpose processor
• It is capable of executing a general-purpose
instruction set, including instructions from
processes.
Most systems have special-purpose processors as
well
• For example, a disk-controller microprocessor
receives a sequence of requests from the main
CPU core and implements its own disk queue
and scheduling algorithm. This arrangement
relieves the main CPU of the overhead of disk
scheduling.
Multiprocessors System
Systems have two (or more) processors, each with
a single-core CPU - known as parallel systems,
tightly-coupled systems
The core is the component that executes instructions
and registers for storing data locally.
share the computer bus and clock, memory, and
peripherals
Increase the throughput
The speed-up ratio with N processors is less than N.
» When multiple processors cooperate on a task, a certain
amount of overhead is incurred in keeping all the parts
working correctly.
» Plus competition for shared resources overhead.
Multiprocessors System
The definition of multiprocessor has evolved over
time and now includes multicore systems,
Multiple computing cores reside on a single chip.
Multicore systems can be more efficient than multiple chips
with single cores because on-chip communication is faster
than between-chip communication.
A multicore processor with N cores appears to the operating
system as N standard CPUs.
Multiprocessors Systems
Multiprocessing A dual-core with two cores
architecture with two on the same chip
processing chips
Multiprocessor systems
Too many CPUs, the system bus becomes a
bottleneck and performance begins to degrade.
Alternatively, provide each CPU (or group of CPUs)
with its own local memory that is accessed via a
small, fast local bus.
– The CPUs are
connected by a shared
system interconnect
– This approach known
a non-uniform
memory access, or
NUMA
Clustered Systems
Like multiprocessor systems, but multiple systems
working together
• Usually sharing storage via a storage-area
network (SAN)
Clustered Systems
Provides a high-availability service which survives
failures
Also provides high-performance computing (HPC)
• Applications must be written to use parallelization
A View of Operating System Services
Why Study Operating Systems?
Simply because,
Understanding the fundamentals of operating
systems, how they drive computer hardware, and
what they provide to applications is not only
essential to those who program them but also
highly useful to those who write programs on them
and use them.
As almost all code runs on top of an operating
system, knowledge of how operating systems
work is crucial to proper, efficient, effective, and
secure programming.
Thank You