Skip to content

Scheduling policies

C4Phone edited this page Dec 3, 2015 · 8 revisions
  1. exec() actually creates a new Process
  2. and it's the only function to create a new process
  3. fork() creates a new Thread
  4. this is not very useful for CP5, thus possibly going to be postponed.
  5. makeKThread() creates a new Kernel "Process" (A new process with a single kernel thread).
  6. which can call exec() to create a whole new user process.
  7. makeKThread accepts argument to customize everything about this "Kernel Process" 1. Although "Kernel Process" does not have its own memmap, 2. Kernel Process's execChild process inherit its Terminal/GUI client handle. 3. Thus we utilize makeKThread when creating new Terminals/GUIs
  8. We use makeKThread to instantiate the 4 different shells on the 4 Text-mode Terminals.
  9. Because: if we use fork() to accomplish this, fork() must be able to move some program from terminal 0 to terminal 3, which is unsafe and breaks abstraction.
Clone this wiki locally