CS 2200 Exam Study Guide The final exam will emphasize material not covered on test 1 and 2. However, any material from the course is fair game. Here is a "rough" guide to material not covered on Tests Input Output Threads Parallel Computing Networking Network Protocols Distributed Systems & RPC TCP/IP Listed below are questions from past final exams. THERE IS NO GUARANTEE THAT THIS LIST IS ANY KIND OF INDICATOR OF EXACTLY WHAT WILL BE ON THE FINAL. In other words, there might be more problems requiring calculations, etc. Also be advised that these questions come mostly from Bill Leahy's tests and that Professor Fujimoto's tests may be different. *. A disk has 20 surfaces (i.e. 10 double sided platters). Each surface has 1000 tracks. Each track has 128 sectors. Each sector can hold 64 bytes. The disk space allocation policy allocates an integral number of contiguous cylinders to each file, How many bytes are contained in one cylinder? How many cylinders are needed to accommodate a 5-Megabyte file on the disk? How much space is wasted in allocating this 5-Megabyte file? *. Is a megabyte exactly 1 million bytes? ___ Yes ___ No ___ I'm not sure? ___ I'm changing my major *. What is the difference between program controlled I/O and DMA? *. A disk has the following configuration: The disk has 310 MB Track size: 4096 bytes Sector Size: 64 bytes Mr. Gill Bates a programmer at Macrosoftware has 96 objects each being 50 bytes in size. He decides to save each object as an individual file. How many bytes (in total) are actually written to disk? *. Describe in detail the sequence of operations involved in a DMA data transfer. *. What are the mechanical things that must happen before a disk drive can read data. ___ DMA transfer request must be initiated by processor ___ Heads must be positioned on correct track ___ Thread scheduler must block on I/O call ___ Disk must rotate so that desired sector is under head *. A disk drive has 3 double-sided platters. The drive has 300 cylinders. How many tracks are there? ___ 600 ___ 900 ___ 1800 ___ 3600 *. While a disk unit is performing a DMA transfer what device keeps the processor from having to steal bus cycles? ___ Cache consistency protocol ___ TCP/IP stack ___ Cache ___ Club anti-theft device *. A bus normally contains what three kinds of wires or lines? ___ Twisted pair ___ Data ___ Multi-mode ___ Full metal jacket ___ Control ___ Phaser ___ Address *. What is typically the fastest? ___ Program controlled I/O ___ DMA ___ Custom I/O Processor *. Select all choices that apply regarding threads created in the same address space. ___ they share code ___ they share global data ___ they share the stack ___ they share the heap *. From the following sentences regarding threads, select the ones that are True. ___ An operating system that provides no support for threads will block the entire process if one of the (user level) threads in that process makes a blocking system call. ___ In pthreads, a thread that does a pthread_cond_wait will always block. ___ In pthreads, a thread that does a pthread_mutex_lock will always block. ___ In Solaris, all user level threads in the same process compete equally for CPU resources. ___ All the threads within a single process in Solaris share the same page table. *. List two advantages of buses ___ Cheap ___ Throughput bottleneck ___ Flexible ___ Yellow ___ CDSMA ___ Congestion resistant *. How does a device on the Ethernet know that there is a collision? ___ Sound collision warnings ___ Lookout ___ Collision avoidance radar ___ Listening *. What is the normal objective of a disk scheduling algorithm? ___ Minimize rotational latency ___ Control head acceleration ___ Maximize skew ratio ___ Minimize head movement *. What are the two schemes used to connect nodes on a multiprocessor? ___ PB & J ___ Bus ___ Vampire taps ___ Network ___ Net worth ___ Net BIOS ___ NetBUI ___ Munder NetNet *. Does snooping work with a network connected computer to keep caches consistent? ___ Yes ___ No *. The use of checksum in a packet is intended to address the following sources of unreliability in networks ___ corrupted or mangled data packets ___ out of order packet arrival ___ loss of packets ___ spurious packets injected into the network *. What is the big advantage of kernel threads? ___ Allow for non-blocking upcalls to TCP/IP ___ Allow O/S to schedule different threads on different processors ___ Abstraction of user level threads into LWP's *. Why use a "while" loop around a pthread_cond_wait() call? ___ Allow us to bypass wait when not necessary ___ Clear consistent programming style ___ Insures that required resource is still available *. With pthreads, do you have any control over thread scheduling? ___ Yes ___ No ___ Only with Solaris V ___ Only with Red Hat Linux 3.6 *. Select all statements that are True with respect to the remote procedure call mechanism ___ The parameter passing mechanism that is usually allowed is value/result. ___ It guarantees that the call will be executed at least once. ___ It is most efficient to implement without transport layer level ACKS. ___ It blocks the caller until the result comes back from the call. ___ It requires a nameserver *. There is an old network saying: Bandwidth problems can be cured with money. Latency problems are harder because the speed of light is fixed-you can't bribe ____________. ___ Your TA ___ Your instructor ___ God ___ Jim Greenlee *. How does the receiver of a packet verify that the packet arrived correctly, that is without error? (Check all that apply) ___ Parity checking ___ Checksum ___ Handwaving ___ Bit count *. What allows multiple devices on a network to talk to one another simultaneously? (Check all that apply) ___ Token ring ___ Shared Media ___ Switched Media ___ Virtual LAN's ___ NIC ___ Repeater *. In a token ring network there are typically how many tokens? (Check all that apply) ___ 1 for the sender ___ 1 for the receiver ___ 1 for the bus arbiter ___ 1 for each bridge *. What technique is typically used today to locate a desired service? (Check all that apply) ___ Load time binding ___ IMP Router Tables ___ Domain Name Servers ___ Broadcast Service Request (BSR) *. What are network protocols used for? (Check all that apply) ___ Deal with sources of unreliability ___ Shielding from RF interference ___ ISP Loading ___ Polling *. How do we deal with out of order delivery? (Check all that apply) ___ Timer ___ Attach sequnce number to packet ___ Maintain counter ___ Sliding window ___ Session ID *. How do we deal with Duplicate packets? (Check all that apply) ___ Timer ___ Attach sequnce number to packet ___ Maintain counter ___ Sliding window ___ Session ID *. How do we deal with Lost packets? (Check all that apply) ___ Timer ___ Attach sequnce number to packet ___ Maintain counter ___ Sliding window ___ Session ID *. How do we deal with flow control i.e. Having to wait a long time for acks. (Check all that apply) ___ Timer ___ Attach sequnce number to packet ___ Maintain counter ___ Sliding window ___ Session ID *. RPC is modeled after (Check all that apply) ___ Circuit switching ___ Stub marshalling ___ Procedural abstraction ___ CSMA/CD *. Telnet and FTP are examples of services found on a: ___ Network Operating System ___ Distributed OS *. Rank in order of typical distance between nodes (closest to farthest apart) ___ LAN ___ MPP ___ WAN *. What does a sliding window do? (Check all that apply) ___ Allow transmission of multiple packets before receiving an ACK ___ Provide a mechanism for responding to congestion ___ Provide more flexibility when defenestrating ___ Increase performance *. Where are massively parallel processors typically connected? ___ Memory Bus ___ I/O Bus *. Where are LAN's and WAN's typically connected? ___ Memory Bus ___ I/O Bus *. What can we do to reduce congestion in a network? (Check all that apply) ___ Log off ISP's ___ Throw away packets ___ Tune bandwidth ___ Pin processors *. Mark all that understand IP addresses ___ Repeaters ___ Bridges ___ Routers ___ Dan Colestock *. What happens when you take that little resistor off the end of the ethernet coax cable? (Check all that apply) ___ Refraction ___ Reflection ___ Rarification ___ Reduction ___ Resistance *. What semantics are used by RPC? (Check all that apply) ___ Only once ___ At least once ___ At most once ___ One ounce *. Here are the 5 layers of the TCP/IP protocol Layer 1: Physical Layer 2: Network Interface Layer 3: Internet Layer 4: Transport Layer 5: Application For the item below specify which layer is responsible ___ Specifies how one application uses an internet ___ Specify forwarding mechanisms used by routers ___ Organize data into frames ___ Specifies how to ensure reliable transfer ___ How to transmit over network ___ Basic network hardware *. Write a function in C that will swap two integers. The call will look like this: int a = 10; int b = 20; /* Call to swap occurs here */ printf("%d %d\n", a, b); ----------------------------------------------------------- Output: 20 10 ----------------------------------------------------------- Write the function here: