首页 Home.
-
1. ``` root@C202511211157657:~# python3 segmentation.py -a 128 -p 512 -b 0 -l 20 -B 512 -L 20 -s 0 ARG seed 0 ARG address space size 128 ARG phys mem size 512 Segment register information: Segment 0 base (grows positive) : 0x00000000 (decimal 0) Segment 0 limit : 20 Segment 1 base (grows negative) : […]
2025年12月9日 4 次浏览 -
1. ``` root@C202511211157657:~# python3 relocation.py -s 1 ARG seed 1 ARG address space size 1k ARG phys mem size 16k Base-and-Bounds register information: Base : 0x0000363c (decimal 13884) Limit : 290 Virtual Address Trace VA 0: 0x0000030e (decimal: 782) --> PA or segmentation violation? VA 1: 0x00 […]
2025年12月3日 1 次浏览 -
1. ``` root@C202511211157657:~# tar xvzf HW-Lottery.tgz ./._lottery.py lottery.py ./._README-lottery README-lottery root@C202511211157657:~# python3 lottery.py ARG jlist ARG jobs 3 ARG maxlen 10 ARG maxticket 100 ARG quantum 1 ARG seed 0 Here is the job list, with the run time of each job: Job 0 ( l […]
2025年11月27日 2 次浏览 -
Select Homework for Chapter 8 of 《Operating Systems: Three Easy Pieces》: MLFQ Scheduling 1 ``` root@C202511211157657:~# python3 mlfq.py -j 2 -M 0 -m 4 -n 2 -q 1 Here is the list of inputs: OPTIONS jobs 2 OPTIONS queues 2 OPTIONS allotments for queue 1 is 1 OPTIONS quantum length for queue 1 is 1 OPT […]
2025年11月26日 3 次浏览 -
### Concepts: the "response time" (the time a job spends waiting after arrival before first running); the "turnaround time" (the time it took to complete the job since first arrival); the total "wait time" (any time spent ready but not running). 1&2: I will simply combine both of 2 questions and dra […]
2025年11月24日 4 次浏览 -
We used Deepseek and Chatgpt to generate the code we use to measure. ### 1. Time cost of syscall: ```c /** * System Call Overhead Measurement * Measures the time cost of a zero-byte read system call * Uses clock_gettime with MONOTONIC clock for precise timing * Binds process to single CPU for consis […]
2025年11月23日 4 次浏览 -
1.Let's see what if we change the variant v separately. ```c root@C202511211157657:~# gcc main.c -o a.out root@C202511211157657:~# cat main.c #include #include #include #include #include #include int main(int argc, char *argv[]) { int v = 0; int rc = fork(); if (rc < 0) { // fork failed; exit fprint […]
2025年11月22日 3 次浏览 -
Note: I converted the original process-run.py using ChatGPT because I am too lasy to have another python on my server. I shared the file below as someone may also need one. Hopefully it won't involve me into copyright issues, but if it did, please kindly tell me. [process-run.py for Python3](https:/ […]
2025年11月22日 1 次浏览 -
I made my own Gameboy emulator last year. Recently when I show it off to my friend, he asked me a thought-provoking question that I never came up with but should have: Does it need a operating system to run the game? Certainly, I knew the answer, because I had provide sufficient implement that a who […]
2025年11月22日 2 次浏览 -
Refactoring could be tempting, especially when you've finished reading a tech book, or some training course, you might feel yourself capable enough to get something done. After all, you can't tolerate the shitty codes in the old big rotten code base anymore. The rush won't stop until you finally str […]
2025年11月21日 3 次浏览
