- I presented the topic "Exokernel VS. Microkernel" at Taiwan COSCUP 2013 with about 1500 attendees. I focus on Exokernel design and its implementation to show some differences from Microkernel.
- Something through this presentation I want to convey sincerely is that
I enjoy discussing, learning, and implementing system topics like OS kernels, virtualization, and embedded products, mobile application, etc.
- Ambitious app designers could design OS services just for its own applications to achieve better performance and optimization.
- By Exokernel design and principle, ambitious app designers could release their creative soul to customize almost all OS services they want.
[Preface] A Hope That My Crude Remarks May Draw Forth By Abler People
- Part A: Multiprocessor Support and Cooperative Multitasking.
- Initialize hardware support.
- Main goal: Make every CPUs have its own independent data.
- Booting CPU triggers the bootaps() to set up each CPU by env_init_percpu() through mpentry.S to call mp_main().
- ma_main() triggers
- trap_init_percpu() setup each CPU's own TSS and stack allocated from mem_init_mp()
- setup es/ds/fs/gs/fs/ss
- setup CS by ljmp
- Big Kernel Lock setup to ensure only one trap to capable to enter the kernel mode in the same time between all CPUs.
- Implement Round-Robin scheduling.
- Part B: Copy-on-Write Fork.
- I must say this part is very very interesting!!!
- user mode page fault handler
- The translation between UXSTACK, Kernel stack, and normal user stack.
- The guide on Lab4 is very very detailed, I hope U could enjoy this part!
- Note: Difference between faultalloc.c and faultallocbad.c
- faultallocbad.c trigger user_mem_assert under kernel mode, so it can't print out.
- faultalloc.c trigger 3 times page fault under user mode
- 1 by deadbeef printing.
- 2 by cafebffe printing.(contains recursive page fault)
- Part C: Preemptive Multitasking and Inter-Process communication (IPC).
- Avoid one user process keep occupying CPU if it likes.
- Enable timer interrupt as the Force in Jedi to make Process release CPU.
- IPC here is applied in Blocking Send and Blocking Receive.
- It could be used as the basic lock mechanism, too.
- This part could be the Integration system test for lab 1~4, for interactions between kernel and users. :)
- Some questions assignment after exercises.