modify thread struct to track thread niceness and recent_cpu time

This commit is contained in:
EDiasAlberto
2024-10-15 17:09:06 +01:00
parent 5178b72370
commit df89bda71e

View File

@@ -93,6 +93,10 @@ struct thread
/* Shared between thread.c and synch.c. */
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
/* Owned by userprog/process.c. */
uint32_t *pagedir; /* Page directory. */