From 5d75346e4a53ef6d113d51266e472166e32060e4 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek <kaashoek@mit.edu> Date: Wed, 24 Jul 2019 14:26:05 -0400 Subject: find --- labs/xv6.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'labs') 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 ";" -- cgit v1.2.3