Study-unit OPERATING SYSTEMS LAB

Course name Informatics
Study-unit Code 55012409
Curriculum Comune a tutti i curricula
Lecturer Arturo Carpi
Lecturers
  • Arturo Carpi
  • (Codocenza)
Hours
  • 42 ore - Arturo Carpi
  • 36 ore (Codocenza) -
CFU 9
Course Regulation Coorte 2023
Supplied 2024/25
Supplied other course regulation
Learning activities Caratterizzante
Area Discipline informatiche
Sector INF/01
Type of study-unit Obbligatorio (Required)
Type of learning activities Attività formativa monodisciplinare
Language of instruction Italian
Contents Theory: Introduction to Operating Systems and Computer-System Organization. OS Structures. Processes and threads. Process Scheduling. Synchronization. Deadlocks. Memory-Management. Virtual-Memory. Basic notions on the file system and on secondary storage management.
Reference texts Operating Systems. Internals and design Principles. W.Stallings. Quinta edizione (anche in italiano). 2005.
Sistemi Operativi. A.Silberschatz, P.Galvin, G.Gagne. Nona edizione, Wiley
(Also in English: Operating system concepts, A.Silberschatz, P.Galvin, G.Gagne. 9th edition. Wiley.)

Manuale on-line del sistema operativo unix/linux (man).
Unix for Programmers and Users. Graham Glass e King Ables, terza edizione, Pearson-PrenticeHall, 2003.
Unix systems programming. K.A.Robbins e S.Robbins, PrenticeHall, 2003.
System programming with C and UNIX. A. Hoover, Pearson, 2010.
J.G.Brookshear e S.G.Kochan. Fondamenti di informatica e programmazione in C. Pearson, 2014.
Educational objectives Acquire basic knowledge about operative systems, their architecture and functionalities, as well as notions about HW and SW techniques and technologies exploitable in solving the main problems and facing the crucial aspects of the design and realization of an operative system.
By means of practical activities, in the laboratory, the student is expected to achieve the capabilities needed to understand, analyze, and solve typical problems related to the management, synchronization, and communication among processes.
Prerequisites In order to fruitfully attend the course, the student must have acquired and understood the following notions:

Discrete mathematics: notions of relation, tree, graph.
Computer architetture: logic functions and their representation. Machine representation of numbers and arithmetic operations; processor architetture; instruction address and execution; memory devices.
Computer programming: basic notions of the C programming language; control statements; use of header files and multiple/separate compilation; basic data structures (array, struct, union) and dynamic memory allocation; I/O statements; functions and functional parameters.
Teaching methods Lectures (theory and laboratory).
Other information See http://www.informatica.unipg.it/
On request, the exam (written and oral) can be taken in English.
Learning verification modality The exam is composed of a written part and an oral part.

The written test (lasting approximatively about 90 minutes), includes multiple choice questions, questions requiring a short composition, and exercises. The aim of the test is to verify the knowledge acquired by the student, both theoretical and practical. on all the topics included in the program.

The oral test (lasting not more that 1 hour) intend to verify the knowledge acquired by the student and his/her practical ability in solving specific practical problems.
Extended program Theory:

What Operating Systems Do: Computer-System Organization, Computer-System Architecture, Operating-System Structure, Operating-System Operations, Process Management, Memory Management, Storage Management, Protection and Security.
System Structures: Operating-System Services, User and Operating-System Interface, System Calls, Types of System Calls, System Programs, Operating-System Design and Implementation, Operating-System Structure, Operating-System Generation, System Boot.
Processes: Process Concept, Process Scheduling, Operations on Processes, Interprocess Communication, Examples of IPC, Communication in Client–Server Systems, Threads: Multithreaded Programming Multithreading Models, Threading Issues.
Process Scheduling: Basic Concepts, Scheduling Criteria, Scheduling Algorithms, Thread Scheduling, Multiple-Processor Scheduling, Operating-System Examples, Algorithm Evaluation.
Synchronization: Background, The Critical-Section Problem, Peterson’s Solution, Synchronization Hardware, Semaphores, Classic Problems of Synchronization, Monitors.
Deadlocks: System Model, Deadlock Characterization, Methods for Handling Deadlocks, Deadlock Prevention, Deadlock Avoidance, Deadlock Detection, Recovery from Deadlock.
Memory-Management: Background, Swapping, Contiguous Memory Allocation, Paging, Structure of the Page Table, Segmentation, Paged Segmentation.
Virtual-Memory: Background, Demand Paging, Page Replacement, Allocation of Frames, Thrashing, Memory-Mapped Files, Allocating Kernel Memory.
Basic notions on the file system and on secondary storage management.

Laboratory:

Unix bash: basic notions, what is the bash, unix file system structure, files, directories, paths. Commonly used bash commands: apropos, whatis, man, locate, ls, cd, pwd, mkdir, rmdir, cp, rm, mv, cat, more, less, ps, top... Shells and command execution, command execution through fork/exec, pipeline, command lists, asynchronous execution, job control, redirection, compound commands, shell variables. Command processing: alias-, brace-, tilde-, variable-, filename-expansion, command substitution, arithmetic expressions. Shell scripting, control constructs, configuration files.
System programming: The make command; Unix system calls; System calls for process management: fork, exec, wait, ..., getpid, getuid, ... System calls for file access: open, creat, close, read, write, lseek, unlink, remove, fcntl, stat, fstat, ... System calls for directory management: mkdir, opendir, readdir, rewinddir, closedir, chdir, ...). Anonymous pipes: pipe, read, write. System calls for memory-mapped I/O (mmap, munmap) and memory management (memcpy, memmove, memcmp, ...). System calls for IPC: keys and ftok. Semaphores (semget, semctl, semop). Shared memory (shmget, shmctl, shmat, shmdt). Message queues (msgget, msgctl, msgsnd, msgrcv). Signals and signal handling (sigaction, ...). System calls for basic socket management. Basic notions on pthreads.

Digital Information Service by Lidia Pozzoblu - Thanks to Aldo Bizzilupo for Web site and other technical assistance.