|
|
@ -174,7 +174,6 @@ ticket_enqueue(struct run_queue *rq, struct proc_struct *proc) { |
|
|
|
proc->time_slice = rq->max_time_slice; |
|
|
|
} |
|
|
|
proc->rq = rq; |
|
|
|
proc->lab6_ticket_start = rq->lab6_total_num + 1; |
|
|
|
rq->proc_num ++; |
|
|
|
rq->lab6_total_num += proc->lab6_priority + 1; |
|
|
|
|
|
|
@ -218,7 +217,7 @@ ticket_dequeue(struct run_queue *rq, struct proc_struct *proc) { |
|
|
|
list_del_init(&(proc->run_link)); |
|
|
|
#endif |
|
|
|
rq->proc_num --; |
|
|
|
rq->lab6_total_num -= proc->lab6_priority; |
|
|
|
rq->lab6_total_num -= proc->lab6_priority + 1; |
|
|
|
} |
|
|
|
|
|
|
|
static void |
|
|
|