cod. 05613

Academic year 2023/24
3° year of course - First semester
Academic discipline
Sistemi di elaborazione delle informazioni (ING-INF/05)
Ingegneria informatica
Type of training activity
48 hours
of face-to-face activities
6 credits
hub: PARMA
course unit

Learning objectives

The aim of this course is to teach how operating systems manage computer resourses acting as an extended machine and how to use them in specific applications. The specific learning goals are:
- the management of CPU times given the constraints of I/O operations and other events;
- the concept of process, the decomposition of computer activity into processes and how processes communicate;
- how CPU scheduling work;
- the concept of system call and the definition of system calls in UNIX/Linux systems;
- learning operating system classification and the oragnization of OS kernel.
The course promotes acquisition of using and programming skills within operating systems like:
- to assess general purpose operating systems according to their main features;
- to use terminal commands and to handle the processed and general state of an operating system;
- to program applications consisting of multiple processes and to manage their communication and interaction;
- to know the issues of concurrent programming and to program access to shared data in simple applications.


Previous programming courses:
- Computer Science and Programming Laboratory
- Object Oriented Programming

Course unit content

A. Operating Systems: concepts and principles
Introduction to operating systems, CPU time management and interruction
Multiprogramming and processes
Management of I/O and introduction to computer networks
Process scheduling
Introduction to concurrent programming
B UNIX/Linux Systems: analysis and laboratory practicals
History and system organization (file system, users, groups and permissions, main features)
Introduction to shell usage, commands and programming
Programming and development for operating systems
Process management and communication
Hints to concurrent programming

Full programme

A. Operating systems: Concepts and Principles (10 hours)
A.1 Definition of Operating System: CPU time management (batch, time-sharing, spooling), I/O and interruptions.
A.2 Multiprogramming and processes: state, context switch, process interaction models, process control block (PCB), protection.
A.3 File system: files, directories, file system implementation.
A.4 I/O Managment: abstraction, deadlock, stream model, system calls.
A.5 Introduction to computer networks: OSI/ISO model, TCP/IP protocol, UDP protocol, socket and system calls for process
A.6 Scheduling: algorithms and criteria, main algorithms (FCFS, SJF, round-robin, priority).
A.7 Threads, shared memory, critical sections, semaphores and hints to concurrent primitives (mutex, condition variables).
B UNIX/Linux Systems
B1 Presentation of UNIX/Linux Systems (14 hours)
B1.1 Introduction to UNIX systems: history, file system, users and permissions, shell commands
B1.2 Programming and development in language C in UNIX/Linux
B1.3 System programming: environment variables, I/O primitives, commands for execution of processes
B1.4 Process management and communication: APIs, pipe and FIFO, signals
B1.5 Process communication: introduction to network communication, abstraction levels, TCP and UDP, socket APIs
B1.6 Overview of POSIX Threads: concept of thread, APIs, mutex
B2 Laboratory Practicals of UNIX/Linux Systems (14 hours).
B2.1 UNIX-Linux management of files and directories, permissions management, link and comparisons between files, main terminal commands, shell redirection.
B2.2 Bash scripting, C programs and compilation, libraries, development tools (make, cmake, gdb and valgrind).
B2.3 System calls in C for I/O stream, descriptors and piping, environment variables.
B2.4 Process control and programming in C: process identifiers, execution commands, child processes (commands fork, execv*).
B2.5 Interprocess communication 1: pipe, FIFO, signals, select.
B2.6 Interprocess communication 2: socket system calls, TCP and UDP sockets, client/server connections.
B2.7 Introduction to POSIX Threads: thread execution, join, calling, simple management of critical sections.
B2.8 Putting everything together: pseudo-exam test.


Lecture notes and laboratory material on the course web site.

Textbooks (also previous editions of the manuals are suitable for the course):
- A. Tanenbaum, H. Bos, Modern Operating Systems, Pearson Education, 4th edition, 2014
- A. Silberschatz, G. Gagne, P.B. Galvin, Operating System Concepts, Wiley, 10th edition, 2021
- A. Tanenbaum, A. Woodhull, Operating Systems: Design and Implementation, Pearson Education, 2nd Edition, 1997
- S. Piccardi, GaPiL -- Guida alla Programmazione in Linux, http://gapil.truelite.it

Teaching methods

The course consists of lectures and practicals in the laboratory.
Lectures address the main operating systems concepts and also present UNIX/Linux primitives that are applied in laboratory practicals.
Practicals are carried out on the computers/vitual machine terminals hosting Linux operating systems.

Assessment methods and criteria

The evaluation of the course consists of two parts.
1) The written test, which contributes to 50% of the final mark, consists of open questions. The mark interval scale is 0-30.
2) The laboratory practical test, which contributes to 50% of the final mark, requires to program in language C a simple application to solve a problem related to process interaction. The mark value spans in interval 0-30.
3) Optional assignment on UNIX process management to increase the final mark.

Both exam parts must be passed. The final mark is obtained as average of the two parts. Further detailed information on the grading system will be provided during lectures.

Other information

Lecture notes and practical material are available on web page http://elly****.dia.unipr.it/ (**** = year of the course).