Checkpoint 2

  1. Did you make the checkpoint? If not, what are your bugs/obstacles? (Buggy/incomplete submissions will get first priority for evaluation/feedback)

We think that we made the checkpoint. We succesfully setup the region1 and region0 page tables, set the trap handler vector in virtual memory, set the stack pointer and the program counter, and initiated a simple kernel program.

The one thing that we are less confident that we succesfully accomplished is the code for SetKernelBrk(). While in theory it does what it should do, we have not tested this enough to be confident in its possibly flaws.

  1. Any other questions?
  • When we start ./yalnix we see that the heap gets a certain area: malloc has 0x28000 to 0x30000 But, the end of the data, specified by _kernel_data_end is 0x30000. How does this make sense? That means that in the initial setup we are mallocing not into the heap, but into the data portion of memory. Does this matter? Ben

  • We created the trap vector and the end of kernel start (after setting up the page tables, create the idle PCB, etc.) when the manual seems to suggest that the trap vector should be initialized at the start of KernelStart(). When we did this though, the addresses were not found - this made us think they needed to be set in virtual memory.

  • I have seen on some forums that other operating systems implement a single kernel stack for all processes or a kernel stack for each thread. I think I understand why we need the kernel stack (to preserve it's privacy so userland code can't look at it, among other things), but I am confused how it could be handled so differently across different OS. This might be a product of my misunderstaning, but I am also wondering why the single kernel stack wouldn't be the obvious best option. Wouldn't it be okay to empty the kernel stack when we trap to kernel mode? How come we care about saving it as part of the user context?
    Zack

Select a repo