CMPT-300
Assignment 4 
Name
ID

Please Indicate what components you have completed(Yes,Partial,No):
*(For any partial Completion Please give description in report)
**(Mark penalties will be assessed for claiming a part is present in code when it is not!)

Part A(25%):

Setup Environment(Yes,Partial,No)::____
Compile Kernel:___
Modified: Kernel:___

Part B(75%):

Kernel Space:

Error Handling:____
Basic Process Info(Info on input PID):___
Linked List Traversal(Relative PID Info):___

User-Space:
Testing Code:____

General Question:
Briefly Describe What you have learned in this assignment:

Part A: Briefly answer these questions(You only need a few sentences each).

1) What is QEMU and how did you use it in this assignment? 

2) What is contained in arch/x86/kernel/syscall_table_32.S. How does the operating system use the syscall table?

3) How do you directly call a syscall from user-space?

4) Run your VM with the modified kernel and run your user-space testing code. Attach a screen shot to this report(The part where we see the diving to kernel level and the rising to user level).

Part B: Briefly answer these questions(You only need a few sentences each).

1) What is the purpose of a process “nice” value, and how did you find it?

2)
 a) What data-structure is used in kernel space to traverse between related PIDs information? 

b) How did you traverse the data-structure?

3) How do you pass the target PID from user-space to kernel space?

4) Attach three screen shots of your user-space testing code being run. 
a) One screen shot of the testing coding running with the PID of your program(ex. use getpid()).

b) One screen shot of the testing coding using the PID of init (pid = 1).

c) One screen shot of the testing code handling an error(prinfo struct = null).