Commit Graph

174 Commits

Author SHA1 Message Date
Themis Demetriades
92c681ff02 Reformat start_process stack initialization code to follow style 2024-11-04 00:04:08 +00:00
Themis Demetriades
34d6c15d73 Update start_process to push process argument values to its thread's stack 2024-11-04 00:00:56 +00:00
sBubshait
d626b7a392 Implement basic syscall_handler using the lookup table, w/ E 2024-11-03 23:47:22 +00:00
EDiasAlberto
87126237ad Implement function to validate user memory pointers w/ S. 2024-11-03 23:20:42 +00:00
sBubshait
62453ef432 Add a look up table from system call numbers to their handler functions, w/ E 2024-11-03 22:54:03 +00:00
EDiasAlberto
c0f85a6bcc Implement skeleton for exit command w/ S. 2024-11-03 22:36:22 +00:00
EDiasAlberto
fa6dac2108 Implement halt system call w/ S. 2024-11-03 22:34:50 +00:00
sBubshait
0bf5fdb0e5 Add syscall_function type definition for the different syscall handlers, w/ E 2024-11-03 22:28:17 +00:00
Themis Demetriades
e26b11cce6 Update setup_stack skeleton to fake minimal stack set-up for testing purposes 2024-11-03 18:04:42 +00:00
Themis Demetriades
eb458efa59 Update process_wait skeleton to loop infinitely for testing purposes 2024-11-03 17:38:38 +00:00
Saleh Bubshait
74efa5e652 Merge branch 'task1/themis/thread-create-refactor' into 'master'
Refactor thread_create () to call thread_get_priority in order to retrieve priority

See merge request lab2425_autumn/pintos_22!21
Task_1_-_Scheduling
2024-10-25 16:56:31 +00:00
Themis Demetriades
4066354f8a Refactor thread_create () to call thread_get_priority in order to retrieve priority 2024-10-25 17:03:18 +01:00
Demetriades, Themis
4c33653369 Merge branch 'task1/saleh/priority-donation-refactoring' into 'master'
priority donation refactoring

See merge request lab2425_autumn/pintos_22!20
2024-10-25 15:57:22 +00:00
sBubshait
c2414ec54d Add priority_less for comparing threads based on priority and Refactor sema up to use list_max for clarity 2024-10-25 16:04:55 +01:00
sBubshait
30ab3ae861 Update thread_create to only yield CPU to the new thread if necessary 2024-10-25 15:47:19 +01:00
sBubshait
81309dcda9 Refactor sema_up to follow PintOS styling of if statements 2024-10-25 15:44:56 +01:00
Demetriades, Themis
bbb62d2ee7 Merge branch 'gleb/fix-non-busy-sleep-bug' into 'master'
Remove unnecassary inter_disable from non-busy sleep

See merge request lab2425_autumn/pintos_22!19
2024-10-25 14:19:36 +00:00
Demetriades, Themis
f8bdd30f09 Merge branch 'gleb/bsd-priority-donation' into 'master'
Allow priority donation with BSD scheduler.

See merge request lab2425_autumn/pintos_22!18
2024-10-25 14:19:18 +00:00
869571108d Remove from sleeping_threads immediately, instead of when thread is scheduled 2024-10-25 14:10:59 +01:00
6e072a557f Allow priority donation with BSD scheduler.
- Recalculate priority with donations after BSD priority updates
- Remove mlfqs checks from lock_acquire
2024-10-25 14:03:55 +01:00
Saleh Bubshait
af31968e67 Merge branch 'gleb/fix-bsd-ready-list-order' into 'master'
Re-sort ready_list when priorities update + PRI_UPDATE_FREQ

See merge request lab2425_autumn/pintos_22!17
2024-10-25 08:32:08 +00:00
093c6efd30 Re-sort ready_list when priorities update + PRI_UPDATE_FREQ
- PRI_UPDATE_FREQ is a separate value from TIME_SLICE, they just
  happen to be set the same.
2024-10-25 09:13:27 +01:00
sb3923
c4cefbc2d5 Merge branch 'merged-complete' into 'master'
Merge code refactors into main branch

See merge request lab2425_autumn/pintos_22!16
2024-10-24 22:15:24 +00:00
EDiasAlberto
b88baede64 rename recent_cpu update function 2024-10-24 22:45:49 +01:00
EDiasAlberto
7d196ffc57 adjust spacing around brackets to fit styling conventions 2024-10-24 22:30:38 +01:00
EDiasAlberto
39f4edd5e6 remove unnecessary curly brace in thread_tick () 2024-10-24 22:09:28 +01:00
EDiasAlberto
60acc2e58d refactor thread_mlfqs checks in synch.c 2024-10-24 21:46:39 +01:00
EDiasAlberto
a6a0c4ad25 remove empty lines in thread.c 2024-10-24 20:47:30 +01:00
EDiasAlberto
74657bbf9c reorder init_thread for clarity 2024-10-24 20:34:44 +01:00
EDiasAlberto
0b230131f1 refactor thread struct to keep all changes together 2024-10-24 20:17:39 +01:00
EDiasAlberto
49a9284f02 refactor fixed-point.h to match style standards 2024-10-24 20:16:40 +01:00
Dias Alberto, Ethan
e749936b1f Merge branch 'merged-complete' into 'master'
Merge complete code base into master

See merge request lab2425_autumn/pintos_22!15
2024-10-23 19:05:45 +00:00
EDiasAlberto
20be75748c replace thread_mlfqs checks in priority calculations with assertions 2024-10-23 19:57:17 +01:00
EDiasAlberto
d8c843f16a add mlfqs condition checking in synchronisation primitives 2024-10-23 19:37:27 +01:00
EDiasAlberto
1fb101c365 remove repeated comparator and reorder thread_init operations 2024-10-23 18:56:48 +01:00
EDiasAlberto
c357126cc1 fix missing curly brace 2024-10-23 17:51:48 +01:00
Dias Alberto, Ethan
176750282f Merge branch 'BSD-merged' into 'master'
BSD Scheduler implementation

See merge request lab2425_autumn/pintos_22!9
2024-10-23 16:34:39 +00:00
Dias Alberto, Ethan
ed11c61f87 Merge branch 'master' into 'BSD-merged', fixing merge conflicts
# Conflicts:
#   src/threads/thread.c
2024-10-23 16:30:24 +00:00
Dias Alberto, Ethan
0cbae2a2e5 Merge branch 'task1/priority-donation' into 'master'
Merge 'task1/priority-donation' into 'master'

See merge request lab2425_autumn/pintos_22!14
2024-10-23 16:15:44 +00:00
Themis Demetriades
95386971e2 Update lock_release to disable interrupts in critical sections w/ S 2024-10-23 16:45:42 +01:00
sBubshait
4879775d0b Update donate priority to add an assertion that intrrupts are disabled, w/ T 2024-10-23 16:32:40 +01:00
sBubshait
6223846fde Update lock_acquire to disable interrupts to eliminate race-conditions, w/ T 2024-10-23 16:30:38 +01:00
Themis Demetriades
f9d82c92de Update thread_recalculate_priority to disable interrupts preventing race conditions for access to donors and priorities w/ S 2024-10-23 16:16:25 +01:00
Demetriades, Themis
25ca7b6522 Merge branch 'task1/themis/priority-donation' into 'task1/priority-donation'
Merge task1/themis/priority-donation into task1/priority-donation

See merge request lab2425_autumn/pintos_22!13
2024-10-23 15:03:07 +00:00
Themis Demetriades
5f8dea21be Fix donate_priority to disable interrupts for entire update of possibly-ready donatee's priority 2024-10-23 14:10:48 +01:00
Themis Demetriades
b0074c80f0 Refactor ready_list_reinsert to require being called with interrupts disabled 2024-10-23 13:51:07 +01:00
Themis Demetriades
2cd4da17a4 Refactor donate_priority to only allow for the current thread to donate its priority 2024-10-23 13:42:36 +01:00
Themis Demetriades
a875d5fcb4 Update donate_priority to only attempt to sort position of the donee that isn't waiting for a lock 2024-10-23 13:37:43 +01:00
sBubshait
d82176a2e2 Refactor lock release to follow PintOS indent style and use list functoins, w/ T 2024-10-22 22:52:29 +01:00
Themis Demetriades
7aec2e6862 Refactor donate_priority to include comments explaining its purpose and logic w/ S 2024-10-22 21:15:30 +01:00