G52CON Exam Feedback 2006-2007

General Comments

The exam was attempted by 59 candidates. Many candidates did well, with about one third of students obtaining a mark in the first class range. However a disappointing number of students did poorly. The average for the exam was 53 (excluding zeros), and the highest mark was 92.

Question 1

This was a compulsory multiple choice question and was attempted by all 59 candidates.

Most candidates seemed to have fewest problems with parts (d) and (e). Otherwise, errors were more or less uniformly distributed across the other question parts.

Minimum mark: 0 Maximum mark: 25 Average mark: 14.5

Question 2

This question was on mutual exclusion protocols, and was attempted by 41 candidates.

In part (a) most students were able to provide a reasonable definition of interference and the role of mutual exclusion protocols in avoiding it. In part (b), although there were some correct answers, many candidates either failed to read the question carefully and thought that the algorithm given was Peterson's, or didn't realise that the changes introduced resulted in the Mutual Exclusion property being violated (all the other properties however continue to hold). As ever, some candidates misremembered (or misunderstood) what some of the properties mean. Solutions to part (c) were reasonable on the whole.

Minimum mark: 2 Maximum mark: 24 Average mark: 11.3

Question 3

This question was on semaphores and producer consumer problems and was attempted by 50 candidates.

In part (a), nearly everyone was able to give a reasonable definition of a semaphore. The most common mistake here was failing to mention that the P and V operations must be implemented as atomic actions. Part (b) was also well answered in general, though some candidates simply reproduced a variant of the zero element buffer solution from the lectures. In part (c), some candidates pointed out that two buffer slots would be useful if the producer and consumer occasionally ran at different rates. While this is true, the main use of double buffering is in situations such as video display, where a single buffer would cause the consumer to block while the producer is filling the buffer (and vice versa).

Minimum mark: 0 Maximum mark: 24 Average mark: 12.3

Question 4

This question was on monitors and was attempted by 37 candidates.

Most candidates were able to provide a reasonable definition of a monitor in part (a). Many candidates were also able to implement the Barrier monitor in part (b). Common mistakes included incrementing the count of waiting process after calling wait() (i.e., effectively not incrementing the count at all, as the process blocks after calling wait()) and failing to declare the condition variable (the latter was acceptable if the solution was given in Java rather than pseudocode, but in this case await had to be synchronized and interrupts handled properly). Many candidates could also explain the difference between signal and wait and signal and continue in part (c). Solutions to part (d) were usually correct when the solution to part (b) was.

Minimum mark: 0 Maximum mark: 25 Average mark: 13.7

Question 5

This question was on Java and was attempted by 42 candidates.

Most candidates were able to give a reasonable account of the major stages in the life cycle of a thread. The most common mistake was thinking that interrupting a thread causes it to become "cancelled" or dead. In part (b), many candidates were able to more or less reproduce the solution to unassessed exercise 4 (or solved the question from scratch). The most common errors were using notify() rather than notifyAll() in the deposit method (the use of notify() vs. notifyAll() was covered in lecture 11), failure to handle interrupts during wait() in the withdraw method, and thinking that both synchronized and volatile were required. The latter is harmless, in that the code will work, but indicates a lack of understanding of how Java works. In other cases, candidates attempted to make their solutions more "efficient", with complex notification schemes and/or non-standard locks. These often didn't work and/or were significantly less efficient that using notifyAll(). In part (c), some candidates noticed that the transfer method could result in deadlock and were able to use the resource ordering approach covered in lecture 13 to avoid the problem.

Minimum mark: 2 Maximum mark: 25 Average mark: 13.5

Question 6

This question was on correctness and CTL and was attempted by only 6 candidates.

It was well answered by most candidates who attempted it. Nearly all were able to give a reasonable explanation of why proving properties of concurrent programs is important. In part (b) most candidates got the first property (mutual exclusion) correct; however there were more problems with expressing eventual entry in CTL.

Minimum mark: 15 Maximum mark 25: Average mark: 20.3


This file is maintained by Brian Logan
Last modified: 15:19, 05-Jun-2007