Chapter 1: Introduction
Operating System Concepts – 10h Edition Silberschatz, Galvin and Gagne ©2018
Objectives
▪ Describe the general organization of a computer system and the role
of interrupts
▪ Describe the components in a modern, multiprocessor computer
system
▪ Illustrate the transition from user mode to kernel mode
▪ Discuss how operating systems are used in various computing
environments
▪ Provide examples of free and open-source operating systems
Operating System Concepts – 10th Edition 1.2 Silberschatz, Galvin and Gagne ©2018
What is an Operating System?
▪ A program that acts as an intermediary between a user of a
computer and the computer hardware
▪ Operating system goals:
• Execute user programs and make solving user problems
easier
• Make the computer system convenient to use
• Use the computer hardware in an efficient manner
Operating System Concepts – 10th Edition 1.3 Silberschatz, Galvin and Gagne ©2018
Computer System Structure
▪ Computer system can be divided into four components:
• Hardware – provides basic computing resources
CPU, memory, I/O devices
• Operating system
Controls and coordinates use of hardware among various
applications and users
• Application programs – define the ways in which the system
resources are used to solve the computing problems of the users
Word processors, compilers, web browsers, database systems,
video games
• Users
People, machines, other computers
Operating System Concepts – 10th Edition 1.4 Silberschatz, Galvin and Gagne ©2018
Abstract View of Components of Computer
Operating System Concepts – 10th Edition 1.5 Silberschatz, Galvin and Gagne ©2018
Overview of Computer System Structure
Operating System Concepts – 10th Edition 1.6 Silberschatz, Galvin and Gagne ©2018
Computer System Organization
▪ Computer-system operation
• One or more CPUs, device controllers connect through common
bus providing access to shared memory
Operating System Concepts – 10th Edition 1.7 Silberschatz, Galvin and Gagne ©2018
Computer-System Operation
▪ I/O devices and the CPU can execute concurrently
▪ Each device controller type has an operating system device driver
to manage it
▪ Device controller informs CPU that it has finished its operation by
causing an interrupt
▪ The interrupt is a signal that prompts the operating system to stop
work on one process and start work on another.
Operating System Concepts – 10th Edition 1.8 Silberschatz, Galvin and Gagne ©2018
Storage Structure
Operating System Concepts – 10th Edition 1.9 Silberschatz, Galvin and Gagne ©2018
Storage Structure
▪ Main memory – only large storage media that the CPU can access
directly
• Random access
• Typically volatile
▪ Secondary storage – extension of main memory that provides large
nonvolatile storage capacity
▪ Hard Disk Drives (HDD) – rigid metal or glass platters covered
with magnetic recording material
▪ Non-volatile memory (NVM) devices– faster than hard disks,
nonvolatile
• Becoming more popular as capacity and performance increases,
price drops
Operating System Concepts – 10th Edition 1.10 Silberschatz, Galvin and Gagne ©2018
Storage Hierarchy
▪ Storage systems organized in hierarchy
• Speed
• Cost
• Volatility
▪ Caching – copying information into faster storage system; main
memory can be viewed as a cache for secondary storage
▪ Device Driver for each device controller to manage I/O
• Provides uniform interface between controller and kernel
Operating System Concepts – 10th Edition 1.11 Silberschatz, Galvin and Gagne ©2018
Storage-Device Hierarchy
Operating System Concepts – 10th Edition 1.12 Silberschatz, Galvin and Gagne ©2018
Multiprogramming
▪ Multiprogramming organizes jobs (code and data) so
CPU always has one to execute
▪ When job has to wait (for I/O for example), OS
switches to another job
Operating System Concepts – 10th Edition 1.13 Silberschatz, Galvin and Gagne ©2018
Multitasking
• Response time should be < 1 second
• Each user has at least one program executing in memory
process
• If several jobs ready to run at the same time CPU
scheduling
• If processes don’t fit in memory, swapping moves them in and
out to run
• Virtual memory allows execution of processes not completely
in memory
Operating System Concepts – 10th Edition 1.14 Silberschatz, Galvin and Gagne ©2018
Dual-mode Operation
▪ Dual-mode operation allows OS to protect itself and other system
components
• User mode and kernel mode
▪ Mode bit provided by hardware
• Provides ability to distinguish when system is running user code
or kernel code.
• When a user is running mode bit is “user”
• When kernel code is executing mode bit is “kernel”
Operating System Concepts – 10th Edition 1.15 Silberschatz, Galvin and Gagne ©2018
Process Management
▪ A process is a program in execution.
▪ Program is a passive entity; process is an active entity.
▪ Process needs resources to accomplish its task
• CPU, memory, I/O, files
▪ Process termination requires reclaim of any reusable resources
Operating System Concepts – 10th Edition 1.16 Silberschatz, Galvin and Gagne ©2018
Memory Management
▪ To execute a program all (or part) of the instructions must be in
memory
▪ All (or part) of the data that is needed by the program must be in
memory
▪ Memory management determines what is in memory and when
• Optimizing CPU utilization and computer response to users
▪ Memory management activities
• Keeping track of which parts of memory are currently being used
and by whom
• Deciding which processes (or parts thereof) and data to move into
and out of memory
• Allocating and deallocating memory space as needed
Operating System Concepts – 10th Edition 1.17 Silberschatz, Galvin and Gagne ©2018
Protection and Security
▪ Protection – any mechanism for controlling access of processes or
users to resources defined by the OS
▪ Security – defense of the system against internal and external attacks
▪ Systems generally first distinguish among users, to determine who
can do what
• User identities (user IDs, security IDs) include name and
associated number, one per user
• Group identifier (group ID) allows set of users to be defined and
controls managed, then also associated with each process, file
• Privilege escalation allows user to change to effective ID with
more rights
Operating System Concepts – 10th Edition 1.18 Silberschatz, Galvin and Gagne ©2018
Virtualization
▪ Allows operating systems to run applications within other OSes
• Vast and growing industry
▪ Virtualization – OS natively compiled for CPU, running guest OSes
also natively compiled
• Consider VMware running WinXP guests, each running
applications, all on native WinXP host OS
• VMM (virtual machine Manager) provides virtualization services
Operating System Concepts – 10th Edition 1.19 Silberschatz, Galvin and Gagne ©2018
Distributed Systems
▪ Collection of separate, possibly heterogeneous, systems networked
together
• Network is a communications path, TCP/IP most common
Local Area Network (LAN)
Wide Area Network (WAN)
Metropolitan Area Network (MAN)
Personal Area Network (PAN)
Operating System Concepts – 10th Edition 1.20 Silberschatz, Galvin and Gagne ©2018
Computer System Architecture
Operating System Concepts – 10th Edition 1.21 Silberschatz, Galvin and Gagne ©2018
Computer-System Architecture
▪ Most systems use a single general-purpose processor
• Most systems have special-purpose processors as well
▪ Multiprocessors systems growing in use and importance
• Two types:
1. Asymmetric Multiprocessing – each processor is assigned
a specific task.
2. Symmetric Multiprocessing – each processor performs all
tasks
Operating System Concepts – 10th Edition 1.22 Silberschatz, Galvin and Gagne ©2018
Clustered Systems
▪ Like multiprocessor systems, but multiple systems working together
• Provides a high-availability service which survives failures
Asymmetric clustering has one machine in hot-standby mode
Symmetric clustering has multiple nodes running applications,
monitoring each other
Operating System Concepts – 10th Edition 1.23 Silberschatz, Galvin and Gagne ©2018
Computer System Environments
Operating System Concepts – 10th Edition 1.24 Silberschatz, Galvin and Gagne ©2018
Computing Environments
▪ Traditional
▪ Mobile
▪ Client Server
▪ Peer-to-Peer
▪ Cloud computing
▪ Real-time Embedded
Operating System Concepts – 10th Edition 1.25 Silberschatz, Galvin and Gagne ©2018
Traditional
▪ Stand-alone general-purpose machines
▪ Portals provide web access to internal systems
▪ Network computers (thin clients) are like Web terminals
Operating System Concepts – 10th Edition 1.26 Silberschatz, Galvin and Gagne ©2018
Mobile
▪ Handheld smartphones, tablets, etc.
▪ Extra feature – more OS features (GPS, gyroscope)
▪ Allows new types of apps like augmented reality
▪ Leaders are Apple iOS and Google Android
Operating System Concepts – 10th Edition 1.27 Silberschatz, Galvin and Gagne ©2018
Client Server
▪ Client-Server Computing
• Many systems now servers, responding to requests generated by
clients
Compute-server system provides an interface to client to
request services (i.e., database)
File-server system provides interface for clients to store and
retrieve files
Operating System Concepts – 10th Edition 1.28 Silberschatz, Galvin and Gagne ©2018
Peer-to-Peer
▪ Another model of distributed system
▪ P2P does not distinguish clients and servers
• Instead all nodes are considered peers
• May each act as client, server or both
Operating System Concepts – 10th Edition 1.29 Silberschatz, Galvin and Gagne ©2018
Cloud Computing
▪ Delivers computing, storage, even apps as a service across a
network
▪ Logical extension of virtualization because it uses virtualization as
the base for it functionality.
• Amazon EC2 has thousands of servers, millions of virtual
machines, petabytes of storage available across the Internet,
pay based on usage
Operating System Concepts – 10th Edition 1.30 Silberschatz, Galvin and Gagne ©2018
Cloud Computing (Cont.)
▪ Many types
• Public cloud – available via Internet to anyone willing to pay
• Private cloud – run by a company for the company’s own use
• Hybrid cloud – includes both public and private cloud components
• Software as a Service (SaaS) – one or more applications available
via the Internet (i.e., word processor)
• Platform as a Service (PaaS) – software stack ready for application
use via the Internet (i.e., a database server)
• Infrastructure as a Service (IaaS) – servers or storage available
over Internet (i.e., storage available for backup use)
Operating System Concepts – 10th Edition 1.31 Silberschatz, Galvin and Gagne ©2018
End of Chapter 1
Operating System Concepts – 10h Edition Silberschatz, Galvin and Gagne ©2018