CS 102 (Spring 2003)
Lab 4b: Mazes (Part b)

Author: Ron K. Cytron
Lab Assigned Design Due
(In class)
10 AM
(In Lab)
(In Lab)
Lab Due
(In lab)
18 Feb 19 Feb 26 Feb 26 Feb


You are surrounded by interconnnection networks: the Internet, the network serving your dorm room, the POTS (plain old telephone service) network. In this lab, you create a network structure that could be used to route message between a set of nodes. The network you create is in fact an unrooted tree.

Another view of this assignment: In this lab you create a maze that could be used to have a mouse find some tasty cheese food.

OK, I confess: the true nature of this lab is to give you experience with threads, concurrency, visualizations, and components. You will explore the nature and causes of deadlock as well as the deadlock avoidance. But the maze and network anaologies are accurate.


By the end of this lab, you should

Before starting:

You need your solution from the last lab in addition to the following.
[[[ Download PC zip ]]]
Zip includes:
Files you are given, but are NOT allowed to modify:
Files you must complete:
Files you must use and perhaps modify from last lab . If you were unable to complete the last lab, then come by for help in finishing them up for this lab.

What is due this week?

This week, the code you are given constructs a Maze using the Room object from last lab as well as some new objects for this lab. The Maze shows up as a rectangular grid of rooms. When the Hall threads are started, they simply try to connect each of their adjacent doors. In this lab, all such attempts will succeed.

You will first use the DoubleLock class from last lab, and in doing so, many of your executions will deadlock. You will then fix that object as described in class, so that your executions can never deadlock.

If you have time, you are encouraged to move to the next lab, which is only a change to the algorithm executed by the Hall objects.


What to turn in:

  1. Complete a code cover sheet.
  2. Provide a printout of any files you have modified.

Last modified 09:18:35 CST 18 February 2003 by Ron K. Cytron