[Operating System] Overview

Video: https://www.youtube.com/watch?v=hry_qqXLej8&list=PLRdybCcWDFzCag9A0h1m9QYaujD0xefgM&index=2&t=16s

  • What’s in a Search Query?
    1. Client send DNS request -> DNS server response with Internet Protocal address
    2. Client use address to reach datacenter -> load balancer -> saerch index

Moore’s Law

Transistor density of semiconductor chips would double roughly every 18 months: 2X transistors/Chips Every 1.5 Year.

Challenge: Scale and Dynamic Range

  • Enormous scale, heterogeneity, and dynamic range:
    • CPU: sensor motes -> GPUs
      • Core: one -> 100s
      • Clusters: few mahines -> 10000s machines
    • Network: Inter-core networks -> Internet
      • Latency: nanosecs -> secs (satellite)
      • Bandwidth: Kbps -> Gbps
    • Storage: caches -> disks
      • Size: MB -> TB
      • Access Time: few nanosecs -> millisecs

Challenge: Complexity

  • Application consisting of:
    • A variety of software modules that…
    • Run on a variety of devices that…
      • implement different hardware architectures
      • run competing applications
      • fail in unexpected ways
      • can be under a variety of attaches

Computer System Organization

  • Computer-system operation
    • One or more CPUs, device controllers connect through common bus providing access to share memory
    • Concurrent execution of CPUs and devices competing for memory cycles

How do we tame complexty?

  • Every piece of computer hardware different
    • Different CPU
    • Different amout of memory, disk…
    • Different types of devices
      • Mice, keyboards, sensor, cameras, fingerprint readers,…
    • Different networking environment
      • Cable, DSL, wireless

Virtual Machines

  • Software emulation of an abstract machine
    • Give programs illusion they own the machine
    • Make it look like hardware has features you want
  • Two types of VMs
    • System VM: supports the execution of an entire OS and its applications (e.g.., VMWare Fusion, Xen)
      • Layers of OSs
      • Useful for OS development
        • When OS crashes, restricted to one VM
        • Can aid testing programs on other OSs
    • Process VM: supports the execution of a single program: this functionality typically provided by OS (JAVA VM)
      • Programming simplicity
        • Each process thinks it has all memory/CPU time
        • Each process thinks it owns all devices
        • Different devices appear to have same interface
        • Device interfaces more powerful than raw hardware
          • Bitmapped display -> windowing system
          • Ethernet card -> reliable, ordered, networking (TCP/IP)
      • Fault Isolation
        • Process unable to directly impact other processes
        • Bug cannot crash whole machine

What does an OS do?

  • An OS is similar to a goverment
  • OS as a traffic Cop
    • Manages all resources
    • Settles conflicting requests for resources
    • Prevent error and improper use of the computer
  • OS as a facilitator

  • Most likely:

    • Memory Management
    • I/O Management
    • CPU Scheduling
    • Synchronization/Mutual exclusion primitives
    • Communications?
    • Multitasking/Multiprogramming?