Da Wikipedia, l'enciclopedia libera.


Operating Systems

Warning: The preparation of this page is in progress

Year: II
Semester: second
ECTS-credits: 9
Degree: Information Engineering


Prof. Franco Tommasi

Course aims and objectives

The course aims at introducing the basic concepts in the computer Operating Systems field through a real case study. The selected case is the UNIX operating system, in its Linux and FreeBSD (MacOS X) variants: their features, similarities and peculiarities are illustrated. The OS is first approached from the user point of view. Next the students are introduced to user level programming (shell scripting). By a thorough hands-on approach (always during the lectures the students have access to a real UNIX machine whereby he/she is encouraged to try and explore everything is being taught), the main abstractions and elements at the foundation of the system organization are explained and examined (processes, file system and privileges, virtual memory, shell etc).


No preliminary notion is strictly required although a grasp of some programming language (C preferred but not mandatory) is very helpful.

Course Content

Covered topics:
The UNIX File System (its internal organization and each variant's typical directory layout)
The privileges and security system in UNIX (meaning of privileges for files and directories) SUID bit, SGID bit, Sticky bit
File types
Named pipes
Processes (creation, identification, termination, relationships, monitoring, management)
Memory layout of a process
Virtual memory (a process' usage of the virtual space and monitoring tools)
Similarities, interoperability and standard compliance among Linux, MacOS X and FreeBSD
MacOS X as a client for accessing a Linux server
The TextWrangler editor
The Terminal application
Mounting on MacOS X's user Desktop of network volumes hosted on a Linux server
The gcc program: compiling and linking of C programs
make command and Makefile syntax
Static and e dynamic libraries (meaning, building, installation, use, position in a process memory layout)
The gdb debugger
The grep command and regular expressions
Introduction to signals
Linux distributions

User commands presented throughout the course:
apropos, bc, cat, chmod, cksum, comm, cp, curl, cut, date, dd, dig, echo, false, file, find, free, gcc, grep, gunzip, gzip head, hexdump, iconv, ifconfig, info, jot, kill, ldd, less, ln, ls, lsof, lynx, make, man, manpath, md5sum, mkdir, mkfifo, more, mv, passwd, paste, ping, printf, ps, pwd, rev, rm, rmdir, rs, sleep, sort, ssh, stat, strings, stty, tac, tail, tar, tee, test, top, touch, tr, true, uniq, wc, who.

Invocations and options, configuration files, Filename metacharacters, Quoting, ways to issue commands and to combine them (&;!|``), Standard Input and Output, Redirection, Job control, Variables, Command substitution syntax $(...), arithmetic expressions syntax$((...)), built-in variables, prompt's modification, History, command line expansion priorities, Bash programming, script parameters, loops and conditional expressions, Arithmetics, Arrays, Functions, signals management and trap, passing the environment to a command, parameters expansion.

Bash built-in commands:
#, #!, alias, bg, break, case, cd, echo, enable, eval, exec, exit, export, fg, for, getopts, history, if, jobs, kill, let, pwd, read, return, select, set, source (.), test, time, times, trap, type, umask, while.

Linux commands and features:
Il file system /proc
cat /proc/<pid>/maps

Mac OS X commands and features:
otool -L e otool -tv, open, say, screencapture, system_profile, sysctl, pbcopy, pbpaste, vm_stat
mdfind (see

The following commands are presented without going too much into the (many) details:
lsof -p <pid>
vmmap <pid>

Suggested texts and readings

All the course topics are the subject of innumerables web pages and sites where often entire books are freely available. As an introductory reference the following (overlapping) texts can be quoted (for the depth of the approach) : Learning the UNIX Operating System; Learning Red Hat Enterprise Linux and Fedora; Learning Unix for Mac OS X Mountain Lion. Closely related to the course content are: Unix in a Nutshell; Linux in a nutshell; Learning the bash Shell, Unix Shell Programming. Beyond each machine internal documentation (man and info pages, whose utilization must be perfectly mastered) the use of the following text (freely available on the web) is suggested: Advanced Bash Scripting Guide.

Supplementary course documents

These slides (in italian) have been used in the first day of the 2011-2012 course to introduce it: Presentazione Sistemi Operativi

Final test procedures

The final test consists of the practical solution of some problems at the computer (an additional oral examination may be required).
Most of the problems are to be solved by writing a Bash script.
Depending on the assignment difficulty a time ranging from 75 to 120 minutes may be left for completing the test.
Since the first test the followed rule is: during the test the student is free to use his/her own documentation, no matter how acquired (books, pen drives, CDs, DVDs, external HDs etc.) and to search and browse the Internet. The student is NOT allowed to use his/her own computer/(smart)phone/iPod and, quite obviously, cannot use the Internet or other media to communicate with others.
The required ability is not, in fact, to memorize manual pages! Concepts and fundamental abstractions assimilation is instead the main requirement. Also essential is the ability to retrieve the relevant information by the available channels and sources and to appropriately interpret it.
At this link all the final tests until October 12th, 2012 are available (in italian).

Instructions to successfully execute the test - This page (not yet translated) contains indications on what the student needs to know about the Mac OS X operating system to complete the test.

Acquiring the credentials to access Mac OS X machine and the Linux server is recommended. The same credentials are valid to access the server Moodliis. To obtain them please send a mail to Without such credentials (and the skill needed to use them) is impossible to pass the examination.

Links quoted in the introductory lecture (Academic Year 2007-2008)

(update in progress) il database, aggiornato ogni sei mesi, dei computer più veloci del mondo il famoso Hallowen document, il confronto tra UNIX e Windows fatto dagli ingegneri Microsoft (vedi anche Wikipedia in inglese sull'argomento) The Linux Kernel Archives Un repositorio nel quale è possibile esplorare i kernel di diversi sistemi UNIX (es. Linux e Darwin) in maniera ipertestuale The Linux Documentation Project I sorgenti di Darwin (lo UNIX "sotto" Mac OS X) liberamente scaricabili La multa dell'UE alla Microsoft La "direttiva Stanca" sui programmi a sorgente aperto nella Pubblica Amministrazione Statistiche sull'utilizzo reale dei vari sistemi operativi, browsers, motori di ricerca Un altro sito di statistiche Un'analisi che concorda con le opinioni che ormai da diversi anni va esprimendo il titolare di questo corso L'albero genealogico di UNIX
Un altro albero genealogico di UNIX Una guida introduttiva a UNIX Documentazione su FreeBSD Una guida a Linux Una guida a bash

Useful links (Academic Year 2011-2012)

The Open Group Base Specifications Issue 7 The Single UNIX Specification '04 manual

Personal tools
Consiglio Didattico