Koofers

Past Exam for CS 471 - OPERATING SYSTEMS at Old Dominion (ODU)

Exam Information

Material Type:Exam 1
Professor:Staff
Class:CS 471 - OPERATING SYSTEMS
Subject:Computer Science
University:Old Dominion University
Term: 2005
Keywords:
  • Program Performance
  • Memory References
  • Immediately
  • Different Values
  • Application
  • Distinction
  • Process Control
  • Modern Operating Systems
  • Utilization
  • Context Switch
Login / Sign Up to View Document
Preview Page 1Preview Page 2Preview Page 3Preview Page 4Preview Page 5

Sample Document Text

CS 471 - Exam 1 Key Name:_______Key________ Feb. 26 2002 Note: answers below are taken from exam papers of class members. Instructions: This exam must be mailed to cmo by midnight, March 6, 2002. You may submit either a Word or a text file. The exam is open book, open notes. However, you should not discuss the exam with anyone until after March 6. 1. (20 pts) Consider the following code: #define BUFFER_SIZE x typedef struct { . . . } // Producer while (1) { while ( ( (in+1) % BUFFER_SIZE ) == out ) ; // do nothing buffer[ in ] = nextProduced; in = ( in+1 ) % BUFFER_SIZE } // Consumer while (1) { while ( in==out ) ; nextConsumed = buffer[ out ]; out = ( out+1 ) % BUFFER_SIZE } a. What would be the effect of setting BUFFER_SIZE to 1? If in and out are initially set to 0, (in+1) % BUFFER_SIZE would equal 0. The "while ( ( (in+1) % BUFFER_SIZE ) == out ); // do nothing" statement in the producer would result in an endless loop. in never gets in...

Related Documents

Program Performance Exam
Program Performance Exam
Following Costs Exam
Gatekeepers Exam
Aggressive Strategy Notes
Maccabean Revolt Notes
General Controls Notes
Generate Outputs Notes
Doctors Office Notes
Specific Methods Notes
Buffer State Notes
In/on/at a Place Notes
Institutional Sexism Notes
Behind (of) Exam
Overhead Application Exam
Overhead Application Exam
155, "/var/app/current/tmp/"