Open v3n opened 9 years ago
I was thinking that there should be a method that extracts the data and another method that sets the PC. But I'm not sure how they'll interact. What do you guys think?
We can just store that information in a struct and memcpy it between the PCB and CPU.
The Dispatcher assigns a process to the CPU. It is also responsible for context switching of jobs when necessary (more on this later!). For now, the dispatcher will extract parameter data from the PCB and accordingly set the CPU’s PC, and other registers, before the OS calls the CPU to execute the job.