Adding entirely new system calls, Implementing & evaluating schedulers in xv6 in ubuntu
Budget: $30 – $250 USD
Adding time_scheduled()
Currently, xv6 has no way of checking how long a process has been scheduled
(been in the RUNNING state). You will be adding functionality for tracking how many
ticks each process has been scheduled in xv6 and a system call,
time_scheduled(pid), that returns this value for the given process id. The system call
should return 0 if a process exists, but hasn't been scheduled yet. If there is no
process with the supplied pid in the process table, return -1.
More details are in document. Please go through it.
Implementing a Basic Scheduler
Implement one of the following four simple schedulers: first-in first-out (FIFO),
shortest job first (SJF), round-robin (RR), or stride. You will also write a syscall for
getting some information about processes in each scheduler. Modify the Makefile to
be able to choose the scheduler at compile time. For example, make qemu
SCHEDULER=DEFAULT for the default scheduler and make qemu
SCHEDULER=[FIFO, SJF, RR, and STRIDE] for the new schedulers.
Before selecting your scheduler for this section, you may want to look at the next
part which can complement this section if the two schedulers are selected carefully.
More details are in document. Please go through it.
A More Interesting Scheduler
Implement one of the following more interesting schedulers: lottery scheduling,
multi-level (priority) scheduling, shortest job to completion first (STCF). You will not
get as many simplifying assumptions for these schedulers. Include which scheduler
you chose in the Project2-README. You will also write a few syscalls for setting
parameters for and getting information about each scheduler. Modify the Makefile to
be able to choose the scheduler at compile time. For example, make qemu
SCHEDULER=DEFAULT for the default scheduler and make qemu
SCHEDULER=[LOTTERY, PRIORITY, STCF] for the new schedulers.
More details are in document. Please go through it.
Evaluating New Schedulers
Complete a basic performance analysis of the new schedulers against the default
scheduler using time_scheduled() and uptime(). Analyze the performance of the new
scheduling algorithms and write a short report in a file named
scheduler_comparison.pdf. Perform your analysis on the following commands:
● stressfs
● uniq
● find
● cat README | uniq
Make 3 performance tables
1. Basic scheduler vs. default
2. Interesting scheduler vs default
3. Basic scheduler vs. interesting scheduler
Add a brief discussion of the results and why you think you're seeing the results that
you are seeing.
Rubric
1. For each performance table
2. Overall discussion
Documents Required:
A tar.gz file of the xv6-public with
1. All of your modified/added code and modified Makefile
2. A README file system environment (operating system, processor, any
special steps you took for installing xv6). You may also include comments.
3. Report comparing the schedulers.
4. Folders called time_scheduled, basic_scheduler, and
interesting_scheduler with screenshots of some basic usage. Also include
screenshots of xv6 compiling with the new scheduler flags. Since you're
not implementing commands here, I recommend you write some test
commands for each of these to make them easy to test. (e.g., one or more
"time_scheduled_test(s)", "basic_scheduler_test(s)", and
"intersting_scheduler_test(s)".
Currently, xv6 has no way of checking how long a process has been scheduled
(been in the RUNNING state). You will be adding functionality for tracking how many
ticks each process has been scheduled in xv6 and a system call,
time_scheduled(pid), that returns this value for the given process id. The system call
should return 0 if a process exists, but hasn't been scheduled yet. If there is no
process with the supplied pid in the process table, return -1.
More details are in document. Please go through it.
Implementing a Basic Scheduler
Implement one of the following four simple schedulers: first-in first-out (FIFO),
shortest job first (SJF), round-robin (RR), or stride. You will also write a syscall for
getting some information about processes in each scheduler. Modify the Makefile to
be able to choose the scheduler at compile time. For example, make qemu
SCHEDULER=DEFAULT for the default scheduler and make qemu
SCHEDULER=[FIFO, SJF, RR, and STRIDE] for the new schedulers.
Before selecting your scheduler for this section, you may want to look at the next
part which can complement this section if the two schedulers are selected carefully.
More details are in document. Please go through it.
A More Interesting Scheduler
Implement one of the following more interesting schedulers: lottery scheduling,
multi-level (priority) scheduling, shortest job to completion first (STCF). You will not
get as many simplifying assumptions for these schedulers. Include which scheduler
you chose in the Project2-README. You will also write a few syscalls for setting
parameters for and getting information about each scheduler. Modify the Makefile to
be able to choose the scheduler at compile time. For example, make qemu
SCHEDULER=DEFAULT for the default scheduler and make qemu
SCHEDULER=[LOTTERY, PRIORITY, STCF] for the new schedulers.
More details are in document. Please go through it.
Evaluating New Schedulers
Complete a basic performance analysis of the new schedulers against the default
scheduler using time_scheduled() and uptime(). Analyze the performance of the new
scheduling algorithms and write a short report in a file named
scheduler_comparison.pdf. Perform your analysis on the following commands:
● stressfs
● uniq
● find
● cat README | uniq
Make 3 performance tables
1. Basic scheduler vs. default
2. Interesting scheduler vs default
3. Basic scheduler vs. interesting scheduler
Add a brief discussion of the results and why you think you're seeing the results that
you are seeing.
Rubric
1. For each performance table
2. Overall discussion
Documents Required:
A tar.gz file of the xv6-public with
1. All of your modified/added code and modified Makefile
2. A README file system environment (operating system, processor, any
special steps you took for installing xv6). You may also include comments.
3. Report comparing the schedulers.
4. Folders called time_scheduled, basic_scheduler, and
interesting_scheduler with screenshots of some basic usage. Also include
screenshots of xv6 compiling with the new scheduler flags. Since you're
not implementing commands here, I recommend you write some test
commands for each of these to make them easy to test. (e.g., one or more
"time_scheduled_test(s)", "basic_scheduler_test(s)", and
"intersting_scheduler_test(s)".