Learning objectives
Course learning objectives are to provide students with knowledge and understanding of architectures and functions of modern operating systems, as well as with the required skills and abstractions to develop efficient and correct concurrent and real-time systems.
Course key concepts include:
- operating system components, processes, threads, address spaces;
- process, thread, and system resource management;
- synchronization mechanisms and concurrent programming techniques;
- real-time systems and related scheduling algorithms.
At the end of the course, students will be able to directly apply the learned techniques in the following contexts:
- modeling and solution of concurrent programming problems using mutexes, semaphores, condition variables, and language constructs such as monitors and critical regions;
- programming of system, multiprocess, and client-server applications in C/C++ in UNIX and Linux operating systems;
- programming of multithread applications with the POSIX and C++ APIs in Linux;
- design and programming of multithread real-time applications with the POSIX and C++ APIs in Linux.
Prerequisites
Basic knowledge of operating systems concepts and working knowledge of C/C++ programming language is assumed.
Course unit content
Real-Time and Operating Systems: Course Syllabus
Operating systems architectures
Operating system components
Concurrent programming in the global memory model
Concurrent programming in the message passing model
Distributed and client-server systems
Real-time systems
Real-time scheduling
System and multiprocess programming in C/C++, in UNIX and Linux
Multithread and real-time programming with the POSIX and C++ APIs in Linux
Full programme
__Real-Time and Operating Systems: Detailed Course Syllabus__
Operating systems architectures
Evolution, role and functions of the operating system. Multiprogramming. Processes, threads, and address spaces. Protection. Thread and process switch. Virtual machine systems.
Operating system components
Process and thread management. CPU scheduling. Memory management. Virtual memory. I/O management. File system. Security. Deadlock prevention and management.
Concurrent programming in the global memory model
Mutual exclusion and synchronization primitives. Resource management with semaphores. Conditional critical regions. Monitors. Concurrent programming in Java.
Concurrent programming in the message passing model
Send and receive primitives. Remote procedure call. Guarded commands.
Distributed systems
Client-server model. RPC in distributed environments. Distributed mutual exclusion, synchronization, and coordination.
Real-time systems
Embedded systems. Computer systems operating under real-time constraints. Real-time systems classification and relevant parameters. Reference model for real-time computer systems.
Real-time scheduling
Aperiodic task scheduling. Cyclic executive scheduling of periodic tasks. Priority-driven scheduling of periodic tasks. Rate-Monotonic and Earliest Deadline First scheduling algorithms. Priority-driven scheduling of mixed aperiodic, sporadic, and periodic tasks. Shared resources access control policies. Priority inversion management.
Multithreaded and real-time programming
Real-time computing support in modern, general-purpose operating systems. Multithreading support in Linux. The POSIX API standard. C++ API for multithreading. Threads and processes. Thread synchronization. Signals. IPC mechanisms. Scheduling. Time management. Memory management. I/O management. Patterns for real-time systems programming. Dedicated real-time operating systems. Middleware for distributed real-time computing systems.
Laboratory activities
Fundamentals of system programming in C/C++ in UNIX and Linux. Client-server multiprocess applications using various IPC mechanisms. Multithread and real-time programming with the POSIX and C++ APIs in Linux.
Bibliography
The following textbooks cover the topics addressed in the course:
A. Silberschatz, P.B. Galvin, G. Gagne, “Operating Systems Concepts”, 7th edition or later, Addison-Wesley, 2006 (or later). (Java version also ok).
P. Ancilotti, M. Boari, “Programmazione concorrente e distribuita”, McGraw-Hill, 2007 (in Italian).
[Alternative books in English on concurrent programming:
G.R. Andrews, “Foundations of Multithreaded, Parallel, and Distributed Programming,” Addison-Wesley, 2000.]
J.W.S. Liu, "Real-Time Systems", Prentice-Hall, 2000.
D. Butenhof, "Programming with POSIX Threads", Addison-Wesley, 1997.
Optional text, to probe further also in Java:
S.J. Hartley, "Concurrent Programming - The Java Programming Language", Oxford University Press, 1998.
Optional text, to probe further also in C++:
A. Williams, "C++ Concurrency in Action", 2nd edition, Manning Publications, 2019.
Lecture notes are made available on the course web site to registered students, but cannot be disseminated outside the class nor republished.
Teaching methods
Lectures in classroom with slide support, plus significant and mandatory supervised laboratory activity covering multiprocess, concurrent, multithread, and real-time programming.
The course includes about 54 hours of classroom lectures and 24 hours of supervised laboratory activity. Attendance of laboratory classes is mandatory.
During the semester, midterms and practical or theory home assignments are administered to keep students on pace with the course and exempt them from parts of the final exam.
The course will be delivered exclusively in presence. Neither lectures, nor labs, nor midterms and exams will be administered at distance.
Assessment methods and criteria
Exam consists of a series of practice, written, and oral tests, including tests administered as midterms during the semester. Exam is passed when all individual tests, listed in the following, have been passed:
1) Written test on real-time scheduling theory and application (first midterm, 1 hour and 50 minutes).
2) Practice assignment on multithread and real-time programming using POSIX or C++ threads.
Assignment is illustrated during mandatory supervised laboratory classes. Students are organized in pairs and assisted in the development in the next two or three lab classes, with mandatory attendance. Student pairs are then required to finalize a working multithread application conforming to the requirements and submit it by a deadline (typically within 10 days from the last supervised lab class) in a formal session in class. As part of the assignment and submission process, students are also required to apply their acquired skills in multiprocess system programming.
3) Written or practical test on concurrent programming (2 hours).
4) Final oral exam including brief discussion of prior student’s written and practical tests and one or two questions about general operating system and concurrent programming concepts not covered by the other tests but part of the course program (20-30 minutes).
Oral exam must be the final test.
Written tests 1) and 3) can be taken together in the official exam sessions for those students who have not passed them in the midterms. Dedicated test dates must be agreed upon with the instructor for the practice test n. 2). However, it is strongly recommended that students engage in classroom and lab activities and pass the midterm and practice tests during the lecturing period.
Written test n. 1) assesses the degree of learning of concepts concerning real-time systems and their scheduling algorithms.
Practice test n. 2) assesses the degree of learning of practical skills concerning system programming and design of multiprocess and client-server applications, as well as the degree of learning of practical skills concerning the design of multithread and real-time applications.
Written or practice test n. 3) assesses the degree of learning of knowledge concerning concurrent programming techniques and their application in a problem-solving context.
Oral test n. 4) assesses the degree of learning of knowledge concerning operating system components and fundamental concepts of concurrent programming.
Other information
Course web site available at: http://elly2024.dia.unipr.it for registered students.
Teaching material is published on the web site as course progresses and is available exclusively for class-related learning. To avoid infringement of external copyright holders, no external distribution or republishing, please.
2030 agenda goals for sustainable development
4 Quality education
9 Industry, innovation and infrastructures