title: how make a new scheduler in xv6?
body: <p>i am new to XV6 so be patient with me :D . 
  i want to make a new scheduler and it is a mix of two scheduler the multi-level feedback queue (MLFQ) and another one the lottery scheduler. </p>
  
  <p>The basic idea is simple: Build a two-level scheduler which first places jobs into the high-priority queue. When a job uses its time slice on the first queue, move it to the lower-priority queue; jobs on the lower-priority queue should run for two time slices before relinquishing the CPU.When there is more than one job on a queue, each should run in proportion to the number of tickets it has; the more tickets a process has, the more it runs. Each time slice, a randomized lottery determines the winner of the lottery; that winning process is the one that runs for that time slice.</p>
  
  <p>i need a couple of new system calls to implement this scheduler. </p>
  
  <p>The first is int settickets(int num) , which sets the number of tickets of the calling process. By default, each process should get one ticket; calling this routine makes it such that a process can raise the number of tickets it receives, and thus receive a higher proportion of CPU cycles. This routineshould return 0 if successful, and -1 otherwise (if, for example, the user passes in a number less than one).</p>
  
  <p>The second is int getpinfo(struct pstat *) . This routine returns some basic information about each running process, including how many times it has been chosen to run and its process ID, and which queue it is on (high or low).</p>
  
  <p>any help ? any lniks to help .</p>