Scheduler?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
gtsphere

Scheduler?

Post by gtsphere »

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
dronkit

Re:Scheduler?

Post by dronkit »

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.
Post Reply