← Indietro
EsameEsame completoTesto d’esame

24 02 16 1

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

Advanced Operating SystemsEsame completo

Informazioni sul documento

Cosa trovi in questo materiale

Esame completo di Advanced Operating 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 FACOLTÀ DI INGEGNERIA DELL’INFORMAZIONE Advanced Operating Systems A.A. 2015-2016 – Exam date: 24 February 2016 Prof. William FORNACIARI Surname (readable)........................................ Name (readable)............................ Matr................................................................. Signature........................................ Q1 Q2 Q3 TOT NOTES It is forbidden to refer to texts or notes of any kind as well as interact with their neighbors. Anyone found in possession of documents relating to the course, although not directly relevant to the subject of the examination will cancel the test. It is not allowed to leave during the first half hour, the task must still be returned, even if it is withdrawn. The presence of the writing (not delivered) implies the renunciation of any previous ratings. Question Q1 Describe the general characteristics and figures of merit of a CPU scheduler and those more related to the case of Real Time Operating Systems. 1/3 Question Q2 You are required to implement a library function in a file called execute.cpp with the signature: void executeAndCallBack(std::function<void ()> task, std::function<void ()> callback); and associated data structures that, the first time it is called, creates a thread that first executes the task and then calls the callback. After it has completed, the thread shall not terminate, and instead be reused for the same purpose in successive calls to the same function, in order to avoid the overhead of thread creation/termination. The function executeAndCallBack() may be called also while a task is running, and this case the passed tasks and callbacks need to be queued for execution by the same background thread. Solution: execute.cpp #include <iostream> #include…

Anteprima

Prima pagina del documento.

Prima pagina: 24 02 16 1