Chad Salinas Operating Systems 2

How do you determine what state is associated with a process?

How can fork() or execve(…) be used?

Dump uses fork() to rewind.

How do you reduce a process’ privledges?

Contrast fork() with spawning i.e. Windows’ CreateProcess() with 10 args.

What is the function of the Process Control Block (PCB)?

Scheduling Issues(5)

  1. Fairness
  2. Priority
  3. Deadlines
  4. Throughput
  5. Efficiency

Kernel calculates priority for preemption -  then context switch based on multiple parms.

What optimizations can be made to make context switches less expensive?

What are the differences between threads and processes?

What are the disadvantages of kernel threads?

CS/EE Abstraction Hierarchy

Abstraction hides complexity

  • Algorithms
  • C, C++, Java, Python…
  • Instruction Set Architecture
  • Functional Units
  • Logic Gates
  • Transistors
  • Electrons

Chad Salinas EE Bag of Tricks

EE bag of tricks useful for Operating Systems

  • Pipelining
  • Parallelism
  • Caching
  • Indirection
  • Amortization
  • Out-of-order execution
  • Speculation

OS Opening

1. Put this value in a register.
2. Device does DMA and raises an interrupt

How is your hardware functioning?
How much concurrent programming is involved?
Cover OS evolution.
Protection Mechanisms, i.e. pre-emption
Interposition
Privileged vs. Unprivileged
Protecting CPU
Protecting Memory
Don’t do this: int main() { while(1) fork(); }

Overview

Project 1: Threads

Project 2: Multiprogramming

Project 3: Virtual Memory

Project 4: File Systems

Chad Salinas