Transcript ppt

CS-502 Operating Systems
Fall 2006
Review
CS-502 Fall 2006
Final Review
1
Week 1
• Concurrency
•
•
•
•
Processes – a fundamental abstraction
Interrupts, dispatching, ready queue
Busy waiting, Peterson’s solution
Critical sections, semaphores
• Processes (à la Unix, Linux, Windows)
• What does this include?
• Process states
• fork() and exec()
CS-502 Fall 2006
Final Review
2
Week 2
• Threads
• Concurrency within an address space
• Shared (virtual) memory programming
• Lightweight concurrency
• Scheduling
•
•
•
•
Goals and criteria
FCFS, RR, Priority, SJF, etc.
Multi-level scheduling
(later) Rate monotonic, Earliest Deadline First
– (for real time problems)
CS-502 Fall 2006
Final Review
3
Week 3
• Producer-consumer models
• Interprocess communication
•
•
•
•
•
Shared memory
Semaphores
Software interrupts & signals to processes
Pipes
Message passing
• Monitors
• Remote procedure call
CS-502 Fall 2006
Final Review
4
Week 4 – Memory Management
• Partitioning physical memory
• Base and Limit registers
• The first “virtual” memory
• Easy relocation
• Segmentation
• Multiple segments
• Paging
• Page tables & page translation
• Copy-on-write & other tricks
CS-502 Fall 2006
Final Review
5
Week 4 – Memory Management (cont.)
• Virtual Memory
• Page replacement algorithms
• Paging performance calculations
• Locality of reference ; thrashing
• Cache:
•
•
•
•
•
CS-502 Fall 2006
Fundamental principle that cuts across all of computing
Physical memory is cache of virtual memory
TLB is a cache of page tables
File caches, activity caches, etc.
Fundamental issues in caching
Final Review
6
Week 5 – I/O subsystems
• Types of I/O devices
• Character vs. block vs. graphic vs. streaming
• Types of transfers
• Programmed I/O
• Interrupt-driven
• DMA
• Device drivers
• Statically loaded vs. dynamically loaded
• Interrupt handling: bottom vs. top half
CS-502 Fall 2006
Final Review
7
Weeks 6 & 7 – Disks and File Systems
• Disks
• I/O devices mostly used for storage within system
• Randomly accessed; blocks independently writeable
• Bad block management
• Disk economics
• Moore’s law increase in densities
• Slow, linear increase in performance
• RAID
• Protection against disk failures
• Some improvements in performance
• Stable storage
• Also protection against failures
• Generalizes to transaction management
CS-502 Fall 2006
Final Review
8
Weeks 6 & 7 – Disks and File Systems (cont.)
• Disk scheduling algorithms
• Not particularly relevant except in some database or
multimedia systems
• File:
• Fundamental abstraction of persistent storage
• Also used for system functions (including protection)
• File metadata
• Information about the file, stored with file
• Container vs. contents
CS-502 Fall 2006
Final Review
9
Weeks 6 & 7 – Disks and File Systems (cont.)
• Operations on files
• Read, write, seek, create, delete, truncate, open, close, etc.
• Types of file allocation
• Contiguous
• Linked (or FAT)
• Indexed
• Directory
• A special kind of file
• Linux virtual file systems
• Mounting
CS-502 Fall 2006
Final Review
10
Week 8 – Networks
• OSI seven-layer stack
• Connection
• A fundamental abstraction of networking
• Socket
• An OS abstraction; one end of a connection
• Network layer
• Routing
• Transport layer
• Reliable transmission
CS-502 Fall 2006
Final Review
11
Week 9 – Distributed File System
• DFS naming & access
• DFS caching
• File server semantics
• Stateless vs. stateful
• Example systems
• NFS – a stateless system
• AFS – very much a stateful system
CS-502 Fall 2006
Final Review
12
Week 10 –
Multiprocessing and Distributed Systems
• Types of multi-computers
• Shared memory multiprocessors
• Clusters of separate computers
• Distributed systems
• SMP
• One operating system
• Multiple computations in kernel at once
• Processes & interrupts execute on any processor
CS-502 Fall 2006
Final Review
13
Week 10 – Multiprocessing and Distributed
Systems (cont.)
• Clusters
•
•
•
•
Physically close; separate OS on each machine
Shared I/O and disk devices
Fast IPC & RPC
Load balancing
• Distributed computing
• Physically separated; internet communications
• Distributed file systems; NFS, etc.
CS-502 Fall 2006
Final Review
14
Week 11 – Virtualization
• Decoupling of hardware from {OS, appl.}
• Insulates systems from each other
• Commissioning and updates
• Debugging new version
• Separate OS required by separate applications
• Dynamic repartitioning of hardware
• Move running applications
• Balancing shifting loads
CS-502 Fall 2006
Final Review
15
Week 11 & 12 – Multimedia Systems
• Delivery of audio, video, etc, streams to
computers
• Broad impact in last decade
• TiVo, iPod, video on demand, audio/video on PCs
• CD & DVD disk and file formats
• Compression is essential
• JPEG, MPEG, MP-3
• Lossless vs. lossy
• Take advantage of temporal locality
CS-502 Fall 2006
Final Review
16
Week 11 & 12 – Multimedia Systems (cont.)
• Processor and disk scheduling
• Rate monotonic: equivalent to any static algorithm
• Earliest deadline first: equiv. to any dynamic alg.
• Multimedia file organization
• Frame vs. blocked; Locations on disk
• Network streaming
• Progressive download vs. real-time
• Real-time streaming
• Live vs. video-audio on demand
CS-502 Fall 2006
Final Review
17
Week 13 – Protection and Security
• Protection
• Mechanisms in OS to keep processes from things they should
not touch
• Access control lists vs. capabilities
• Separate policy from mechanism
• Security
• Validating credentials of users, processes
• Validating authenticity of messages, controls, etc.
• Cryptography
• General security mechanism
• Public key vs. private key methods
CS-502 Fall 2006
Final Review
18
Term Projects
• At least 5 real-time operating systems
• eCos, VxWorks, QNX Neutrino, Itron, ThreadX, Nucleus
• Lots of embedded systems
•
•
•
•
RTOS, plus Visual DSP++
Personal devices: PalmOS, Symbian
Games: PSP
Very small devices: TinyOS, BrickOS
• Big systems
• Telephone exchanges: Chorus
• Corporate computing: Open VMs
• Eclectic systems
• Inferno, Squeak
CS-502 Fall 2006
Final Review
19
Other topics
• OS organization
• Big vs. small
• Monolithic kernel vs. microkernel
• Linux kernel projects
• Adding a system call
• Building a message passing subsystem
• Discovering answers to questions
• …
CS-502 Fall 2006
Final Review
20
Questions
CS-502 Fall 2006
Final Review
21