Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 17 10:12:22 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m8HHCMXE012672 for ; Wed, 17 Sep 2008 10:12:22 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m8HHDY9r026038 for ; Wed, 17 Sep 2008 10:13:34 -0700 Message-Id: <200809171713.m8HHDY9r026038@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: proj 2 ques Date: Wed, 17 Sep 2008 10:13:34 -0700 From: Bill Cheng Someone wrote: > I have follwing questions > 1) I have used 3 threads in prog - arrival and 2 server.Can any > one of these threads handle contrl C and set termination flag > or all threads will have to handle it. I think you should have only one thread handling and that thread should wake all other threads up. So, essentially, all threads are woken up by . > 2) What is max size for customers and queue? No max size. So, you should use a linked list of a dynamic array to implement the queue. > 3) Can we assume that file is in proper format if trace file is > specified? That's never a good idea. You can assume that it's in the proper format. As soon as you detect something unexpected, you assume that it's an error and quit (and print out why you quit). -- Bill Cheng // bill.cheng@usc.edu