8.3 Operating Systems


This section under major construction.

Memory management. In many languages, including C and C++, the programmer is responsible to manage memory consumption and explicitly free it when it is no longer in use. "Micro-managed" memory can be more efficient if done properly, but it is tedious and error-prone. Automatic memory collection can be almost as efficient in common applications, and requires less development time.

Garbage collection. Invented by John McCarthy in 1958 as part of LISP. Idea = determine which objects are reachable via references by other reachable objects; free up unreachable objects (garbage). Here are some common garbage collection techniques.

By default Java uses a three generation garbage collector.

Creative Exercises