Back
ExamFull examExam paper only

24 02 16 1

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. 2015-2016 – Exam date: 24 February 2016 Prof. William FORNACIARI Surname (readable)........................................ Name (readable)............................

Advanced Operating SystemsFull exam

Document information

What's included in this study material

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. 2015-2016 – Exam date: 24 February 2016 Prof. William FORNACIARI Surname (readable)........................................ Name (readable)............................

Import quality: text was extracted directly from the original document.

Extracted content from the 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.

Page 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…

Preview

First page of the document.

First page: 24 02 16 1