Managing address spaces

Required reading: Remainder of Chapter 6, and Chapter 7-1 through 7-4 of Lion's

Overview

Case study (Lions's book)

In the last lecture we saw v6 setting up the kernel address space. In today's lecture we see how v6 creates and switches to the first user-level address space. To understand how this happens, we need to understand in detail the state on the stack---this may be surprising, but thread switching and address space creation are tightly bundled in v6, in a concept called process. We will study thread management in detail next week, but we will need to understand some to follow the creation and switching to the first address space. (In future lectures we will return in more detail to creating, growing/shrinking, and switching address spaces.)

C calling conventions

The first user-level address space

lets resume at 649 (lec notes document the stacks, and nothing else). We simplify the stack layout a bit and ignore the precise layout as described above and ignore the allocation of local variables.