-
Notifications
You must be signed in to change notification settings - Fork 17
Scheduling policies
C4Phone edited this page Dec 3, 2015
·
8 revisions
- exec() actually creates a new Process
- and it's the only function to create a new process
- fork() creates a new Thread
- this is not very useful for CP5, thus possibly going to be postponed.
- makeKThread() creates a new Kernel "Process" (A new process with a single kernel thread).
- which can call exec() to create a whole new user process.
- 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
- We use makeKThread to instantiate the 4 different shells on the 4 Text-mode Terminals.
- 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.