v3n / os

Operating Systems assignment.
MIT License
0 stars 0 forks source link

Implement Dispatcher #10

Open v3n opened 9 years ago

v3n commented 9 years ago

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.

bfox9 commented 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?

v3n commented 9 years ago

We can just store that information in a struct and memcpy it between the PCB and CPU.