summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2019-07-24 14:26:05 -0400
committerFrans Kaashoek <[email protected]>2019-07-24 14:26:16 -0400
commit5d75346e4a53ef6d113d51266e472166e32060e4 (patch)
treef0044a9e8abc49b5155889cf04cda027c5755492
parent711bd3156df1f3022bd341eebea620b4dc0a28f0 (diff)
downloadxv6-labs-5d75346e4a53ef6d113d51266e472166e32060e4.tar.gz
xv6-labs-5d75346e4a53ef6d113d51266e472166e32060e4.tar.bz2
xv6-labs-5d75346e4a53ef6d113d51266e472166e32060e4.zip
find
-rw-r--r--labs/xv6.html14
1 files changed, 11 insertions, 3 deletions
diff --git a/labs/xv6.html b/labs/xv6.html
index 40e1202..1749ca6 100644
--- a/labs/xv6.html
+++ b/labs/xv6.html
@@ -82,8 +82,8 @@ initial file system. You just ran one of them: <tt>ls</tt>.
<h2>sleep</h2>
-<p>Write a program that sleeps for a user-specified number of seconds,
- compile it, and run it.
+<p>Implement the UNIX program sleep, which sleeps for a user-specified
+ number of ticks.
<p>Some hints:
<ul>
@@ -94,7 +94,7 @@ initial file system. You just ran one of them: <tt>ls</tt>.
<li>The argument is passed as a string; you can convert it to an
integer using <tt>atoi</tt> (see user/ulib.c).
- <li>Use the system call <tt>sleep</tt> (see user/usys.S).
+ <li>Use the system call <tt>sleep</tt> (see user/usys.S and kernel/sysproc.c).
<li>Make sure <tt>main</tt> calls <tt>exit()</tt> in order to exit
your program.
@@ -143,6 +143,14 @@ initial file system. You just ran one of them: <tt>ls</tt>.
<h2>find</h2>
+<p>Write a simple version of the UNIX find program: find all the files
+ in a directory tree that contain a user-specified string.
+
+<p>Some hints:
+ <ul>
+ <li>Look at user/ls.c to see how to read directories.
+ </ul>
+
<h2>Optional: modify shell</h2>
<p>Modify the shell to support lists of commands, separated by ";"