diff --git a/syscall.c b/syscall.c
index eddf725057c29d503576e6477189793f8aecbd9c..4853e35b44de900b294378b6592311051e235c1d 100644
--- a/syscall.c
+++ b/syscall.c
@@ -105,6 +105,7 @@ extern int sys_sbrk(void);
 extern int sys_unlink(void);
 extern int sys_wait(void);
 extern int sys_write(void);
+extern int sys_yield(void);
 
 static int (*syscalls[])(void) = {
 [SYS_chdir]   sys_chdir,
@@ -126,6 +127,7 @@ static int (*syscalls[])(void) = {
 [SYS_unlink]  sys_unlink,
 [SYS_wait]    sys_wait,
 [SYS_write]   sys_write,
+[SYS_yield]   sys_yield,
 };
 
 void
diff --git a/syscall.h b/syscall.h
index c4e90ab8d81785b2694c17aa457d011691df6db9..85ea220eaa7c4bc4f184849c13068397d2026642 100644
--- a/syscall.h
+++ b/syscall.h
@@ -18,3 +18,4 @@
 #define SYS_dup    17
 #define SYS_getpid 18
 #define SYS_sbrk   19
+#define SYS_yield  20
diff --git a/sysproc.c b/sysproc.c
index 9d599decd67c11785f387520bd6661b7e7d25f61..8cf329199fde3c075112adc42d3c48a6d7113408 100644
--- a/sysproc.c
+++ b/sysproc.c
@@ -68,3 +68,10 @@ sys_sbrk(void)
   setupsegs(cp);
   return addr;
 }
+
+int
+sys_yield(void)
+{
+  yield();
+  return 0;
+}
diff --git a/usys.S b/usys.S
index 2f6141db631e834682a3cec496f6a7149dd236b9..210774dc07e719f1a671b1f5eb5e3a4297d6c047 100644
--- a/usys.S
+++ b/usys.S
@@ -27,3 +27,4 @@ STUB(chdir)
 STUB(dup)
 STUB(getpid)
 STUB(sbrk)
+STUB(yield)
diff --git a/zombie.c b/zombie.c
index 952f77a18aa208eb46cb74b2855418e74f50e6e6..883ea75caedc7d000d67e260a4c225210a507a33 100644
--- a/zombie.c
+++ b/zombie.c
@@ -7,6 +7,10 @@
 int
 main(void)
 {
-  fork();
+  int i;
+
+  if(fork() > 0)
+    for(i=0; i<10; i++)
+      yield();
   exit();
 }