← Indietro
EsameEsame completoTesto d’esame

01 01 2022 E TS

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

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…

Anteprima

Prima pagina del documento.

Prima pagina: 01 01 2022 E TS