Final Exam - Final Exam Take your time and read each...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Final Exam Take your time and read each question carefully. Some have multiple parts. Be sure to answer each part. Use more pages if necessary. Be sure to put your name on each exam page. 1.Fill in the blanks: 1. Most of the tasks in a computer are __________________ bound. 2. Predicted SJF uses __________________ to estimate the length of the next processing burst. 3. _____________________ is a condition that happens when a process waits for something that may never happen. 2. Assume that two or more processes communicate with each other using enqueue() and dequeue() (described below) on a circular queue. Complete these procedures using semaphores. Make sure that a processes calling enqueue() will block if the queue is full, and a process calling dequeue() will block if the queue is empty. Also make sure that no races can happen. Don't forget the semaphore initializations. const int MAXQUEUE = 10; int queue[ MAXQUEUE ]; int tail; int head; /* Other declarations and initializations here */
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/30/2012 for the course CS 252 taught by Professor Gustavorodriguez during the Fall '11 term at Purdue University.

Page1 / 3

Final Exam - Final Exam Take your time and read each...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online