8 - XV6 Exercise of Choice¶
Potential XV6 Exercises:¶
Processes and Threads¶
(5) Find the code implementing the shell
- Discuss how the shell works, e.g., make a flow diagram for a single shell command; how does one add "commands" to the shell?
- Find the code the implements directy change, i.e., the
cd
shell command; why does it have to be built directly into the shell? - Discuss how scripting could be added to the shell
- Discuss if the shell is part of the operating system. Should it be?
Scheduling¶
(1) Find the code for the scheduler of XV6.
- Is the scheduler preemptive or cooperative? Is that a good or bad design decision?
- Explain how the scheduler works, in particular, how does XV6 choose the next process to run?
- Discuss the scheduling policy: what are the advantages and disadvantages, is it a good choice for a desktop OS? What does "good choice" mean?
- Discuss how to implement a different scheduler, e.g., a fixed priority scheduler that always picks the process with the highest priority.
Memory Management¶
(1) Find the code that defines the memory layout of XV6
- Explain the memory layout of XV6.
- Find and explain the code that sets up memory layout for processes in XV6, i.e., memory layout for users of XV6.
(2) Find the code that handles the virtual memory of XV6
- Explain the format for virtual addresses used in XV6.
- Find and explain the code for converting between "real" and virtual addresses.
- Explain how segments are used in the kernel.
- Find and explain the implementation of XV6's page tables.
- How are page tables organised (how many levels)?
- How big (potentially) is a page table?
Paged Memory¶
(1) Find the code that handles the virtual memory of XV6
- Explain the format for virtual addresses used in XV6.
- Find and explain the code for converting between "real" and virtual addresses.
- Explain how segments are used in the kernel.
- Find and explain the implementation of XV6's page tables.
- How are page tables organised (how many levels)?
- How big (potentially) is a page table?
Last update:
May 31, 2019