The goal of this project is to modify the xv6 Operating System by adding new features and functionalities like new keyboard shortcuts for console, new system calls, CPU scheduling, and synchronization.
-
Add names of contributors to message boot
-
Add three new keyboard shortcuts to xv6 shell:
CTRL + T
: Swap the last two letters before the cursorCTRL + O
: Uppercase all letters after the markerCTRL + A
: Change the position of the cursor to the beginning of the line
-
Design and implementation of a user-level program (
factor
)
calculate_sum_of_digits (int num)
: returns the sum value of all digits innum
get_file_sectors(int fd)
: prints the block number on disk for each block of the fileget_parent_id(void)
: prints the parent process id of the currently running processset_process_parent(int pid)
: sets the currently running process as the parent of input process (pid
)
- In this scheduler, processes are placed in different levels according to their priority, which is assumed in this project that there are three levels and subsequently three priorities:
- Level 1: Round Robin (RR)
- Level 2: Last Come First Serve (LCFS)
- Level 3: Modified Highest Response Ratio Next (MHRRN)
- Required system calls:
change_queue(int pid, int queue)
set_process_MHRRN(int pid, int MHRRN_priority)
set_system_MHRRN(int MHRRN_priority)
print_info(void)
- Implement
Counting Semaphore
with required system calls:sem_init(int i, int v, int init)
sem_acquire(int i)
sem_release(int i)
- Simulate
Dining Philosophers
problem with 5 philosophers by using a monitor
Implement a POSIX-compliant Unix system call called mmap
that maps files or devices into memory. It is a method of memory-mapped file I/O.
Required system calls:
get_free_pages_count()
mmap(void* addr, size_t length, int prot, int flags, int fd, int offset)
Contributors: Parnian Fazel, Ali Akhgari