From 57a861bea1ef57a44574cfc74737d5b35db0e261 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Thu, 25 Jul 2019 08:19:14 -0400 Subject: [PATCH] Checkpoint start syscall lab --- labs/xv6.html | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/labs/xv6.html b/labs/xv6.html index 7699b06..8dc7786 100644 --- a/labs/xv6.html +++ b/labs/xv6.html @@ -215,41 +215,6 @@ initial file system. You just ran one of them: ls. to declare an argv. -

System call tracing

- -

In this exercise you will modify the xv6 kernel to print out a line -for each system call invocation. It is enough to print the name of the -system call and the return value; you don't need to print the system -call arguments. - -

-When you're done, you should see output like this when booting -xv6: - -

-...
-fork -> 2
-exec -> 0
-open -> 3
-close -> 0
-$write -> 1
- write -> 1
-
- -

-That's init forking and execing sh, sh making sure only two file descriptors are -open, and sh writing the $ prompt. (Note: the output of the shell and the -system call trace are intermixed, because the shell uses the write syscall to -print its output.) - -

Hint: modify the syscall() function in kernel/syscall.c. - -

Run the programs you wrote in the previous exercises and inspect - the system call trace. Are there many system calls? Which systems - calls correspond to code in the applications you wrote above? - -

Optional: print the system call arguments. -

Optional: modify the shell

There are endless ways in which the shell could be extended. Here are