summaryrefslogtreecommitdiff
path: root/labs
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-08-02 14:51:04 -0400
committerRobert Morris <[email protected]>2019-08-02 14:51:04 -0400
commit3bee885ed7b5d39341a24a7d64959f54ddf45bab (patch)
tree2b90cf73ef3940928854a1c2678b6f031224be24 /labs
parente788af9b81300b108a7d1705e23f73167ea71c67 (diff)
downloadxv6-labs-3bee885ed7b5d39341a24a7d64959f54ddf45bab.tar.gz
xv6-labs-3bee885ed7b5d39341a24a7d64959f54ddf45bab.tar.bz2
xv6-labs-3bee885ed7b5d39341a24a7d64959f54ddf45bab.zip
some XXX questions
Diffstat (limited to 'labs')
-rw-r--r--labs/syscall.html27
1 files changed, 23 insertions, 4 deletions
diff --git a/labs/syscall.html b/labs/syscall.html
index 67f800e..26cb573 100644
--- a/labs/syscall.html
+++ b/labs/syscall.html
@@ -231,13 +231,15 @@ alarmtest starting
<p>To get started, the best strategy is to first pass test0, which
will force you to handle the main challenge above. Here are some
hints how to pass test0:
+
+<p><b>XXX alarm() needs to be defined somewhere.</b><br>
<ul>
<li>You'll need to modify the Makefile to cause <tt>alarmtest.c</tt>
to be compiled as an xv6 user program.
-<li>The right declarations to put in <tt>user/user.h</tt> is:
+<li>The right declaration to put in <tt>user/user.h</tt> is:
<pre>
int sigalarm(int ticks, void (*handler)());
</pre>
@@ -249,7 +251,7 @@ to be compiled as an xv6 user program.
<li>Your <tt>sys_sigalarm()</tt> should store the alarm interval and
the pointer to the handler function in new fields in the <tt>proc</tt>
-structure; see <tt>kernel/proc.h</tt>.
+structure, defined in <tt>kernel/proc.h</tt>.
<li>You'll need to keep track of how many ticks have passed since the
last call (or are left until the next call) to a process's alarm
@@ -277,12 +279,29 @@ use only one CPU, which you can do by running
make CPUS=1 qemu
</pre>
+<li><b>XXX we need to somehow convey what it is they don't
+ need to do here, i.e. what part is to be left to
+ the next section.</b>
+
+<li><b>XXX it's not clear how they can tell whether they
+are passing test0(), and should proceed to the next section.
+do they need to make sure at this point that they see multiple
+alarm! printouts? or is it OK if they see one alarm! and
+then a crash?</b>
+
</ul>
<h3>test1(): resume interrupted code</h3>
-<p>Test0 doesn't tests whether the handler returns correctly to
- interrupted instruction in test0. If you didn't get this right, it
+<p><b>XXX it is surprising that test0() appears to work
+perfectly, even though something is seriously wrong
+with the way periodic() returns. we should recognize
+that something odd is happening, maybe ask them to think
+about it, and hint or say why they are not done even though
+test0() works.</b>
+
+<p>Test0 doesn't test whether the handler returns correctly to
+ the interrupted instruction. If you didn't get this right, it
is likely that test1 will fail (the program crashes or the program
goes into an infinite loop).