cod. 05613

Academic year 2012/13
2° year of course - First semester
Academic discipline
Sistemi di elaborazione delle informazioni (ING-INF/05)
Ingegneria informatica
Type of training activity
42 hours
of face-to-face activities
6 credits
course unit
in - - -

Learning objectives

The course introduces the main methodological tools for the analysis of
system software, in particular for the UNIX/LINUX Operating System.
In the first part the process model of an OS is presented, together with
the management of hardware resources. In the second part the main
features of UNIX/LINUX are described both at user level and the system
programming level.


Programming course

Course unit content

Part I
Introduction to Operating Systems. Batch, time-sharing and spooling
Processing and I/O parallelization. The interrupt systems: device and
timer interrupts.
Interrupt handling. Modelling of a simple OS and technique for increasing
the performance.
Multitasking e process model. Protection system. CPU operating modes.
Systems calls.
I/O handling. Layered structure of OSs. Virtualization.
Concept of process. Process state and descriptor. Concurrent processes.
Cooperation and competition among processes. Shared memory
interaction. Mutual exclusion and critical sections. Semaphores e
synchronization primitives.
Message passing interaction. Send/receive primitives, designation and
Deadlock management.
CPU scheduling and main algorithms.
Part II
Introduction to UNIX and LINUX.
UNIX File System. File access rights. Main system commands. I/O
redirection and piping. Command shell. Foreground and background
command execution.
Physical organization of the file system. Process image. Program
development in UNIX.
File and I/O primitives. System calls for process management: creation,
execution and exit.
Interprocess communication facilities: unreliable and reliable signals,
pipes, FIFOs and sockets.
Client-server examples.

Full programme

Course introduction. Course contents and student evaluation methods. Introduction to the Linux OS and installation methods. The OS as a resource manager. OS activities for resource management. OS types and users. Proprietary and standard OSes. Brief history of computing systems and OS evolution. Batch and Time-Sharing systems.. Spooling. I/O management. Polling. Overlap between I/O activities. Interrupt management. (4 hours)
Multiprogramming. Concept of process and possible states. Process management. PCB.. Process switching. OS protection and security. Context switching. System calls. OS structure with examples (UNIX, MS-DOS, Windows NT / 7). Virtualization concepts and techniques. OS kernel (5 hours)
Models of process interaction. Global environment model. Tools for concurrent programming. Some background on threads. Type of interaction among processes. Examples of interference. Mutual exclusion. Critical sections. Semaphores. Wait and signal primitives. Atomicity of wait / signal. Use of semaphores for producer / consumer interaction. Local environment model. Classification of designation and synchronization alternatives. Direct and indirect designation. Synchronization for send and receive. Remote procedure calls. (5 hours)
Deadlock and management techniques (2 hours)
Levels of scheduling. Criteria for algorithm evaluation. CPU scheduling algorithms (FCFS, SJF, Priority, Round-robin). Methods for evaluation. UNIX scheduling. Overview of real-time scheduling. (3 hours)
An introduction to UNIX. File system. Access rights to files / directories. Basic UNIX commands. Filters. I/O redirection and command piping. Running shell commands. Execution mode of commands. Wildcards. Expansion control in the command line. Scripts: syntax and examples. Laboratory practice on UNIX file system and commands. (4 hours)
UNIX development tools. Process image. Command line arguments and environment. System calls for I/O (open, close, read, write, lseek, etc..). Laboratory practice on I/O. primitives (4 hours)

System calls for process management (fork, wait, exec). Examples. Laboratory practice on primitives for process management. Presentation of the optional assignment on process management. (4 hours)
UNIX signals. Systems calls for the unreliable signals. Issues with unreliable signals. Primitives for reliable signals. Examples. Inter-process communication with pipes. Examples. Exercises on signals and pipes. Communication with FIFOs. Laboratory practice on signals and pipe (5 hours)

Socket communication. Socket types. Notes on TCP and UDP protocols. Socket systems calls. Connected sockets. Concurrent servers. Datagram sockets. Examples. The select system call. Laboratory practice on socket communication (4 hours)
Sample final exams. (2 hours).


Operating Systems Concepts - 8/ed, A. Silberschatz, P. B. Galvin, G.
Wiley 2008,ISBN-13: 978-0470128725
Advanced Linux Programming, http://www.advancedlinuxprogramming.

Teaching methods

Class lectures on OS theory and UNIX/Linux.
Lab exercises on Linux PCs at the “Laboratorio Informatica di base”
Exercises on UNIX/LINUX commands and shells. Exercises on process
interaction under UNIX/LINUX.

Assessment methods and criteria

Written examination on the theory of Operating Systems (Part I of the
course) or midterm exam.
Computer exercise on UNIX/LINUX system programming.
Optional programming assignment on Linux process management.
Final grade is weighted on theory (40%) and UNIX (60%) grades.

Other information

Course website on http://lea.unipr.it