If i was to write a schedular, what would be the way to save the program that is running so i know to go back to it? i was thinking of a struct in c to list all of the programs by a # of something, but that probably could get slow
thanks in advance
Scheduler?
Re:Scheduler?
basically you save all registers from the process/task you're about to put to sleep, so when you wake it up it can recover from the last thing it was doing.
other things needed to save are the ticks the program consumed, its privilege, owner, memory statistics, etc
check out the linux sources or bsd sources for this structure... it's probably in a file called proc.h or something like that.
other things needed to save are the ticks the program consumed, its privilege, owner, memory statistics, etc
check out the linux sources or bsd sources for this structure... it's probably in a file called proc.h or something like that.