← Indietro
EsameEsame completoTesto d’esame

2014 02 19

Esame completo di Middleware Technologies for Distributed Systems per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Middleware Technologies for Distributed SystemsEsame completo

Informazioni sul documento

Cosa trovi in questo materiale

Esame completo di Middleware Technologies for Distributed Systems per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.

Contenuti estratti dal documento

Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.

Pagina 1

Politecnico di Milano – School of Informatics 090931 – Middleware Technologies for Dist. Sys. Prof. G. Cugola – February 19th, 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 a class Buffer that holds 10 integers and offers methods to read, get, and write each of these 10 integers separately (assume that only positive values can be written, such that you can use a negative value to encode the fact that a position is empty). Method int read(int pos) suspends the caller if the given position is empty. Method void write(int value, int pos) does the same if the given position is full, finally, method int get(int pos) operates in a way similar to read but it clears the given position at the end. Organize synchronization such that: (i) parallelism is maximized; (ii) when a position is written, precedence is given to the thread waiting for reading from that position, before those waiting for “getting” the data. 2. Imagine you have a WSN node with three temperature sensors on board. Write in TinyOS a module that implements the Read<uint16_t> interface (see below) to offer its clients the ability of reading the average temperature read by the three s ensors at once. In other words, this module provides the Read<uint16_t> interface and uses the same interface three times (one for each temperature sensor). When asked to read data, it reads the three sensors and returns the average of the three values read. interface Read<val_t> { command error_t read(); event void readDone( error_t result, val_t val ); } 3. Write the CORBA interface for a WSN that monitors temperature in a building. It allows to access the current temperature read by a given node ( passing…

Anteprima

Prima pagina del documento.

Prima pagina: 2014 02 19