Operating Systems

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ães

Grading Methods

There are four assessment components:

i) Written exam
ii) Construction of work environment
iii) Practical assignment
iv) Evaluation in theoretical classes

 

Written exam: weight of 13.6 points, mandatory. This exam covers material from both theoretical and practical classes.

  • The exam is closed-book, except for materials explicitly authorized by the instructors.
  • Prior registration for the exam through the course’s electronic platform may be required. If this indication is given, registration is a necessary condition for taking the exam. This registration does not replace the registration with the academic services.
  • The exam has a minimum grade requirement of 35%. Failure to reach this minimum results in failing the course.
  • This written exam is the only assessment component carried out during exam periods (regular, resit, special, etc.). The remaining components are completed only during the semester or at its end.

 

Construction of work environment: weight of 0.4 points, no minimum grade requirement.

  • The work environment consists of a Unix development environment, with detailed instructions provided during the first week. The environment must be built, configured, and demonstrated in the practical class of the third week of the semester. In the case of working students with officially recognized status, the demonstration may take place on a date and time to be arranged, during the same week.
  • Successful demonstration of the work environment in the third week’s practical class will be graded up to 0.4 points. Failure to achieve this objective results in the loss of these 0.4 points, with no possibility of recovery.
  • The construction of the work environment is an individual task.

 

Practical assignment: weight of 4 points, no minimum grade requirement.

  • The assignment must be completed in groups of up to two students. Group formation is mandatory through the electronic platform by the deadline specified in the assignment description. After this date, students who have not registered must complete the assignment individually.
  • The assignment is carried out during the semester and submitted at the end of classes on the date specified in the assignment description. There is no alternative schedule or replacement option. Failure to submit results in loss of its grade.
  • The assignment is subject to mandatory individual presentation and defense. The defense may significantly affect the grade awarded to each student.
  • Work effectively completed in the immediately preceding year may be reused, regardless of the grade obtained, provided it was actually completed in that year and is not the result of reuse from previous years.

 

Evaluation in theoretical classes: weight of 2 points, no minimum grade requirement.

  • In some theoretical classes, there will be a question to be answered in writing by each student. The set of questions is worth 2 points, with the actual score obtained by the student proportional to the number of questions correctly answered out of the total questions asked.
  • The only scheduling for classes where questions will be asked is: a) no questions will be asked in the first week; b) there will be a maximum of 10 classes with questions, possibly fewer. Per week, a student can answer, at most, one question.
  • Only students present and registered in the class may answer the questions. Students officially recognized as working students may alternatively answer one additional question during the regular exam period. This alternative is mutually exclusive: answering in class excludes the option of the additional exam question.
  • Except for the working-student scenario described above, theoretical-class questions are not optional: students who do not answer lose the corresponding points, with no possibility of recovery.

 

The final course grade is the sum of the written exam, the construction of the work environment, the practical assignment, and the evaluation in theoretical classes.

All assessment activities are in-person.


    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/