From df89bda71e47a1f5798d8e8b8f5d2f0770ff9c8f Mon Sep 17 00:00:00 2001 From: EDiasAlberto Date: Tue, 15 Oct 2024 17:09:06 +0100 Subject: [PATCH] modify thread struct to track thread niceness and recent_cpu time --- src/threads/thread.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/threads/thread.h b/src/threads/thread.h index f36d7ac..3019926 100644 --- a/src/threads/thread.h +++ b/src/threads/thread.h @@ -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. */