Technology and Operating Systems

Lecture Notes for CS 140
Spring 2019
John Ousterhout

  • Many of the basic ideas in operating systems were developed 30-50 years ago, when technology was very different. Are these ideas still relevant today and in the future?
  • Technology changes over the last 30 years:
    • CPU speeds: 15 MHz -> 2.5 GHz (167x)
    • Memory size: 8 MBytes -> 16 GBytes (2000x)
    • Disk capacity: 30 MBytes -> 2 TBytes (66667x)
    • Disk transfer rate: 2 MBytes/sec -> 200 MBytes/sec (100x)
    • Network speed: 10 Mbits/sec -> 10 Gbit/sec (1000x)
  • The role of paging:
    • When originally proposed (1960's):
      • Disk speed: 80ms latency, 250 KBytes/sec transfer
      • Memory size: 256 KBytes (64 pages)
      • Time to replace all of memory:
        • 6.4 sec (individual page faults)
        • 1 sec (sequential)
    • Today:
      • Disk speed: 10ms latency, 150 MBytes/sec transfer
      • Memory size: 64 GB (16,000,000 pages)
      • Time to replace all of memory:
        • 44 hours (individual page faults)
        • 320 sec (sequential)
    • Can't afford to page something out unless it's going to be idle for a long time.
    • Does paging make sense anymore?
      • Mechanism for incremental loading of processes?
        • Why not just read the entire binary at once?
        • 15 MB of binary takes .1 sec.
      • Safety valve for temporary emergencies?
        • Perhaps, but not much space between "system not paging at all" and "system totally unusable".
      • Maybe NVMs will make it practical again?
    • Virtual memory still be useful:
      • Simplifies physical memory management
      • Allows controlled sharing
      • Memory-mapped files
      • Virtual machines
    • Page size is way too small:
      • Random accesses for replacement too expensive.
      • Not enough TLB coverage.
  • TLBs:
    • Haven't kept up with memory sizes
    • 64 entries -> 256 KBytes coverage
    • In mid-80's this was a substantial fraction of memory (8 Mbytes).
    • Today TLBs can only cover a tiny fraction of memory
    • Some TLBs support larger page sizes:
      • 1 MByte
      • 1 GByte
      • But, this complicates kernel memory management.
  • Disks:
    • Capacity has increased faster than access time.
    • Can't actually access all the information you can store on disk!
    • Frequently accessed information must move elsewhere
  • Storage latency:
    • Disks: 10 ms
    • Flash: 100 microseconds
    • New nonvolatile memories (Intel 3D XPoint): 100-300ns
    • Current software stacks totally unsuitable for nonvolatile memories
    • Will the file abstraction make sense in the future?
  • Multi-cores
    • For many years, chip technology improvements allowed processor clock rates to improve rapidly.
    • Unfortunately, faster clock rates mean more power dissipation; power limitations now limit improvements in clock rate.
    • Chip designers are now using technology to put more processors (cores) on a chip.
    • Consequences:
      • All OSes must now be multiprocessor OSes
      • Not clear how to utilize all of these cores: app developers must now write parallel programs?
      • Writing parallel programs is very hard
  • Current hot area for OS development: the datacenter
    • Coordinating thousands of machines working together
    • Potential for very low-latency communication.