OPERATING SYSTEMS - channel 2

ING-INF/05 - 6 CFU - 1° Semester

Teaching Staff

SALVATORE CAVALIERI


Learning Objectives

The main goal of the course is to acquire knowledge of the basic concepts related to the project of operating systems and the drawing up of programs in Linux / UNIX environment. At the end of the course students:
- will have acquired knowledge of the structure of Operating Systems, the relevant project issues and policies used for virtualization and the management of resources (CPU, main memory, mass storage, peripherals).
- will have acquired knowledge about the concepts of process and thread and their management.
- will have acquired knowledge on management techniques of mutually exclusive resources.
- will have become familiar in the interaction with the Linux shell.

Students at the end of the course will be able to write applications containing system calls for the:
- Creation and management of processes, send / signal management, interaction and communication between processes;
- Manage competition over shared resources;
- Creation of multithreaded applications.



Detailed Course Content

UNIT 1: EVOLUTION, STRUCTURE AND CLASSIFICATION OF OPERATING SYSTEMS. SYSTEM GNU / LINUX. VIRTUALIZATION.
General information on the operating systems. resource management. User interface. Kernel concept.
The GNU / Linux system.
Free software and related licenses. GPL.
Structure of operating systems: monolithic, microkernel, hybrid, client / server.
The history of Unix. The genealogy of the operating systems. The POSIX standard. Peculiarities of Unix and differences between Unix and Linux.
Concept of System calls and steps needed to achieve them. Overview of system calls of Unix / Linux, Windows.
Classification of operating systems. design choices related to different types of OS.
operating systems for multiprocessor architectures. Virtualization. virtual machines. Hypervisor level 1 and 2. Examples: VMware structure and Virtual Box.

UNIT 2: PROCESSES AND THREAD
Process concept. State diagram of a process.
Interruptions hardware and software and their management in operating systems.
System calls for the creation and management of processes: fork (), wait (), waitpid (). the exec () family.
Elements of system calls for the management of processes in the Windows environment.
Signals and their management. System call kill (), signal (), alarm (), sigaction ().
Examples of programs that use all the system calls mentioned.
Thread. General characteristics.
thread implementation: user space, kernel space, hybrid (with reference to the design choices of the main OS).
Activation Scheduler, upcall. specific data of the thread. thread groups.
The Pthreads library. pthread_create () functions, pthread_join (), pthread_exit (), pthread_detach, pthread_attr_init ().
thread in Windows Background.
thread cancellation.
Examples of programs that use the Pthreads library.
Linux: Exercise on shell commands. shell programming.

UNIT 3: INTER PROCESS COMMUNICATION, DEADLOCK.
Critical section. Mutual exclusion with busy waiting. Semaphores.
The producer and consumer's problem and its solution using semaphores.
Mutex. Implementation with thread in user space. pthread_mutex functions.
IPC on Linux. Semaphores: semget (), semop (), semctl (). Message queues: msgget (), msgsnd (), msgrcv (), msgctl (). Shared memory: shmget (), shmat (), shmdt (), shmctl ().
Communication in the client-server systems: sockets, pipes, FIFOs.
Deadlock. Problem definition and management strategies. Banker's algorithm with a single resource.

UNIT 4: SCHEDULING OF CPU
CPU scheduling. Aims. Classical algorithms: FIFO, round-robin scheduling based on priorities. The problem of starvation. multiple queues.
Notes on scheduling in real-time systems.
Notes on Linux scheduling: Completely Fair Scheduler.

UNIT 5: MANAGEMENT OF CENTRAL MEMORY MASS STORAGE AND I / O
An outline of the main memory management. address space. Segmentation, paging and swapping.
File System. Manage disk space, reliability and performance. System call on the file.
I / O Software.



Textbook Information

For the theory: [1] Abraham Silberschatz, Peter Baer Galvin, Greg Gagne, “Sistemi Operativi, Concetti e esempi”, 9th Edition, Pearson, ISBN 9788865183717.

or: [2] Andrew S. Tanenbaum, “I moderni sistemi operativi 4/Ed.", 2016, ISBN 9788891901019.

For the technical examples and exercitations: [3] R. Stones, N. Matthew, “Beginning Linux Programming”, 4th edition, Wrox Press, 2007.




Open in PDF format Versione in italiano