Servizi per la didattica
PORTALE DELLA DIDATTICA

System and device programming

01NYHOV

A.A. 2019/20

Course Language

Inglese

Course degree

Master of science-level of the Bologna process in Computer Engineering - Torino

Course structure
Teaching Hours
Lezioni 42
Esercitazioni in aula 11
Esercitazioni in laboratorio 47
Tutoraggio 30
Teachers
Teacher Status SSD h.Les h.Ex h.Lab h.Tut Years teaching
Quer Stefano Professore Associato ING-INF/05 21 0 11 30 2
Teaching assistant
Espandi

Context
SSD CFU Activities Area context
ING-INF/05 10 B - Caratterizzanti Ingegneria informatica
2019/20
This course is held at the second semester of the first year of the Master of Computer Engineering, and it is organized in two parts. The first part introduces the architecture and the design principles of an operating system. More specifically, it deals with internal operating system modules, together with the main techniques and strategies for efficient management of resources such as processors, memories, peripheral devices, files, etc. The second part describes programming interfaces for system programming and resource management, as well as concurrent programming. It introduces system programming techniques, within the framework of state-of-the-art operating systems, such as Unix/Linux and Windows. Advances concurrend programming techniques are introduced and used.
This course is held at the second semester of the first year of the Master of Computer Engineering, and it is organized in two parts. The first part introduces the architecture and the design principles of an operating system. More specifically, it deals with internal operating system modules, together with the main techniques and strategies for efficient management of resources such as processors, memories, peripheral devices, files, etc. The second part describes programming interfaces for system programming and resource management, as well as concurrent programming. It introduces system programming techniques, within the framework of state-of-the-art operating systems, such as Unix/Linux and Windows. Advances concurrend programming techniques are introduced and used.
Part I • Knowledge of the operating systems architecture as a collection of resource managers • Knowledge of operating system kernel modules, and new module implementation skills • Skill to use system calls for creation, synchronization and termination of processes and threads • Knowledge of virtual memory mechanisms • Skill to understand and implement virtual memory management algorithms • Knowledge of peripheral device management techniques • Skill to understand and implement device drivers Part II • Knowledge of modern file system organizations and skill to manage file systems and file locking • Knowledge of system programming APIs (system calls) • Skill to understand and implement programs based on system calls • Skill to understand and implement programs with advanced file system interactions, such as sequential, random and/or shared file access, and directory manipulation • Skill to understand and implement reliable/robust programs exploiting exception and signal handling • Skill to understand and implement programs with advanced memory management tachniques, such as dynamic allocation, memory mapping of files, dynamic libraries • Skill to understand and implement concurrent programs based on processes/threads • Skill to understand and implement concurrent programs exploiging • Advanced synchronization, message passing, and data sharing techniques
Part I • Knowledge of the operating systems architecture as a collection of resource managers • Knowledge of operating system kernel modules, and new module implementation skills • Skill to use system calls for creation, synchronization and termination of processes and threads • Knowledge of virtual memory mechanisms • Skill to understand and implement virtual memory management algorithms • Knowledge of peripheral device management techniques • Skill to understand and implement device drivers Part II • Knowledge of modern file system organizations and skill to manage file systems and file locking • Knowledge of system programming APIs (system calls) • Skill to understand and implement programs based on system calls • Skill to understand and implement programs with advanced file system interactions, such as sequential, random and/or shared file access, and directory manipulation • Skill to understand and implement reliable/robust programs exploiting exception and signal handling • Skill to understand and implement programs with advanced memory management tachniques, such as dynamic allocation, memory mapping of files, dynamic libraries • Skill to understand and implement concurrent programs based on processes/threads • Skill to understand and implement concurrent programs exploiging • Advanced synchronization, message passing, and data sharing techniques
• Knowledge of a computer system architecture, with a specific emphasys on the structure of the CPU and memory subsystem • Knowledge of the interrupt mechanism and basics of an assembly language • Knowledge of the foundations of data structures and algorithms • Good programming skill in C language • Knowledge of base concurrent programming techniques.
• Knowledge of a computer system architecture, with a specific emphasys on the structure of the CPU and memory subsystem • Knowledge of the interrupt mechanism and basics of an assembly language • Knowledge of the foundations of data structures and algorithms • Good programming skill in C language • Knowledge of base concurrent programming techniques.
Part I • Review of operating system architecture (3.0 hours) o Modules for the management of the resources of a computer system o Process and thread management synchronization (recalls) • Memory management (10.0 hours) o Physical and logical address spaces, MMU, TLB o Paging o Virtual memory and demand paging • Peripheral Device management (3.0 hours) o Drivers and IO device management o Disk management • File system management (6.0 hours) o File system organization and protection o Management an operations on files and directories • Teaching operating system OS161 (10.0 hours) o System level architecture, source files, compilation, execution, debug o Implementation of simple system calls for standard I/O o Thread and user process management o Implementation of synchronization primitives o Implementation of simple support for file I/O • Laboratory practice on all previous topics (18.0 hours). Part II • Review of basic system and concurrent programming (6.0 hours) o Processes o Threads o Concurrent programming and synchronization in POSIX • Introduction to concurrent programming in C11 (2.0 hours) • Introduction to the Windows API (6.0 hours) • Introduction to the C++ language (10.0 hours) o Classes, inheritance and polymorphism o Exception handling and runtime support o Generic programming o Concurrent programming • Win32 and Linux system programming and concurrent programming (4.0 hours) o File and directory management o Process and thread management o Synchronization o Exception and signal handling o Memory management o Synchronous and asynchronous I/O o Inter-process communication • Examples of Windows and Linux application development (4.0 hours) o General principles o Reactive programming • Laboratory practice on all previous topics (18.0 hours).
Part I • Review of operating system architecture (3.0 hours) o Modules for the management of the resources of a computer system o Process and thread management synchronization (recalls) • Memory management (10.0 hours) o Physical and logical address spaces, MMU, TLB o Paging o Virtual memory and demand paging • Peripheral Device management (3.0 hours) o Drivers and IO device management o Disk management • File system management (6.0 hours) o File system organization and protection o Management an operations on files and directories • Teaching operating system OS161 (10.0 hours) o System level architecture, source files, compilation, execution, debug o Implementation of simple system calls for standard I/O o Thread and user process management o Implementation of synchronization primitives o Implementation of simple support for file I/O • Laboratory practice on all previous topics (18.0 hours). Part II • Review of basic system and concurrent programming (6.0 hours) o Processes o Threads o Concurrent programming and synchronization in POSIX • Introduction to concurrent programming in C11 (2.0 hours) • Introduction to the Windows API (6.0 hours) • Introduction to the C++ language (10.0 hours) o Classes, inheritance and polymorphism o Exception handling and runtime support o Generic programming o Concurrent programming • Win32 and Linux system programming and concurrent programming (4.0 hours) o File and directory management o Process and thread management o Synchronization o Exception and signal handling o Memory management o Synchronous and asynchronous I/O o Inter-process communication • Examples of Windows and Linux application development (4.0 hours) o General principles o Reactive programming • Laboratory practice on all previous topics (18.0 hours).
The class can be divided into theory lectures, practice lessons and laboratories. There is no formal distinction between theory and practice as almost all course topics involve theory and practice aspects developed during the classroom lessons by the teacher. Laboratories (36 hours overall) allow students to solve typical concurrent problems, to be introduced to system, kernel and module programming, and applying all theory and practice aspects analyzed during the classroom lessons. The course also include an optional project, done by working groups, on advanced topics from either of the two parts of the course Laboratories and projects of the part I include • Customizing and installing the OS161 (Unix-like teaching operating system) kernel • OS booting • Writing a system call • OS support for process and thread management • Synchronization primitives • Creating and terminating a user process • Support for file system management and structure of a device driver Laboratories and projects of the part II include • System calls for file system interface, file and directory management • Concurrent programming based on thread and processes • Synchronization primitives and concurrent programming templates • Programs with exception and/or signal handling • Programs with advanced dynamic memory management, memory mapping of files, dynamic libraries, inter-process communication.
The class can be divided into theory lectures, practice lessons and laboratories. There is no formal distinction between theory and practice as almost all course topics involve theory and practice aspects developed during the classroom lessons by the teacher. Laboratories (36 hours overall) allow students to solve typical concurrent problems, to be introduced to system, kernel and module programming, and applying all theory and practice aspects analyzed during the classroom lessons. The course also include an optional project, done by working groups, on advanced topics from either of the two parts of the course Laboratories and projects of the part I include • Customizing and installing the OS161 (Unix-like teaching operating system) kernel • OS booting • Writing a system call • OS support for process and thread management • Synchronization primitives • Creating and terminating a user process • Support for file system management and structure of a device driver Laboratories and projects of the part II include • System calls for file system interface, file and directory management • Concurrent programming based on thread and processes • Synchronization primitives and concurrent programming templates • Programs with exception and/or signal handling • Programs with advanced dynamic memory management, memory mapping of files, dynamic libraries, inter-process communication.
Handouts and slides used during the classroom lessons are available on the teacher or course WEB site. The World Wide Web is also an excellent source of material for almost all topics introduced in the class (see Wikipedia, for example). Among the printed material, during the class, we make explicit usage of the following books: • J. M. Hart, "Windows System Programming", Addison-Wesley Publishing Company • A. Silberschatz, P. B. Galvin, G. Gagne, "Operating System Concepts", John Wiley & son • W. R. Stevens, "Advanced programming in the UNIX Environment", Addison-Wesley
Handouts and slides used during the classroom lessons are available on the teacher or course WEB site. The World Wide Web is also an excellent source of material for almost all topics introduced in the class (see Wikipedia, for example). Among the printed material, during the class, we make explicit usage of the following books: • J. M. Hart, "Windows System Programming", Addison-Wesley Publishing Company • A. Silberschatz, P. B. Galvin, G. Gagne, "Operating System Concepts", John Wiley & son • W. R. Stevens, "Advanced programming in the UNIX Environment", Addison-Wesley
Modalità di esame: Prova scritta (in aula); Progetto di gruppo;
The exam consists of a written test and an optional group project. The course does not include any oral examination, but the optional group project will be openly presented by the students belonging to the same group during one of the examination sessions. The target of the written test is to check the acquire theoretical knowledge in the area and to verify the ability of the candidate to solve medium-size problems in the operating system and device programming area (such as device management, system resource management, concurrent programming, etc.). The target of the project is to force the student to work and to coordinate his/her effort with his/her peers, and to face more complex and complete problems in the same area. The Written Test The written test includes questions and exercises on both theoretical and practical aspects of the entire course. Theoretical questions may include open and closed puzzles. These are formulated to test the candidate’s knowledge on all topics presented during the course and his/her ability to solve problems related to theoretical aspects. Practical questions and exercises test the ability of the candidate to solve system, device and concurrency problems writing programs in different environments and programming languages (UNIX/Linux, Windows, C, C++, etc.). The written test is divided into two sessions following the previously described parts of the course. Both parts may include theoretical and practical aspect, involving respectively: • Operating system internal topics • System, device and concurrent programming aspects. Both parts amount up to 13 points on the final evaluation mark. Each part has a passing threshold of 7 points. Thus, to pass the exam, a pass grade (larger or equal than 7) is required on both parts. The final mark is the sum of the two evaluations. As a consequence, the maximum grade that can be reached with the written test is equal to 13+13=26 out of 30. The exam is considered as passed only if the written mark is larger or equal to 18. The time allowed for each written part may vary from 60 to 120 minutes, depending on the examination text. No books, notes, portable devices, or other material is allowed during the written text. The two written parts can be taken during different examination sessions, but these sessions must be placed within a period corresponding to one academic year (e.g., if one take the first written text in September the second one must be taken at most in the summer session, i.e., June/July of the next year). It is possible to reject a written mark only when the mark is delivered or when it is coupled with a previous mark. In other words, as soon as both parts have been passed, and their sum is larger or equal to 18, the written marks are considered as final, i.e., they can be improved only with the mark eventually obtained with the project. Moreover, any final mark will be registered as soon as possible, i.e., as soon as the mark of the project (if the project has been taken by the student) will be available. On the contrary, when the validity of one written part expires, it will be automatically lost. In this case the candidate will have to retake the corresponding written test. The Optional Project An optional project, on either one of the two course parts, may be taken to improve the candidate’s knowledge on the course’s topics and eventually amend the final mark. Anyway, the exam is considered as “passed” only if the written test is passed. Projects are specified yearly before then end of May, and must be selected by all students who want to apply for it before the end of June. Projects are usually taken by group of candidates (from 2 to 4). To balance the teachers’ load during each academic year, there is a limit on the number of projects that are delivered on each one of the course parts. Project will be assigned to group of students on a first-come-first-served basis. It must be noticed that each candidate is entitle to take a project at most once in his/her studying career at Politecnico, either during the first year he/she is enrolled in the course or in one of the following year. The project mark will follow a short presentation given by the group of candidates. The purpose of this presentation is to present the main algorithmic flow, the main criteria and ideas used to solve the problem. To enroll for a project presentation the group of student must upload the entire project kit on the portal web page (at the “Materiale” session) before the written test date of that examination session. This has to be done within the same academic year the project has been offered and more specifically in one of the 4 examination sessions following each course. The beginning of the course of the following academic year will automatically erase all pending projects (i.e., projects without a final mark). Once that the final mark for a project has been obtained there is no time limit to its validity. Each project can add from -2.0 to +6.0 marks to the final written evaluation. Marks can be different for different students within the same group, depending on the effort they put into the project and on the final presentation delivered. The maximum mark which can be obtained with both the written test and the group project amount to 26+6 = 32 out of 30. Marks equal to 31 or 32 will be automatically converted into 30 with honor.
Exam: Written test; Group project;
The exam consists of a written test and an optional group project. The course does not include any oral examination, but the optional group project will be openly presented by the students belonging to the same group during one of the examination sessions. The target of the written test is to check the acquire theoretical knowledge in the area and to verify the ability of the candidate to solve medium-size problems in the operating system and device programming area (such as device management, system resource management, concurrent programming, etc.). The target of the project is to force the student to work and to coordinate his/her effort with his/her peers, and to face more complex and complete problems in the same area. The Written Test The written test includes questions and exercises on both theoretical and practical aspects of the entire course. Theoretical questions may include open and closed puzzles. These are formulated to test the candidate’s knowledge on all topics presented during the course and his/her ability to solve problems related to theoretical aspects. Practical questions and exercises test the ability of the candidate to solve system, device and concurrency problems writing programs in different environments and programming languages (UNIX/Linux, Windows, C, C++, etc.). The written test is divided into two sessions following the previously described parts of the course. Both parts may include theoretical and practical aspect, involving respectively: • Operating system internal topics • System, device and concurrent programming aspects. Both parts amount up to 13 points on the final evaluation mark. Each part has a passing threshold of 7 points. Thus, to pass the exam, a pass grade (larger or equal than 7) is required on both parts. The final mark is the sum of the two evaluations. As a consequence, the maximum grade that can be reached with the written test is equal to 13+13=26 out of 30. The exam is considered as passed only if the written mark is larger or equal to 18. The time allowed for each written part may vary from 60 to 120 minutes, depending on the examination text. No books, notes, portable devices, or other material is allowed during the written text. The two written parts can be taken during different examination sessions, but these sessions must be placed within a period corresponding to one academic year (e.g., if one take the first written text in September the second one must be taken at most in the summer session, i.e., June/July of the next year). It is possible to reject a written mark only when the mark is delivered or when it is coupled with a previous mark. In other words, as soon as both parts have been passed, and their sum is larger or equal to 18, the written marks are considered as final, i.e., they can be improved only with the mark eventually obtained with the project. Moreover, any final mark will be registered as soon as possible, i.e., as soon as the mark of the project (if the project has been taken by the student) will be available. On the contrary, when the validity of one written part expires, it will be automatically lost. In this case the candidate will have to retake the corresponding written test. The Optional Project An optional project, on either one of the two course parts, may be taken to improve the candidate’s knowledge on the course’s topics and eventually amend the final mark. Anyway, the exam is considered as “passed” only if the written test is passed. Projects are specified yearly before then end of May, and must be selected by all students who want to apply for it before the end of June. Projects are usually taken by group of candidates (from 2 to 4). To balance the teachers’ load during each academic year, there is a limit on the number of projects that are delivered on each one of the course parts. Project will be assigned to group of students on a first-come-first-served basis. It must be noticed that each candidate is entitle to take a project at most once in his/her studying career at Politecnico, either during the first year he/she is enrolled in the course or in one of the following year. The project mark will follow a short presentation given by the group of candidates. The purpose of this presentation is to present the main algorithmic flow, the main criteria and ideas used to solve the problem. To enroll for a project presentation the group of student must upload the entire project kit on the portal web page (at the “Materiale” session) before the written test date of that examination session. This has to be done within the same academic year the project has been offered and more specifically in one of the 4 examination sessions following each course. The beginning of the course of the following academic year will automatically erase all pending projects (i.e., projects without a final mark). Once that the final mark for a project has been obtained there is no time limit to its validity. Each project can add from -2.0 to +6.0 marks to the final written evaluation. Marks can be different for different students within the same group, depending on the effort they put into the project and on the final presentation delivered. The maximum mark which can be obtained with both the written test and the group project amount to 26+6 = 32 out of 30. Marks equal to 31 or 32 will be automatically converted into 30 with honor.


© Politecnico di Torino
Corso Duca degli Abruzzi, 24 - 10129 Torino, ITALY
m@il