Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Advanced Operating Systems
- Academic year
- 2014-2015
- Classification
- Exam · Full exam
- Content
- Exam paper only
- Original format
- Text
- Searchable text
Full exam for Advanced Operating Systems in the Computer Engineering degree programme at Politecnico di Milano. The document covers: 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)............................
Full exam for Advanced Operating Systems in the Computer Engineering degree programme at Politecnico di Milano. The document covers: 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)............................
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 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…
First page of the document.