Resource Allocation



Deadlock



Distinguishable Resources



Interchangeable Resources



Resource Allocation:
Greedy Algorithm



Resource Allocation: Quotas



Resource Allocation: Quotas



Reliability



Leaks



Garbage Collection



Garbage Collection Algorithm:
Mark and Sweep

  1. push the roots onto a stack
  2. while the stack is not empty:
    1. pop the top element e off the stack
    2. if *e is marked, go back to previous step, otherwise:
    3. mark *e
    4. get length l of e[]
    5. push onto the stack each pointer in e[0... l-1]
  3. loop through all resources, and collect (free) those that are not marked