Exams

This page contains information abot the exam/tests, including the results. At CEBP/PCBE, the weights used when calculating the general grade are: 0.65 for the exam/tests, and 0.35 for the lab.

Please visit this page often, to learn about the latest updates.

Updated: February 19, 2018

Rezultate/Results

Rezultatele dupa a treia prezentare/Results after the third exam:

Pentru eventualele observatii despre a treia prezentare, puteti sa imi trimiteti un e-mail pana marti, 20.02.2018. ora 17.

Exam/tests schedule

Both Romanian and English sections (CTI-RO, CTI-EN):

  • First exam: Wednesday, December 6, 2017, 12:15, room A109. Exam duration: 1h30' (2x45 min.)
  • Second exam: Wednesday, January 10, 2017, 12:15, room A109. Exam duration: 1h30' (2x45 min.)
  • Third exam: 19 February 2018, 15:00, B528b.

Note: the schedule or the rooms may change. Please check this page and the official notice board for the exams.

Study guide

This section delimits the parts necessary for studying when preparing for the exam/tests.

Students should read the recommended books and documentation specified in the Bibliography, and those specified as Suggested Reading in Section Lectures, which correspond to the subsets of slides presented below. The slide numbers are the same as the ones published in Section Lectures.

Important: Section Lectures also contains details about the correspondence between the course content and the recommended bibliography.

Mandatory sections for the exam:

Part I

Slides:

  • 8-159
  • 174-214

Part II

Slides:

  • 215-225
  • 231-246
  • 260-292
  • 314-321
  • 344-382, 384-389, 393-402

The exam/test for Part II may also include a concurrency problem to implement in Java (see below).

Examples of exam questions

These questions should not be regarded as indications on how the actual exam questions may look like.

  • Define the concept of Thread Safety
  • How is the monitor concept implemented in Java?
  • What is "lock ordering deadlock"?
  • Describe the readers-writers problem and write a solution for it (as Java code or pseudocode)
  • Define "attribute filtering" in the context of event-based applications.
  • Explain the concept of Deadlock
  • Describe the concept of Barrier. Give an example.
  • Describe the event subscription model based on channels
  • Describe the technique called Thread Confinement and present two ways of applying it.
  • Explain the concept of "state space" for an object, and explain how does it influence the goal of making programs thread safe.
  • Provide an example of unsafe publication for an object.

Example of a concurrency problem

This problem was part of an exam in 2015

Consider a Java program that models a theatre hall and the audience access in the hall. There are three doors where people can enter the hall, each guarded by a theatre employee. At each door there is an electronic device that counts the number of persons entering that particular door. There are no other means of counting the audience. The system must only allow a total of maximum N persons inside the hall, regardless of the number of persons that entered each door. Once in the hall, a person must choose a seat, making sure it is not already occupied.

Implement the Java thread that models a person, by writing:

  • the thread class declaration, fields, relevant methods
  • the synchronization mechanism necessary and the shared resources that model the given scenario
  • the run() method of the thread.

Explain the algorithm and the synchronization mechanisms used. The Java code of the program must contain sufficient functionality to clearly and unequivocally describe the chosen algorithm.