Koofers

Past Exam for CS 999 - COMPUTER SCIENCE GRAD AUDIT at Old Dominion (ODU)

Exam Information

Material Type:Exam 2
Professor:Staff
Class:CS 999 - COMPUTER SCIENCE GRAD AUDIT
Subject:Computer Science
University:Old Dominion University
Term:Spring 2006
Keywords:
  • Instructions
  • Provided That
  • Memory Systems
  • Internal Fragmentation
  • External Fragmentation
  • Performance
  • Virtual Memory
  • Implementation
  • Segmentation
  • Honor Pledge
Login / Sign Up to View Document
Preview Page 1Preview Page 2Preview Page 3Preview Page 4Preview Page 5

Sample Document Text

CS 471: Operating Systems In-Class Exam 2 Name:________________________ April 20 2006 Instructions: This exam is open book, open notes. The work you turn in must be your own. To receive credit you must sign the honor pledge at the end of the exam. 1. (10 pts) Consider the bakery algorithm for critical sections. n processes have the shared data: boolean choosing[n]; int number[n]; which are initialized to false and 0 respectively. Each process has a unique number, i, each executes the following code: do { choosing[ i ] = true; number[ i ] = max( number[0], number[1], ., number[n - 1] ) + 1; choosing[ i ] = false; for ( j = 0; j < n; j++ ) { while ( choosing[ j ] ) ; while ( (number[ j ] != 0 ) && ( ( number[ j ], j ) < ( number[ i ], i ) ) ; } critical section number[ i ] = 0; remainder section } while ( 1 ); Why must the second while loop check both the number array and the values of i and j? Hint: Part of you answer should explain why two processe...

Related Documents

Associative Memory Exam
Associative Memory Exam
Associative Memory Exam
Associative Memory Exam
Instructions Exam
Instructions Exam
Internal Fragmentation Notes
Memory References Exam
Memory References Exam
Internal Fragmentation Notes
Directories Exam
Directories Exam
Performance Exam
Positive Value Exam
Positive Value Exam
Particularly Exam
155, "/var/app/current/tmp/"