midtermqns - CS 3211 1 NATIONAL UNIVERSITY OF SINGAPORE...

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

View Full Document Right Arrow Icon
CS 3211 1 NATIONAL UNIVERSITY OF SINGAPORE SCHOOL OF COMPUTING Midterm EXAMINATION FOR Semester 2, 2009/2010 CS 3211 - PARALLEL and CONCURRENT PROGRAMMING March 2010 Time Allowed: 1 hour 15 minutes INSTRUCTIONS TO CANDIDATES 1. Answer ALL questions in the space provided in this booklet. 2. All answers should come with the correct justifications, there is no credit for guessing. 3. This is an OPEN BOOK examination. 4. Please write your Matriculation Number below. MATRICULATION NO.: (This portion is reserved for the examiner’s use only) Question Marks Remark Question A 2 Question B 2 Question C 2 Question D 3 Question E 3 Question F 2 Question G 3 Question H 3 Total 20
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 3211 2 A. Define a process Duplicate which takes a value 0. .9 as input, and outputs two copies of the value. Use process equations to define the process. [2 marks]
Background image of page 2
3 B. Consider a lock process defined via a process equation Lock = acquire -> release -> Lock. Processes using the lock will synchronize with it using the acquire and release actions. Extend the above definition to define a lock process which can be acquired by the same process more than once, just like the recursive locking mechanism in Java which was taught in class. [2 marks]
Background image of page 3

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

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

This note was uploaded on 12/02/2011 for the course CS 3211 taught by Professor Dunnowho during the Spring '11 term at National University of Singapore.

Page1 / 10

midtermqns - CS 3211 1 NATIONAL UNIVERSITY OF SINGAPORE...

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

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