OPERATING SYSTEMS A - L

Academic Year 2023/2024 - Teacher: MARIO DI RAIMONDO

Expected Learning Outcomes

  • Knowledge and understanding: the student will understand how a modern Operating System manages the hardware and software resources of a computer.
  • Applying knowledge and understanding: the student will learn how judge the pros and cons of a solution in the ambit of Operating Systems; this by means of the study of the characteristics of existing approaches in hardware/software resource management.
  • Making judgements: the student will learn how to analyse and formalize requirements of specific problems and to point the best solution.
  • Communication skills: the student will learn the specific technical micro-language and he will be able to interface with technical documentation.
  • Learning skills: the theoretical background and practical knowledge offered by this course allow the student to better understand the foundation used by any modern software solution; this usually helps in developing better software.

Course Structure

In class oral lessons on theoretical arguments and on laboratory-related aspects.

Should teaching be carried out in mixed mode or remotely, it may be necessary to introduce changes with respect to previous statements, in line with the programme planned and outlined in the syllabus.

Required Prerequisites

requirements: basics of programming, knowledge of computer architectures

prerequisite: Computer Architecture, Programming 1

Attendance of Lessons

Attendance of the lessons is not compulsory but strongly recommended to guarantee a suitable degree of understanding of the proposed topics.

Detailed Course Content

The course is an introduction to principles and design of operating systems, as it is essential to coordinate activities and resources of a computing system. It covers the main topics from the software architectures to the management of processes and system resources. The laboratory part will focus on the use of standard tools (POSIX) in UNIX-like environments for the management of processes and threads as well as communication and coordination between them.

Textbook Information


AuthorTitlePublisherYearISBN
Andrew S. Tanenbaum, Herbert BosI moderni sistemi operativi (quinta edizione)Pearson20239788891912695
Abraham Silberschatz, Peter Baer Galvin, Greg GagneSistemi operativi – Concetti ed esempi (nona edizione)Pearson20149788865183717

Course Planning

 SubjectsText References
1Teoria:
2Introduzione al concetto di sistema operativocap.1 di [TB], cap.1 di [SGG]
3Richiami all'architettura degli elaboratoricap.1 di [TB], cap.1 di [SGG]
4Struttura di un sistema operativocap.1 di [TB], cap.2 di [SGG]
5I processi: definizione, multiprogrammazione, stati e transizionicap.2 di [TB], cap.3,4 di [SGG]
6I thread: definizione, modelli utilizzabili; programmazione multicorecap.2 di [TB], cap.4 di [SGG]
7Sezioni critiche e mutua esclusione: variabili di lock, alternanza stretta, soluzione di Peterson, istruzioni TSL/XCHG, semafori, mutex lock in spazio utente, futex, monitor, messaggi tra processicap.2 di [TB], cap.6 di [SGG]
8Problema dei 5 filosofi e dei lettori-scrittori (soluzioni basate su semafori e monitor)cap.2 di [TB], cap.6 di [SGG]
9Scheduling: scheduler e dispatchercap.2 di [TB], cap.5 di [SGG]
10Algoritmi di scheduling: progettazione, FCFS, SJF, SRTN, RR, a priorità, con code multiple, SPN, garantito, a lotteria, fair-sharecap.2 di [TB], cap.5 di [SGG]
11Scheduling dei thread e su sistemi multi-processorecap.2 di [TB], cap.5 di [SGG]
12Gestione della memoria per la multi-programmazione: swapping, rilocazione, gestione dello spazio liberocap.3 di [TB], cap.8 di [SGG]
13Memoria virtuale: paginazione, tabella delle pagine, uso di memoria associativa, varianti multi-livello, tabella delle pagine invertita, conseguenze sulla cachecap.3 di [TB], cap.8 di [SGG]
14Algoritmi di sostituzione delle pagine: progettazione, ottimale, NRU, FIFO, seconda chance, clock, LRU, NFU, aging; anomalia di Beladycap.3 di [TB], cap.9 di [SGG]
15Altri aspetti legati alla gestione della memoria: allocazione dei frame, working set, controllo del carico, dimensione delle pagine, condivisione delle pagine, copy-on-write, zero-fill-on-demand, librerie condivise, mappatura di file, slab allocatorcap.3 di [TB], cap.9 di [SGG]
16File-system: astrazione, file, directorycap.4 di [TB], cap.10 di [SGG]
17Progettazione di un file-system: allocazione dei file (contigua, concatenata, tabellare e indicizzata), directory, hard/soft-link, gestione blocchi liberi (con bitmap e con lista concatenata)cap.4 di [TB], cap.11 di [SGG]
18Altri aspetti tecnici sui file-system: controlli di consistenza, journalingcap.4 di [TB], cap.11 di [SGG]
19Accenni sui file-system storici e contemporanei: FAT-[12,16,32,64], NTFS, ext-[2,3,4], BTRFScap.4,10,11 di [TB], cap.21,22 di [SGG]
20Scheduling del disco e relativi algoritmi: FCFS, SSTF, algoritmo dell'ascensore, variante circolarecap.5 di [TB], cap.12 di [SGG]
21Sistemi RAID: principi di base, RAID-[0,1,2,3,4,5]cap.5 di [TB], cap.12 di [SGG]
22Memorie flash, dischi a stato solido (SSD) e implicazioni sui file systemrisorse esterne
23Laboratorio:risorse esterne, man page
24Gestione dell'I/O su file, chiamate di servizio relative al file-system e alla mappatura dei file in memoria
25Gestione dei processi e dei thread: creazione e coordinamento tramite attesa
26Coordinamento tramite mutex/lock, semafori contatori, variabili condizione (in stile monitor), lock per reader/writer e barriere
27Accenno ai segnali sui sistemi UNIX

Learning Assessment

Learning Assessment Procedures

The exam consists of two tests to be passed in order but also on different dates:

  • theory test: it includes, within a single session, a written or computer-based test followed by an oral interview on the theory part of the program;
  • practical laboratory test: having passed the theory, it includes a session in the laboratory in which the student will have to write a program in C language that solves a proposed problem using the UNIX constructs and system calls seen in class.

Check all the details on how to book on the course website.

Verification of learning can also be carried out electronically, should the conditions require it.

Examples of frequently asked questions and / or exercises

In the course page are available:

  • a facsimile of the actual written test (see the FAQ section);
  • a series of laboratory exercises that students are invited to perform during the course;
  • all laboratory tests, some with solutions, carried out in past sessions.