Back
ExamFull examExam paper only

01 01 2022 E TS

Full exam for Advanced Operating Systems in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Advanced Operating Systems - Part A, January 1st 2022 Exercises and solutions Exam finalization Question 1.1 This is part A of the AOS’s exam and today you are finalising your entire grade. You must express now how you have finalised part B. The answer is mandatory for the

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: Advanced Operating Systems - Part A, January 1st 2022 Exercises and solutions Exam finalization Question 1.1 This is part A of the AOS’s exam and today you are finalising your entire grade. You must express now how you have finalised part B. The answer is mandatory for the

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

Advanced Operating Systems - Part A, January 1st 2022 Exercises and solutions Exam finalization Question 1.1 This is part A of the AOS’s exam and today you are finalising your entire grade. You must express now how you have finalised part B. The answer is mandatory for the entire exam. Exercise 2 — Open and closed questions (Points 15) Question 2.1 (Points 5) Describe the total store ordering (TSO) memory model and how it affects concurrent programming within the Linux kernel. Solution • In a multiprocessor, a memory model describes how the order of the operations on shared data done by one cpu is seen by another CPU. • In a TSO processor – The apparent ordering is impacted by the use CPU-local write queue to hide memory latency. – Stores are not seen immediately but, once seen, all cpus do agree on the (total) order in which they reached the shared memory • The effect is that loads might be reordered vs stores, e.g.: 1 store 1, X 2 load r1, Y 3 store 1, Y 4 load r2, X might behave like the following sequence 1 load r1, Y 2 load r2, X 3 store 1, X 4 store 1, Y • To force the code execution back into a sequentially consistent behavior, write memory fences (barrier) instructions must be used. 1 store 1, X 2 wmb 3 load r1, Y 4 store 1, Y 5 wmb 6 load r2, X Question 2.2 (Points 5) What is the purpose of the slab allocator in Linux? What is is overall structure? Solution • The slab allocator’s purpose is to efficiently allocate/deallocate kernel structures In fact, you can’t use a page for each structure because it would bring to considerable internal fragmentation. • An object cache is a set of slabs used to store objects of a specific type t. • The slab is an intermediary structure which consists of one or more contiguous page frames that contain both allocated and free…

Preview

First page of the document.

First page: 01 01 2022 E TS