Professional Documents
Culture Documents
Project Spring2023 Eng FINAL SV
Project Spring2023 Eng FINAL SV
Project Spring2023 Eng FINAL SV
Submission:
- A report describes clearly how did you solve problems
- All programs (in both kernel-level codes and user-level codes for testing) with comments (DON’T
ZIP the files)
*** Note: At the first step, it will be better if you install an old version of OS kernel. Then, the process
of building a new Linux kernel will be clear
3. Visit http://kernel.org and download the source code of your current running kernel. Then, download a
new kernel from https://www.kernel.org/ (e.g., 4.16.3) and extract the source:
# wget http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.3.tar.gz
# tar xvzf linux-4.16.3.tar.gz
F. REBOOT VM
1. Reboot to the new kernel
# reboot
PART 2 (1.5 points): ADD A NEW SYSTEM CALL INTO THE LINUX KERNEL
We add a simple system call helloworld to the Linux kernel. The system call prints out a “Hello! My name
is XXX” message to the syslog (XXX is your student name and your student ID). You need to implement the
system call in the kernel and write a program at the user-level to test your created system call.
Implement a print_self system call such that this system call will identify the calling process at the user-level
and print out the Process id, running state, and program name.
HINT: https://linuxgazette.net/133/saha.html
Example: the number of processes provided by a user is n=3. Then, the user provides parameters of
processes as 1 0 2 1 3 2 2. The output of the program will be as following: