← Indietro
EsameEsame completoTesto d’esame

18 12 14

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. 2014-2015 – Exam date: 18 December 2014 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 main algorithms for the scheduling of a single-core CPU, paying particular attention to the possible overhead, fairness and reactivity. Question Q2 Consider the following multithreaded C program. 1) Describe the program flow from start to finish detailing the synchronizations that happen between the threads. Write what the program prints on the standard output. 2) Write the modifications that need to be performed to the code to have two consumers reading from the queue instead of one. It is not required to rewrite the entire program, just detail the source lines that need to be added and/or modified. 3) (optional, for one additional point) There is a deadlock in the program, find it. #include <stdio.h> 1/12 #include <stdlib.h> #include <pthread.h> #include <unistd.h> struct List { char *str; struct List *next; }; pthread_mutex_t mutex=PTHREAD_MUTEX_INITIALIZER; pthread_cond_t…

Anteprima

Prima pagina del documento.

Prima pagina: 18 12 14