Minix Scheduling Basics and Concepts

159 views
Skip to first unread message

Chris Garrett

unread,
Feb 6, 2014, 2:33:29 AM2/6/14
to min...@googlegroups.com
Hello all,

I'm working on a custom scheduler. It is for homework and I understand the rules, to be 
clear I don't want any help on my scheduler or code. I'm looking for some clarification on
how the default scheduler works and how user space schedulers interact with the kernel
scheduler.

I've read the paper by Bjorn, but some parts of it weren't entirely clear.

When sys_schedule is called, it is passed the process, the priority, and the quantum. In 
Bjorns paper he states that "The kernel also keeps a record of the quantum originally 
given to the process, something only relevant when the process has no scheduler." 

So first off, when a process is scheduled in the kernel, is a single reference to the process 
in the process table updated to include the new priority and quantum? Or is a new entry 
made with the priority and quantum? 

Second, which keeps track of the remaining quantum of a process after it has been
scheduled, the kernel scheduler or the user scheduler?

A third question is in the event of a process being scheduled by the user scheduler while
the process still has quantum, does the new quantum get added to the remaining quantum
or is the amount of quantum simply reset to whatever quantum is passed in?

I'm mostly trying to understand the inner workings of the kernel space scheduler. I 
understand that it is round robin with priority queues, but it seems to me that there aren't
literal queues and that is more of a metaphor to describe the structure of the scheduler
(though maybe I am misunderstanding). Any clarification would be very helpful.

Thanks,
- Chris G.
Reply all
Reply to author
Forward
0 new messages