POS Short Notes Ch1 & 2
POS Short Notes Ch1 & 2
interface
B- System View of OS
Computer-System Architecture Symmetric Vs Asymmetric Multiprocessing
1- Single Processor Systems
• There is one main CPU capable of executing a general purpose instruction
set ,including instructions from user processes.
4- Multiprogramming (Batch system)
• Most systems use a single general-purpose processor (PDAs through • Single user cannot keep CPU and I/O devices busy at all times
mainframes). • Multiprogramming organizes jobs (code and data) so CPU always has one to
• Most systems have special-purpose processors as well. execute
• Such as: Disk-controller microprocessor and Keyboard microprocessor • A subset of total jobs in system is kept in memory
• One job selected and run via job scheduling
• When it has to wait (for I/O for example), OS switches to another job
2- Multiprocessor Systems
(parallel systems, tightly-coupled systems) 5- Timesharing (multitasking)
Advantages include: • logical extension where CPU switches jobs so users can interact with each job
while it is running, creating interactive computing
1. Increased throughput
2. Economy of scale • Response time should be < 1 second
3. Increased reliability ( graceful degradation or fault tolerance) • Each user has at least one program executing in the memory 🢡 process
Two types: • If several jobs ready to run at the same time 🢡 CPU scheduling
1- Asymmetric Multiprocessing (Shared memory system) • If processes don’t fit in memory, swapping moves them in and out to run
each processor is assigned a specific task. • Virtual memory allows execution of processes not completely in memory
2- Symmetric Multiprocessing (Master processors)
6- Distributed / Network systems
each processor performs all tasks
• Network is a communications path, TCP/IP (Transmission Control
Protocol/Internet Protocol) most common
3- Clustered Systems • Local Area Network (LAN)
• Like multiprocessor systems, but multiple systems working together • Wide Area Network (WAN)
• Usually sharing storage via a storage-area network (SAN) • Metropolitan Area Network (MAN)
• Provides a high-availability service that survives failures • Personal Area Network (PAN)
• Some clusters are for high-performance computing (HPC) • Network OS provides features between systems across a network
• Applications must be written to use parallelization
• Some have distributed lock manager (DLM) to avoid conflicting operations 7- Special Purpose/ Real-time systems
Two types:
• Real-time embedded systems most prevalent form of computers,
1- Asymmetric clustering: one machine in hot-standby mode these devices are found everywhere,
2- Symmetric clustering: multiple nodes running applications, • Real-time OS has well-defined fixed time constraints
monitoring each other • Processing must be done within constraint
• Correct operation only if constraints met
Process Management
A process is a program in execution. It is a unit of work
within the system. Program is a passive entity, process is 5 Activities
an active entity.
Process needs resources to accomplish its task (CPU, memory, I/O,
files) & Initialization data)
Process termination requires reclaim of any reusable resources
All (or part) of the data that is needed by the program must be in memory.
Storage Management
4 Activities
OS provides uniform, logical view of information storage
Abstracts physical properties to logical storage unit- file
Each medium is controlled by device (i.e., disk drive, tape drive)
File-System management
Files usually organized into directories
Access control on most systems to determine
who can access what
OS Key Functions / Services
Operating-System Structure
Virtual Machines
• It takes the layered approach to its logical conclusion. It treats hardware and
the operating system kernel as though they were all hardware.
• It provides an interface identical to the underlying bare
hardware.
• The operating system host creates the illusion that a
process has its own processor and (virtual memory).
• Each guest is provided with a (virtual) copy of underlying computer.
Chapter 2: Process Management
Process State
• As a process executes, it changes state
• Process Transition: When a process goes
Various contents of PCB
from one state to another state.
Remember
New = created.
1.New State: When a process is created. Ready = waiting for CPU
2.Ready State: When process are waiting for CPU
3.Running State: When a process is being executed. Running = executed.
4.Wait State: When a process is waiting for some resource. Wait waiting for resource.
5.Terminate State: When a process finishes its execution. Terminate = finishes
Threads
2- Message passing
Mechanism allow processes to
communicate and synchronize
without sharing the same
address space.
Examples of IPC