28-Section-Handout - CS107 Spring 2007 Handout 28 May 11,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS107 Handout 28 Spring 2007 May 11, 2007 Section Handout RSS News Feed Madness You're writing a concurrent C program to simulate the chaos at Terman the night that Assignment 6: News Feed Aggregator comes due. All 14 TAs are there, ready to answer questions through the night—in fact, the TAs love CS107 students so much that they all stay until the very last student leaves. All 170 CS107 students come to Terman with what they assume is just one bug. Each student waits for one of the 39 computers to become available (and all computers are initially available), and once one becomes available, he logs in, debugs for a while, and then searches for an available TA (all of whom are initially available) to look at his code. The TA informs him of the number of bugs in his code. If there are no bugs, the student rejoices, logs out, and leaves. If his code is still buggy, then the student goes back to his computer and debugs a little more, and repeats the process. If the TA ever reports that the number of bugs is 10 or more, the student gives up, logs out and leaves
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/14/2010 for the course CS 107 taught by Professor Cain,g during the Spring '08 term at Stanford.

Ask a homework question - tutors are online