Base Knowledge
Knowledge of the matters listed below is absolutely essential and necessary:
- Programming in C (Introduction to Programming, Programming, 1st year)
- Computer architectures and technologies (Computer Technologies and Architectures, 1st year)
Teaching Methodologies
The classes are theoretical and practical. In the theoretical classes, an expository methodology is used to present the theoretical foundations of the subject with application examples, and student participation is encouraged with the aim of fostering an interactive learning environment. In the practical classes, students apply the knowledge from the theoretical lessons by developing applications under the supervision of the instructors, and student participation in the class is required. Outside of class, students work in pairs to develop a project that applies and deepens the topics covered in the lessons, and the project is subject to evaluation.
Learning Results
Skills to be acquired and developed by students in this course:
- Understand, explain and justify the inner workings of modern operating systems
- Understand, explain and plan the operation and administration of Unix/Linux systems
- Understand, plan, develop, explain, and justify the development of C applications for the Unix platform
- Plan and prepare technical documentation on software projects for systems.
Program
The course syllabus is organized into 3 themes:
- Introduction and functioning of the Unix system and environment and its operation.
- Development of Unix applications in C.
- Theoretical foundations of operating systems.
Introduction and operation of the Unix system and environment and its operation:
- Basic concepts and mechanisms underlying the operation of Linux from a configuration point of view.
- System startup and startup. Partitions and file systems. Typical Unix file system. Protection and permissions of users and files in Unix. sudo and setuid bit mechanisms. Configuration of Linux basics.
- Unix commands and Bash programming – System introduction and topics of using the Unix/Linux system from the command line from a user and administrator point of view.
- Introduction to the Unix system from the user’s point of view. i) Architecture and main components, ii) System startup, iii) login process, iv) File system
- Unix commands for i) file and directory manipulation, ii) Process management, iii) User management iv) Information extraction and manipulation in structured text files, v) Redirection.
- Introduction to Shell Script (Bash) programming
Unix application development in C.
- Introductory and fundamental aspects of application development for Unix environment.
- Build process. Source, object, library and executable files. Library functions and system functions.
- Programs and processes. Creation of processes. Fork and exec mechanisms. Processes management. PID
- Signals. Simple synchronization mechanisms with signals. Application examples
- Unix I/O. Files and file table. Redirection and anonymous pipes. Introduction to file system manipulation functions
- Named pipes in Unix. Applications in client-server model. Synchronous and asynchronous operation.
- Multithreaded programming in Unix
- Simple synchronization with binary semaphores and conditional variables
Theoretical foundations of operating systems. Theoretical concepts of operating systems covering 1) general topics, 2) architecture, 3) implementation topics, 4) process management, 5) memory management.
- 1 General concepts.
- Goals of operating systems. Programs, processes and threads. Types of systems. Operating system architecture. Operating systems kernel.
- 2 Topics in Multitasking and Synchronization Programming
- Multi-task programming. Introduction to Synchronization: Logical latches and mutexes. Conditional variables.
- 3 System Implementation Topics
- Process implementation. Execution Modes. Kernel space and user space. Interruptions control and their application for system implementation. System call implementation. Implementation of logical latches and mutexes. Kernel mode programming topics.
- 4 Process management
- Scheduling types and algorithms. State and life cycle of processes. Scheduling and performance metrics.
- 5 Memory management
- Fundamental concepts of memory management. Virtual Addressing. Types of virtual addressing. Virtual memory management algorithms.
Curricular Unit Teachers
João António Pereira Almeida DurãesGrading Methods
Assessment consists of three components: a task, an exam, and a practical assignment.
Task:
- The task consists of installing and configuring the working environment for the classes in the form of a virtual machine, according to the procedures and alternatives specified in the corresponding task description.
- The task is validated during a laboratory class specified in the task description. Validation takes place in the laboratory class in which the student is enrolled. No alternative date or time slot is available, except for students formally registered in NONIO as having working-student status, who may be offered an alternative time slot.
- Successful completion and validation of the task are worth 0.4 marks. Failure to complete the task results in the loss of these marks, with no possibility of recovery.
- The task from the previous academic year cannot be carried over.
Practical assignment:
- The assignment may be carried out individually or in groups of two students enrolled in the same laboratory class.
- The assignment is carried out exclusively during the semester. Students who do not complete the assignment during the semester will permanently forfeit the corresponding marks and may not replace it by any other means or through the exam, in any assessment period.
- The assignment is described in one or more specifications, which will be made available at the appropriate time and will contain details of the applicable requirements and rules.
- The assignment is subject to two progress monitoring and presentation sessions, to be held during classes specified in the assignment description. Failure to attend any of these sessions will result in the permanent loss of part of the marks allocated to the assignment, as specified in the assignment description. Progress monitoring and presentations take place in the laboratory class in which the student is enrolled.
- Students formally registered in NONIO as having working-student status may choose to attend the progress monitoring sessions outside their regular class, at a time to be agreed with the lecturer.
- The assignment may be assessed according to one of two alternative profiles: Profile A, in which the assignment is worth 2.5 marks, or Profile B, in which it is worth 4.5 marks. The exam will be worth the remaining marks required, together with the task, to make up a total of 20 marks.
- Under Profile A, the assignment is worth 2.5 marks and assessment consists solely of the two progress monitoring sessions, during which progress, compliance with the requirements, and aspects related to the quality of the solution are assessed, with greater emphasis on the second session. After the second assessment session, the student is informed of the mark obtained.
- Under Profile B, the assignment is worth 4.5 marks and requires an additional defence, similar in nature to an oral examination, in which the student's command of the subject matter involved is assessed in detail. The result of this defence may lower the mark already obtained in the second assessment session.
- By default, all students are assessed under Profile A. At the end of the second progress monitoring session, a student may choose to switch to Profile B. Students who choose to do so must register for a time slot for the defence. The final assignment mark will be determined on the basis of the mark already obtained and the student's performance in the defence.
- The choice of Profile B is individual, even when the assignment is carried out by a group of two students. Switching to Profile B is voluntary but final.
- Assignments from previous years: only assignments completed in the 2025/2026 academic year may be carried over. Carrying over an assignment requires a request from the students concerned, submitted through NONIO, and places the student under Profile B. The 4 marks corresponding to the assignment completed in the previous academic year are retained. Obtaining the additional 0.5 marks available under Profile B in the current academic year requires a new presentation of the assignment, intended to verify that it remains functional and that the student retains knowledge of the solution presented. Failure to attend this presentation, or an insufficient performance, results in the additional 0.5 marks not being awarded. Participation in any progress monitoring session for the current academic year's assignment eliminates the possibility of carrying over the assignment from the previous year.
Exam:
- A written examination, held during the official assessment periods and on the dates established by the School.
- The exam is worth the remaining marks required to make up a total of 20 marks, taking into account the 0.4 marks allocated to the task and the student's practical assignment profile: 17.1 marks under Profile A or 15.1 marks under Profile B.
- The exam is subject to a minimum passing mark of 35%.
- During the exam, students may only access the materials specified by the lecturers.
- Registration may be required in order to take the exam during the regular assessment period. This registration does not replace enrolment in the course unit or registration for the exam through the Academic Services and is intended solely to optimise the allocation of rooms and invigilators.
Oral validation:
- Any assessment may be subject to oral validation. The lecturers will determine whether such validation is required. It may apply to any assessment, including exams, and may be required of all students or only some students. The students concerned will be informed accordingly.
Internship(s)
NAO
Bibliography
Main references
Marques, J. A., Guedes, P. (1998). Fundamentos de Sistemas Operativos (4rd ed.), Editorial Presença – 1A-3-114
Silberschatz, A., Galvin, P. B., Gagne, G. (2009). Operating Systems Concepts (8th ed.), Wiley & Sons – 1A-3-137
Matthew, N., Stones R., (1999). Beginning Linux Programming (2nd ed.), Wrox press – 1A-3-155
Complementary references
Stallings, W. (2017). Operating Systems: Internals and Design Principles (9th ed.), Pearson
Marques, J. A., Ferreira, P., Ribeiro, C., Veiga, L., Rodrigues, R. (2012). Sistemas Operativos (2nd ed.), FCA
Wirzenius L., (2021). The Linux System Administrators’ Guide, The Linux Documentation Project, online: https://tldp.org/