Operating Systems

Spring 2000

Topics

  1. Definition of an OS
  2. Software that runs in protected mode

    Software that controls system resources and the programs using these resources

    Operating systems hide the complexity of the hardware from programs and programmers

    Operating systems manage resources

  3. Systems are built in layers, so are operating systems
  4. Layering a system abstracts away from complexity

    System Calls

    File System

    Process Architecture

    Machine Independent I/O

    Device Drivers

  5. OS History
  6. Single User

    Batch

    Multiprogramming

    Timesharing

  7. Definition of a Process
  8. A program in execution.

    OS Uses a Process Table to keep track of processes.

    Processes can communicate with each other

    Processes have owners and privileges associated with them

    Parent/Child relationship among processes

  9. Definition of a System Call
  10. How a non OS Process asks the OS for a service

    Crosses protection boundaries

  11. How a System Call works
  12. Put parameters in a specific place

    Trap to the OS

    OS examines parameters and performs the work requested

    OS puts the return code in a specific place and returns from the trap

    Examples of system calls

  13. OS Structure
  14. Micro Kernel

    Monolithic

    Layered Systems

  15. The Process view of Multiprogramming
  16. Process State Diagram
  17. Interrupts
  18. Interprocess Communications
  19. Race Conditions
  20. Mutual Exclusion
  21. No two processes in their critical sections at the same time

    No assumptions about speed or number of processes

    No process should be blocked by a process not in its critical section

    No process should have to wait forever to enter its critical section

  22. Mutual Exclusion Solutions
  23. Strict Alteration

    Test and Set

    Semaphores

  24. Mutual Exclusion Problems
  25. Producer/Consumer

    Dining Philosophers

  26. Scheduling - deciding which process to run next
  27. Fairness

    Response Time

    Efficiency

    Turnaround

    Throughput

    Gracefully Degrade

    No Cheating

  28. Preemptive vs Non Preemptive Scheduling Algorithms
  29. Scheduling Algorithms
  30. FCFS

    Round Robin

    Shortest Job First

    Preemptive Shortest Job First

    Priority Scheduling

    Priority with Multiple Queues

  31. Storage Hierarchy
  32. Memory Management - the need to move things around in the storage hierarchy
  33. Address Translation - converting virtual to physical addresses
  34. Compile time

    Link Time

    Load Time

    Run Time

  35. Multiprogramming as a means to increasing CPU utilization
  36. 1 - (P^N)

    Limiting factor on multiprogramming is the amount of memory

  37. Relocation of programs
  38. Multiprogramming with fixed partitions
  39. Multiprogramming with variable partitions
  40. Choosing a partition
  41. Best Fit

    First Fit

    Worst Fit

    Quick Fit

    Buddy System

    Next Fit (Circular First Fit)

  42. Virtual Memory
  43. Pages

    Page Frames

    Mapping from Pages to Page Frames in the Page Table

    Page Fault

  44. Page Tables
  45. Single Level Page Tables - size as an issue

    Multilevel Page Tables

    Inverted Page Tables

    Translation Look aside Buffers

    Address Structure

    What is in a PTE

  46. Page Replacement Algorithms
  47. Working Set

    Locality of Reference

    Random PRA

    Optimal PRA

    NRU PRA

    FIFO PRA

    2nd Chance PRA

    Clock PRA

    LRU PRA

    NFU PRA

    More Page Frames doesn’t always mean better performance

  48. Global vs Local Page Allocation
  49. Demand Paging
  50. Paging implementation issues
  51. Writing dirty pages

    Shared pages and copy on write

  52. How we decide how many pages a process should get
  53. Number of pages in its working set

    Page fault frequency

    Wsclock

  54. Segments - a number of virtual address spaces
  55. File Systems
  56. Size - want to store big things

    Persistence - want the stuff stored to stay around

    Access - multiple processes accessing stuff at once

  57. File Naming - file system provides a way to uniquely name the stuff we have stored
  58. File Contents
  59. Stream of bytes

    Stream of records

    Other

  60. File Types
  61. File Attributes
  62. File Operations
  63. Directories - how we organize files
  64. Naming things

    Path separators

    Absolute vs Relative Paths

  65. Directory Operations
  66. Disk Issues
  67. Disk I/O is expensive

    Disks operate on sectors or blocks not works

  68. Allocating Blocks in a File
  69. Contiguous

    Linked

    File Allocation Table

    Inodes

  70. Inodes
  71. What is in an inode

    What inodes look like

  72. Links to files
  73. Hard Links

    Soft Links

  74. File System Buffer Cache

File blocks are cached

Strategies for dealing with cached blocks