Timothy Finley
2005-03-07 20:18:19 UTC
Although I practically have the necessary functionality for the project, I
realized that things didn't seem quite right. When running schedtest.ex
(why is just .ex and not a full .exe?) the processes would never
interleave. The printout of 1s and 2s would never be mixed together. After
doing some debugging I've figured out that I never actually was receiving
any timer interrupts while a process was running because interrupts were
never reenabled for user processes. With this I would never get any
timeslicing preemption.
I would assume that the project2 solution does this correctly (enabling
interrupts for newly scheduled user processes) so maybe I should take a
look at that. In Setup_Kernel_Thread the address of Launch_Thread is
pushed onto the stack (that function will enable interrupts) but we were
not indicated to do this in Setup_User_Thread for project2.
Hope this helps any of you who were using your own project2 and not the
given solution.
Tim
realized that things didn't seem quite right. When running schedtest.ex
(why is just .ex and not a full .exe?) the processes would never
interleave. The printout of 1s and 2s would never be mixed together. After
doing some debugging I've figured out that I never actually was receiving
any timer interrupts while a process was running because interrupts were
never reenabled for user processes. With this I would never get any
timeslicing preemption.
I would assume that the project2 solution does this correctly (enabling
interrupts for newly scheduled user processes) so maybe I should take a
look at that. In Setup_Kernel_Thread the address of Launch_Thread is
pushed onto the stack (that function will enable interrupts) but we were
not indicated to do this in Setup_User_Thread for project2.
Hope this helps any of you who were using your own project2 and not the
given solution.
Tim