OPERATING SYSTEM AND LAB
The aim is to provide basics of operating systems and the differences among modern and emerging ones. The student will understand the theoretical and practical issues of concurrency and management of shared resources and will get familiar with distributions and the shell of Unix-like systems.
Knowledge and understanding: the student must demonstrate knowledge and understanding of the theoretical and practical fundamentals of the programming and usage of modern operating systems, with particular reference to Unix-like systems.
Ability to apply knowledge and understanding: the student must demonstrate the ability to use their acquired knowledge to use and experiment different operating systems with the goal of being able to define and implement optimised algorithms for the management of shared computing and storage resources.
Autonomy of judgement: the student should be able to assess independently pros and cons of modern and emerging operating systems being able to distinguish and evaluate the trade-off of constraints provided by the operating system in terms of final users and the developers.
Communication skills: the student should be able to discuss technical aspects and algorithms in the field of study using academic rigor and appropriate terms, from those related to the structure of the operating systems and the process synchronisation to mechanisms for protection and security.
Learning skills: students must be able to update and autonomously deepen the principles of running of operating systems, exploring the functionalities and the limitations. The student will be able to look for learning sources online available and be able to understand them with a criticism approach.
A good approach and knowledge of the procedural programming is required as well as for basic data structures, with regard to C/C++ programming language. Knowledge of computer architecture and laboratory of computer architecture as well as Programming Language I and II is required
The extended program of the course is organised in the following lessons:
1. Introduction: Structure and Functions of an operating system. The notion of system call.
2. The process: Structure, properties and state of the processes. Cooperation and synchronisation. Threads. Management of the CPU: scheduling policies and algorithms, and evaluation of their performances.
3. Memory Management: Logical and Physical address space. Memory management with fixed, dynamic and contiguous partitions. The Virtual memory.
4. Process synchronisation: The problem of critical section: software and hardware solutions. Semaphores. Critical regions. Monitor. Message exchange. Synchronisation problems (producer-consumer, dining philosophers’ problem, readers-writers problems).
5. Deadlock: Preventing, avoiding and detecting deadlocks.
6. File System: file system architecture. Organisation, file access and operations. Structure of a directory.
7. I/O Systems and mass storage: I/O devices management. Disk scheduling.
8. UNIX operating system: structure, user interface, variants (Solaris, Linux). The UNIX shell: role and variants, login procedure, file system organisation, online manual, shell bash: pathname expansion, I/O re-direction, pipe, job in background, history command, command line editing, programmable completion, the editor vi, make command.
9. Main shell commands: file management, process management, memory management, filters: search, sorting, editing. Shell script: variables, parameters forwarding, control structures, login script.
10. System programming: processes management, file system, processes communication, threads e multithreading.
The course aims at showing the structure and functions of multiprogrammed modern operating systems, with regard to the scheduling of the processes, the memory management, process synchronisation, file-system management in Unix-like and Windows operating systems.
Teaching consists in a total of 96-hours lectures (12 CFU) of frontal lessons, divided in two modules (6 CFU each), Operating Systems and Laboratory of Operating Systems respectively. The teaching takes place in the classroom or laboratory and it is organised in 2-hours lessons scheduled according to the academic calendar. Each lecture can be a theoretical and practical lesson, given by the teacher and related to one of the topics of the course. The theoretical lessons aim at giving the student the knowledge base of working mechanisms of an operating system and of the tools available for the management of the processes, of computing and storage resources and for protection and security of the data. The laboratory lessons start from the theoretical notions acquired by the students to provide their feasible implementations and discussing the strengths and the limitations in modern operating systems. During the course, practical lessons are provided. They are collegial in nature, take place in the classroom and are given by the teacher who proposes solutions to practical exercises meant to verify the adoption and implementation of the theoretical topics presented in the previous lessons. The resolution of such exercises allows the students to verify his/her understanding of the theoretical concepts and his/her ability to proposed alternative implementations
The attendance is strongly encouraged, although it is optional. The exam is the same for all student, no matter of the rate of the attendance at lessons, except for students who constantly attend the lesson who have access to the partial tests.
There are two partial tests. Only students who pass the first test can take the second test. Students who pass the second test are exempt from supporting the first written test of the regular exam sessions of June, July and September.
Operating Systems: A Concept-based Approach, Dhananjay M. Dhamdhere, ISBN-10: 0072957697 McGrawHill, 2008.
Advanced Programming in the Unix Environment, W.R. Stevens, S.A. Rago
The exam relates to both the Operating Systems and Laboratory of Operating Systems modules. At each exam session, scheduled according to the academic calendar, the tests for both modules take place at the same time and in the same classroom or laboratory. The exam consists in the two written tests and an oral test consisting in the discussion of the second written test, organised as follows.
First written test: is related to practical topics and, if passes, it allows access to the second written test (results will be made available in 10 days).
a) The test consists in 4 exercises, the first two related to the topics of Operating Systems module (one mandatory for a maximum score of 9 points on a process synchronization problem solved by the use of semaphores and another of a maximum score of 6 points, on a problem of memory pagination or on the Linux file system or deadlock management) and the other 2 for the Laboratory of Operating Systems (one mandatory for a maximum score of 9 points on a synchronization problem to be solved, alternatively, with semaphores or with condition variables to be implemented under Linux environment using the pthread library, and another with a maximum score of 6 points regarding the implementation in Linux of a command pipeline or the implementation of an operation on Linux filesystems). This last two exercises must be implemented by using the PC of the laboratory room (where the test takes place).
b) The maximum score assigned is 30 points. The minimum score to pass the test is set at 15.
Second written test: is related to theoretical aspects of Operating Systems and Laboratory of Operating Systems. Passing the second test (which assumes the first test has been successfully passed) allows to attain the final exam (results will be announced in 5 days).
a. The test consists in 4 exercises, two of them for the topics of SO (both concerning with processes and their synchronization, primary and secondary memory management, I/O, file system, deadlock, security) and the other 2 for the Laboratory module (an exercise on fork system call consisting in building a process tree from a piece of C code, and a question on one of the system calls of the whole program).
b. The maximum score assigned is 30 points. The minimum score to pass the test is set at 18.
c. The final score is given by the partial results achieved in both tests.
d. Students who pass the first test with qualified approval (the score ≥15 and ≤17) can achieve a maximum final score of 25.
On passing the first test, the students can save the score achieved for three successive attempts for the second test (starting from the exam session when the first test has been passed), even in case the second test is not passed or not taken at all.
The learning material is provided, in English, through the e-learning platform at the following weblink http://e-scienzeetecnologie.uniparthenope.it. To access the published material, the student must be regularly registered at the platform and subscribed at the course.
Appointments are taken with the teacher by email.