Whatโ€™s a process

A program in execution

Multitasking

CPU Memory Virtualization

  • Time-slicing of CPU(s) is done to simulate concurrency
  • Memory is partitioned as well
  • Per-process view is a uniform address space
  • Lazy/On-demand loading of processes lowers total burden

Contrast that to batch processing where jobs were done individually and synchronously. Cringe.

Forms of Multitasking

  • Cooperative multitasking: processes voluntarily give control to the OS
  • Preemptive multitasking: OS policies transitions (how?)
  • Real-time systems: hard, fixed time constraints

01/29/2021

Scheduler

  • Composed of policies (high level) and mechanisms (low level) to select which process is allocated resources.

Unix Process API

  • Manage processes
  • Create processes
  • Synchronization
  • Communication

The Unix process API consists of flexible and orthogonal (meaning they are disparate so they are composable) system calls.

  • Creation: fork
  • Program execution: exec
  • Synchronization: wait
  • Termination: exit