Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Middleware Technologies for Distributed Systems
- Classification
- Exam · Full exam
- Content
- Exam paper only
- Original format
- Text
- Searchable text
Full exam for Middleware Technologies for Distributed Systems in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Politecnico di Milano – School of Informatics 090931 – Middleware Technologies for Dist. Sys. Prof. G. Cugola – February 5th, 2014 Rules: You are not allowed to use books, notes, or other material. You can answer in Italian or English. Total time for the test: 1.5 hours.
Full exam for Middleware Technologies for Distributed Systems in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Politecnico di Milano – School of Informatics 090931 – Middleware Technologies for Dist. Sys. Prof. G. Cugola – February 5th, 2014 Rules: You are not allowed to use books, notes, or other material. You can answer in Italian or English. Total time for the test: 1.5 hours.
Import quality: text was extracted directly from the original document.
Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.
Politecnico di Milano – School of Informatics 090931 – Middleware Technologies for Dist. Sys. Prof. G. Cugola – February 5th, 2014 Rules: You are not allowed to use books, notes, or other material. You can answer in Italian or English. Total time for the test: 1.5 hours. 1. Implement in Java the PriorityMutex class. It looks like a pthread mutex but uses priorities to choose the thread to wakeup upon unlocking by the current owner . It offers the following methods: lock(int priority) which acquires the mut ex unless held by another thread , unlock() which releases the mutex, bool isLocked() which return s true if the mutex is already locked, otherwise acquires it and return false. The peculiarity of this mutex is that, upon unlocking, it gives access to (one a mong) the highest priority waiting threads. 2. Write in TinyOS a module that uses the Timer<TMilli> and Read<uint16_t> interfaces and implements the Listener interface (see below) to read the value of a temperature sensor every second, calculates the average value every ten reads and notifies the listener. interface Read<val_t> { command error_t read(); event void readDone( error_t result, val_t val ); } interface Timer<precision_tag> { command void startPeriodic(uint32_t dt); command void startOneShot(uint32_t dt); command void stop(); event void fired(); } interface Listener { event void notify(uint16_t value) } 3. Write the CORBA interface for a printing server. It allows documents (characterized by a name and a sequence of bytes) to be printed (returning the job id), the list of jobs in queue to be read , and a specific job to be removed. It also allows to register a listener to be notified when a specific job (identified by its job id) completes. 4. Write the OpenMP code (the minimal fragment of code…
First page of the document.