OPERATING SYSTEMS M - Z
Academic Year 2020/2021 - 2° YearCredit Value: 6
Scientific field: ING-INF/05 - Information processing systems
Taught classes: 35 hours
Exercise: 15 hours
Term / Semester: 1°
Learning Objectives
Knowledge and understanding: Upon completion of the course, the student will have acquired the knowledge of the basic concepts inherent to the design of operating systems and the writing of programs that exploit System Calls in Linux / UNIX environment. At the end of the course the 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.
Applying knowledge and understanding: at the end of the course the students 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.
Making judgements. On completion of the course, the student will be able to choose a suitable software solution based on Linux API for each of the subjects treated inside the course.
Communication skills. On completion of the course, the student can communicate his conclusions and recommendations about design and use of operating systems with the argumentation of the knowledge and rationale underpinning these, to both specialist and non-specialist audiences clearly and unambiguously.
Learning skills. On completion, the student will be able to continue to study in a manner that may be largely selfdirected or autonomous.
Course Structure
The course is essentially based on lectures, which include the development of exercises by the teacher. The proposed exercises are addressed by the teacher through the use of computer connected to the projector. The course also includes practical exercises carried out by the students. These exercises are carried out in the University's multimedia rooms. Each student is assigned a task that must be performed on the computer. The teacher supervises the work of the students by providing the explanations and teaching aids necessary to complete the assigned tasks. The methods of carrying out the teaching described above allow the achievement of the pre-established training objectives, which include the acquisition of knowledge and the ability to apply knowledge.
If the teaching is given in a mixed or remote way, the necessary changes with respect to what was previously stated may be introduced, in order to respect the program envisaged and reported in the syllabus.
Detailed Course Content
UNIT 1: INTRODUCTION TO OPERATING SYSTEMS. GNU/LINUX. SYSTEM CALL. VIRTUALISATION.
- General information on the operating systems. resource management. User interface. Kernel concept.
- The GNU / Linux system. Free software and related licenses. GPL.
- Some notes on Unix and POSIX standard.
- Structure of operating systems: monolithic, microkernel, hybrid, kerenl modules, client/server.
- Concept of System calls and steps needed to achieve them. Overview of system calls of Unix/Linux, Windows.
- File System and relevant System Calls in Linux with execises.
- 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. Functions: pthread_create(), pthread_join(), pthread_exit(), pthread_detach(), pthread_attr_init ().
- Notes on Threads in Windows.
- Examples of programs that use the Pthreads library.
UNIT 3: 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 4: SYNCHRONISATION.
- Critical section. Mutual exclusion with busy waiting. Semaphores and Mutex.
- Basic synchronisation probems: Producer-Consumer sharing data (sinlgle or multiple with limited size), reader-writer problem. Solutions based on semaphores and mutex.
- Mutex. Implementation in Linux using Pthread POSIX library: pthread_mutex_init, pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock, pthread_mutex_destroy
- Semaphores. Implementation in Linux using System V library: semget(), semop(), semctl()
- Deadlock. Problem definition and management strategies.
UNIT 5: INTER PROCESS COMMUNICATION (IPC)
- IPC on Linux.
- Shared memory using SYSTEM V library: shmget(), shmat(), shmdt(), shmctl().
- Communication in the client-server systems: sockets using POSIX library.
Textbook Information
For the theory: [1] Abraham Silberschatz, Peter Baer Galvin, Greg Gagne, “Operating System Concepts”, Pearson.
or: [2] Andrew S. Tanenbaum, “I moderni sistemi operativi", Pearson.
For the technical examples and exercitations: [3] R. Stones, N. Matthew, “Beginning Linux Programming”, 4th edition, Wrox Press, 2007.