operating system
program that acts as an intermediary between a computer user and computer hardware
User
Application Programs
Operating System
Computer Hardware
4 components of a computer system
kernel
The one program that runs at all times on the computer
system program
a type of program that is associated with the operating system, but is not part of the kernel
application program
a type of program not associated with the operating system
middleware
a set of software frameworks that provide services to application developers
operating system
it is a resource allocator and control program that efficiently uses HW and manages user program execution
shared computers
they must keep all users happy
dedicated systems
although they have dedicated resources, they still frequently use shared resources from servers
mobile devices
are resource poor, but optimized for usability and battery life
device controllers
connects through common bus to provide access to shared memory
true
true or false: I/O devices and CPU can execute concurrently?
operating system device driver
is found in each device controller type, in order to manage it
CPU
moves data from/to main memory to/from local buffers
local buffer
Each device controller has a ____ ____
interrupt
transfers control to the interrupt service routine
interrupt vector
It contains the addresses of all the service routines. It is the typical way to transfer control to the interrupt service routine.
trap or exception
a software-generated interrupt caused either by an error or a user request
interrupt
an operating system is _____ driven
it stores the registers and the program counter
how does the operating preserve the state of the CPU?
interrupt handling
determines which type of interrupt has occurred. In this process, separate segments of code determine what action should be take for each type of interrupt.
CPU: device driver initiates I/O
I/O controller: initiates the I/O
I/O controller: input ready, output complete, or error generates interrupt signal
CPU: receives interrupt, transfer control to interrupt handler
CPU: interrupt handler processes data, returns from interrupt
CPU: resumes processing of interrupted task
Enumerate the interrupt-drive I/O Cycle in the correct order
After I/O starts, control returns to user program only upon I/O completion
After I/O starts, control returns to user program without waiting for I/O completion
What are the two methods for handling i/o?
system call
request to the OS to allow user to wait for I/O completion
device-status table
contains entry for each i/o device, indicating its type, address, and state
I/O device table
OS indexes into __ ___ __ to determine device status and to modify table entry to include interrupt
main memory
only large storage media that the CPU can access directly
main memory
is typically volatile and random access (in the form of dynamic random-access memory [DRAM]).
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
tracks
sectors
disk surface is logically divided into ___, which are subdivided into ___
non-volatile memory (NVM) devices
faster than hard disks
registers
cache
main memory
nonvolatile memory
hard-disk drives
optical disk
magnetic tapes
rank this according to the storage device hierarchy
cache
hard-disk drives
magnetic tapes
main memory
nonvolatile memory
optical disk
registers
caching
copying information into faster storage system
device driver
for each device controller to manage I/O. It provides uniform interface between controller and kernel.
direct memory access structure
used for high-speed I/O devices to be able to transmit information at close to memory speed
device controller
transfers blocks of data from buffer storage directly to main memory without CPU intervention
direct memory access structure
under this structure, only one interrupt is generated per block, rather than the one interrupt per byte
bootstrap program
simple code to initialize the system, load the kernel
system daemons
services provided outside of the kernel
operating system
starts the system daemons
software error
system call
types of software interrupt
system call
request for operating system service
multiprogramming
organizes jobs (code and data) so CPU always has one to execute
job scheduling
In multiprogramming, how is the one job selected ran?
interactive computing
is created when CPU switches jobs frequently to the point that users can interact with each job while it is running
dual mode (user mode and kernel mode) operation
allows OS to protect itself and other system components
mode bit
provides the ability to distinguish when system is running user code or kernel code
System call changes mode to kernel, return from call resets it to user
How to prevent user from explicitly setting the mode bit to kernel?
privileged
only executable in kernel mode
timer
prevents infinite loop (or process hogging resources)
process
a program in execution; a unit of work within the system.
passive entity
active entity
program is a ____ _____, whereas process is an ____ ____
false
true or false: process termination does not require the reclaim of any reusable resources
program counter
single threaded process has one ____ ____ that specifies the location of the next instruction to execute
multi-threaded process
has one program counter per thread
process management
the operating system is responsible for the following activities in connection with ____ ____:
Creating and deleting both user and system processes
Suspending and resuming processes
Providing mechanisms for process synchronization
Providing mechanisms for process communication
Providing mechanisms for deadlock handling
true
true or false: to execute a program, all (or part) of the instructions must be in memory
memory management
determines what is in memory and when
memory management activities
includes:
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 de-allocating memory space as needed
operating system
provides uniform, logical view of information storage
file
abstracts physical properties to local storage unit
access control
allows for the determination of who can access what
OS activities
include:
creating and deleting files and directories
primitives to manipulate files and directories
mapping files onto secondary storage
backup files onto stable (non-volatile) storage media
caching
information in use copide from slower to faster storage temporarily
false
true or false: must not be careful to use most recent value, no matter where it is stored in the storage hierarchy
cache coherency
multiprocessor environment must provide ____ ____ in hardware such that all CPUs have the most recent value in their cache
I/O subsystem
is responsible for
memory management of I/O
general device-driver interface
drivers for specific hardware devices
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
user identities
include name and associated number, one per user
group identifier
allows set of users to be defined and controls managed, then also associated with each process and file
privilege escalation
allows user to change to effective id with more rights
virtualization
allows operating systems to run applications within other OSes
emulation
used when source CPU type different from target type. It is generally the slowest method.
interpretation
is used when computer language not compiled to native code
virtualization
OS natively compiled for CPU, running guest OSes which is also natively compiled
virtual machine manager
provides virtualization services
distributed systems
collection of separate, possibly heterogeneous, system networked together
network
is a communications path
TCP/IP
the most common network type
Local Area Network (LAN)
Wide Area Network (WAN)
Metropolitan Area Network (MAN)
Personal Area Network (PAN)
types of networks:
network operating system
provides features between systems across networks, wherein there is an illusion of a single system
false
most systems use a single general-purpose processor
true or false: most systems use multiple general-purpose processors
multiprocessor system
also known as parallel systems and tightly-coupled systems, they are systems which are growing in use and importance because of their increased throughput, economy of scale, and increased reliability.
asymmetric multiprocessing
a multiprocessor system with each processor assigned a specific task
symmetric multiprocessing
a multiprocessor system with each processor performing all tasks
clustered systems
similar to multiprocessor systems, but with multiple systems working together.
it provides high-availability service which survives failures
it usually shares storage using storage-area network (SAN)
asymmetric clustering
a clustered system where there is one machine in hot-standby mode
symmetric clustering
has multiple nodes running applications, monitoring each other
traditional computing environment
stand-alone general purpose machines
it is blurred as most systems interconnect with others through the internet
portals
provide web access to internal systems
network computers (thin clients)
are like web terminals
wireless networks
mobile computers interconnect via ___ ____
mobile computing environment
has OS features like GPS, gyroscope, and allows for augmented reality.
IEEE 802.11 wireless or cellular data networks for connectivity
client server computing
dumb terminals supplanted by smart PCs, wherein system servers as a response to client requests
compute-server system
provides an interface to client to request services
file-server system
provides interface for clients to store and retrieve files
peer-to-peer
another model of distributed system.
it does not distinguish between clients and servers, instead all nodes are considered peers.
discovery protocol
nodes broadcast request for service and respond to requests for service via ___ ___