Notes for checkpoint 1 meeting: (October 31, 2.00pm)
---------------------------------------------------------------------------------------------------------------
Things to change in our data structures:
Current SetKernelBrk kills off the stack (makes entries in the stack invalid in the page table) (NOTE: We already have a stack at this point)
for keeping track of free frames, keep track of vector (array) of char's, put an 'f' in i (or some other symbols) if the frame at index i is free, otherwise put an 'e'. (f for free, e for empty). Could then use a more complex data structure once basic functionality is attained.
In the System state, keep track of the lowest page for stack, and highest page for the heap...(red zone idea works too, both could be made to work, but the first one is more explicit in its conditions)
keep kernel context in pcb so that when a process wakes from sleep, it knows where to find its stack. (The stack start and end is kept in registers, but since for each page table they are different, we write the registers just before context switching to point them to the stack area)
Instead of a general I/O queue, consider a queue for each terminal (easier to locate processes after an interrupt etc)
-----
general notes:
exit ---> unblock a parent potentially waiting for this kid process that just exited. (we might have that already)
end gracefully, rather than core dumping when user processes do illegal things
create a checkpoint directory for each checkpoint in our homepages. Prof. Smith and Mr Kee do not like having to check out the code from svn, they just want to look at it in our home directories.
-----
Checkpoint 2 notes
We also have to be able to run the idle process by checkpoint 2.
set PC to point some place in kernel data, (in user_context, we can point the pc to point to this place, then at return of kernel start, this text will be run....). Instead of creating a fully blown process, (and maybe its pcb too), we can get away by just building a minimal page table to keep track of the idle process stack, and keep the code for the idle process in the kernel text.
Memory mapping and page tables for regions 0 and 1 should also be done by checkpoint 2.