R. Clayton (rclayton@monmouth.edu)
(no date)
I am having some difficulty as far as where to begin with writing the
scheduler to run the idle process. Do you have any suggestions.
Start simple. Do you understand how the operating system returns from an
interrupt back into a user process? If so, write a reboot-interrupt handler
that does nothing but run the idle process. Once you get that to work, think
about the information you need to run any process. What kind of data
structures does the operating system need to run a process? How does the os
manipulate those data structures? And so on. Once you think you have the
answer to these questions, implement the data structures - these will be the
basis for your scheduler. Once your os has a scheduler, it should be able to
switch among user processes.
If you don't understand how the operating system returns from an interrupt back
to the user process, ask yourself these question: what does the hardware need
to know to be able to run a user process (the idle process in this case)? From
where does that information come? To where does it go? How is the os
responsible for getting that information from where it is to where it goes?
Once you understand these questions, you should be able to write a reboot
handler that does nothing but run the idle process.
This archive was generated by hypermail 2.0b3 on Fri Aug 23 2002 - 19:30:04 EDT