Computers Operating System Essentials
Operating Systems PROGRAM HARDWARE OPERATING SYSTEM
Operating Components APPLICATION PROGRAMS SYSTEM PROGRAMS (COMPILERS, etc.) OPERATING SYSTEM MACHINE LANGUAGE MICROPROGRAMMING PHYSICAL EXECUTION CPU MEMORY KERNEL ROM
System Structure Layers Processor Hardware functions: circuits, instruction set, procedures, interrupts Process management: multiprogramming, management of secondary storage, logical addressing External resource management: communication among process, file management, device access and addressing, user support
OS Functions User Interface Resource Management Evolution
User Interface Functions Create programs Execute programs Access I/O devices Manage file access Provide shared access Manage error detection Provide accounting
Resource Management Shares resources among applications Increases efficiency
Evolution Support hardware upgrades Enables operating system upgrades and additional features Fixes
Essential OS Functions Process management Memory management Information protection and security Scheduling and resource management System architecture
Process Consists of Executable program Data and data resources Execution context: register contents, priorities and module status
Process Management Multiprogramming Running several programs at a time to increase cpu utilization Time sharing Allowing multiple interactive users to log in at the same time Real time transaction processing Allow multiple users/programs to use the same copy of a program at once
Batch Multiprogramming (Short term dispatching) NEW READY RUNNING WAITING HALTED I/O ERROR/ COMPLETE NEW READY RUNNING I/O WAITING
Process Control Block (Short term scheduling)
Dispatching: lower level process scheduling automatic interrupts per second Returns control to the OS for rescheduling preemptive scheduling run to completion
Process Management Problems Synchronization: correct management of interrupted processes Mutual exclusion: keeping shared resource use separate Determinate program operation: programs get the same result every time independent of what else is running Deadlock
Memory Management Virtual memory and file management Isolation Automatic allocation and management Support modular programming Protection and access control Long-term storage
Addresses Physical address: actual memory location. NEEDED BY THE CPU Relative address: offset from a reference physical address. NEEDED BY THE OPERATING SYSTEM Logical address: address within a programmed unit (e.g. page). NEEDED BY APPLICATION PROGRAMS
Virtual Memory PAGE NUMBER + OFFSET FRAME NUMBER + OFFSET Page Frames Pages PAGE TABLE PAGE TABLE PAGE TABLE
Page Table Access A page table is an index to the current location of a page. Access can be Swapped Page Segmentation (hierarchical) Hashed
Translation Lookaside Buffer : Page Cache ALUCNTL..... BUS MAIN MEMORY CACHE TLB DASD Page Frames Pages
Information Protection and Security Access control: authorization and access limitation Information flow control: manage the distribution of information to the proper location Certification: assure that protection and security systems are working correctly
Scheduling and Resource Management Considers Fairness Differential response Efficiency
Modern Operating Systems Microkernel Architecture Multithreading Symmetric pultiprocessing
Virtual Machine O/S Users think they have the entire machine Copies of machine can execute the complete machine language May run different operating systems in different partitions
OS Management