CS2850 Operating Systems

Subdecks (2)

Cards (891)

  • Components of a Modern Computer
    • Processors
    • Main memory
    • Disks
    • Printers
    • Keyboard
    • Mouse
    • Display
    • Network interfaces
  • Hardware
    The physical components of a computer system
  • Software
    The logical applications that run on the hardware
  • Operating system
    A layer between end user applications and the hardware, allowing applications to be developed without having to be aware of all hardware specifics
  • Operating system
    • Transforms primitive and awkward hardware architecture into beautiful abstractions
    • Provides abstractions to application programs and manages complex systems while allocating resources in an orderly and controlled manner
  • The evolution of computer technology can be categorized into five generations, starting from vacuum tubes to mobile computers
  • Central Processing Unit (CPU)

    A key component of modern computers, responsible for executing instructions and storing temporary values
  • CPU performance improvements

    • Techniques like pipelining, multithreading, and multicore processors
    • Specialized processors like Graphics Processing Units (GPUs) have also contributed to the advancement of parallel computations
  • Memory hierarchy
    • L1 cache
    • L2 cache
    • Main memory (RAM)
    • ROM
    • Flash memory
  • Magnetic disks (HDDs)

    Cheaper and have more capacity than RAM, but slower
  • Solid State Drives (SSDs)
    Faster and use flash memory, but more expensive
  • Hybrid drives
    Combine SSDs and HDDs for high-speed access without compromising capacity
  • Virtual memory

    A solution for programs that don't fit in existing memory, using disk space to temporarily store information
  • I/O device
    Consists of a controller and the device itself, with the controller accepting commands from the operating system
  • Device drivers
    Used to minimize operating system complexity and created by vendors for each supported operating system
  • I/O methods
    • Busy waiting
    • Interrupt processing
    • Direct Memory Access (DMA)
  • Interrupt processing involves running the interrupt handler and returning to the user program
  • DMA allows for minimal CPU intervention by using a chip to transfer data between devices and memory
  • Types of operating systems
    • Mainframe
    • Server
    • Multiprocessor
    • Personal computer
    • Handheld computer
    • Embedded
    • Sensor node
    • Real-time
    • Smart card
  • Process
    A program in execution, associated with an address space and a set of resources
  • Process A creates two child processes, B and C, while Process B creates three child processes, D, E, and F
  • Process information
    • Process ID
    • Name
    • User
    • Executable file
    • Register values
  • Pseudo-parallelism
    In multiprogramming systems, CPUs quickly switch from process to process, giving the illusion of parallelism even with just one CPU
  • Process creation
    1. System initialization
    2. Process creation system call
    3. User request
    4. Initiation of a batch job
  • Process creation in POSIX OSes
    New process is created using the fork system call, which creates a clone of the calling process
  • Process creation in Windows
    Process creation is done in one step using the CreateProcess call
  • The address spaces of parent and child processes are separate in both POSIX and Windows
  • Conditions for process termination
    • Normal exit
    • Error exit
    • Fatal errors
    • Killed by another process
  • Process types
    • Interactive processes (file explorer, web browser)
    • Daemons (work in the background and react to specific occurrences)
  • Process states
    • Running
    • Ready
    • Blocked
  • Running
    The process is actively using the CPU
  • Ready
    The process is temporarily stopped to allow another process to run
  • Blocked
    The process is unable to run until an external event occurs
  • Process table entry
    Includes various fields that provide information about a process
  • CPU utilization
    Can be approximated as 1 minus the product of the probability of a process waiting for I/O and the number of processes in memory
  • Thread
    Multiprogramming supports process management, while parallelism and shared address space benefit from threads
  • Threads
    • Creating a thread has significantly lower overhead than creating a process, and context switching between threads is faster
    • Sharing address space facilitates writing code for multiple activities that can block and interact
  • Multithreading examples

    • Word processor with three threads
    • Multithreaded Web server with dispatcher and worker threads
  • Thread states

    • Running
    • Ready
    • Blocked
  • Thread creation

    A single thread is present which can create new threads, and the calling thread usually receives an identifier for the new thread