modify thread struct to track thread niceness and recent_cpu time
This commit is contained in:
@@ -93,6 +93,10 @@ struct thread
|
|||||||
/* Shared between thread.c and synch.c. */
|
/* Shared between thread.c and synch.c. */
|
||||||
struct list_elem elem; /* List element. */
|
struct list_elem elem; /* List element. */
|
||||||
|
|
||||||
|
/* MLFQS items */
|
||||||
|
int nice; /* Nice value for this thread */
|
||||||
|
int32_t recent_cpu; /* Amount of time this process received */
|
||||||
|
|
||||||
#ifdef USERPROG
|
#ifdef USERPROG
|
||||||
/* Owned by userprog/process.c. */
|
/* Owned by userprog/process.c. */
|
||||||
uint32_t *pagedir; /* Page directory. */
|
uint32_t *pagedir; /* Page directory. */
|
||||||
|
|||||||
Reference in New Issue
Block a user