← Indietro
EsameEsame completoTesto d’esame

15 01 2024 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, Jan 15th, 2024 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) Address the following 3 sub-questions related to concurrency in the Linux kernel. Please USE CAPITAL LETTERS and respect the space allocated to each sub-question. Solution 1. Preemption points. From 2.6, Linux kernel became optionally preemptive. The preemption points are: • At the end of interrupt/exception handling , when TIF_NEED_RESCHED flag in the thread descriptor has been set (forced process switch) • If a task in the kernel explicitly blocks and calls schedule() (planned process switch ). It is however always assumed that the code that explicitly calls schedule() knows it is safe to reschedule. 2. preempt_count. The kernel is keeping track of nested atomic contexts with a process-local preempt_count variable. The kernel bumps up its value whenever it kickstarts an interrupt or grabs a spinlock. Preemption points decrease the variable and check if it’s not zero, which means: “Nope, a context switch isn’t still possible right now.” It’s only once we’ve dealt with our final level of interrupt or released our last spinlock that preemption gets the green light again. 3. The ABA problem. The ABA problem occurs in concurrent programming when a location in memory is read twice, and both reads return the same value, but the value could have changed in between the two reads. Specifically, when using compare-and-swap (CAS) operations, a thread might read a value A, get preempted, and then another thread might change…

Anteprima

Prima pagina del documento.

Prima pagina: 15 01 2024 E TS