Copyright © Antonio D'Angelo, Univ. of Udine
Aims
The aim of the course is that to acquaint the student with the software
machinary devoted to control the processing operations of a computer.
Operating systems are presented in a layered fashion where the lower
layer is the hardware whereas the upper layer is the graphic user
interface. So, the kernel is the initial program loaded into the central
memory to dispatch the basic activities of the hardware: CPU cycles to
be assigned to every process and memory space to be allocated to allow
program execution. Some basic resources, such as user stack and heap, are
mentioned as fundamental components of any executing program. So, also memory
management comes with process scheduling and a computer system must know
where to take execution track of program, even on hard disk when no memory
space is no more available (virtual memory).
Method
The course is intended to understand the fundamental mechanisms which are the
normal working background of the current computer systems. Thus, operating
systems are presented as the necessary tool to make usable a computer, without
explicitly considering the applicative programs which are provided to the
end-user depending on his specific requirements. We shall starting with a short
introduction to some hardware architectures on which the operating systems are
built up. The discussion is about process creation and scheduling along with
the memory managemt. The notion of process is largely investigated and compared
with the concept of thread which is widely used in the modern applications
such as browsers, mail clients, etc...
The concept of dedlock is also introduced starting through the request-use-release
model and the resource allocation graph. Different methods to handle deadlocks
are presented and discussed. The course terminates with a short presentation
of O.S. kernels.
Contents
The topics are primarily based on CPU and memory management starting from
the hardware architecture before moving to process scheduling and resource
allocation. Here only central memory allocation is considered because the
disk allocation has been considered in the first part of the course. Some
general properties of process syncronization are investigated dealing with
the classical problem of critical regions, producer-consumer relationship
and the more general framework of the client-server schema.
In the following you can find a schematic program of the course. A more
precise scheduling of the lectures are available as detailed outlines of
their contents.
Computer Architecures
- RISC versus CISC architecture
- Event-driven versus instrucion-driven computing
- RISC architectures: ARM, PowerPC, SPARC, MIPS, Alpha, Cell
Operating Systems Services
- User Interface
- Program Execution
- I/O Operation
- File System manipulation
- Resource Allocation
- Accounting
- System Calls
Processes
- Process Concept
- Process Scheduling
- Operations on Process
- Interprocess Communication
- Client-Server Systems
Threads
- Multithreading Models
- Thread Libraries and Issues
- Operating System Example:
- Windows XP Threads
- Linux Threads
CPU Scheduling
- Basic Concepts
- Scheduling: Criteria & Algorithms
- Thread Scheduling
- Multiple-Processor Scheduling
- Operating Systems Examples
- Algorithm Evaluation
Process Sincronization
- Definition
- The Critical-Section Problem
- Synchronization Hardware
- Semaphores
- Synchronization Problems
- Monitors
- Synchronization Examples
- Atomic Transactions
Deadlocks
- The Deadlock Problem
- System Model
- Deadlock Characterization
- Methods for Handling Deadlocks:
- Deadlock Prevention
- Deadlock Avoidance
- Deadlock Detection
- Recovery from Deadlock
Memory Management
- Background
- Swapping
- Contiguous Memory Allocation
- Paging
- Structure of the Page Table
- Segmentation
- Example: The Intel Pentium
Virtual Memory
- Background
- Demand Paging
- Copy-on-Write
- Page Replacement
- Allocation of Frames
- Thrashing
- Memory-Mapped Files
- Allocating Kernel Memory
- Other Considerations
- Operating-System Examples
Suggested Readings
- Operating System Concepts: Abraham Silberschatz & Peter B. Galvin & Greg Gagne, John Wiley & Sons, 2013
- Modern Operating Systems: Andrew S. Tanenbaum & Herbert Bos, Pearson, 2014
- Operating Systems: Internals and Design Principles: William Stallings, Prentice Hall, 2012
- Computer Architecture: A Quantitative Approach: John L. Hennessy & David A. Patterson, Elsevier, 2007
- Understanding Operating Systems: Ann McIver McHoes & Ida M. Flynn, Course Technology, 2010
- Running Linux: Matthias Kalle Dalheimer & Terry Dawson & Lar Kaufman & Matt Welsh, O'Reilly Publisher, 2002
- The Linux Programming Interface: Michael Kerrisk, William Pollock Publisher, 2010
- PowerPC Architecture: International Business Machine, IBM manual, 1993
- Trusted Platforms: UEFI, PI and TCG-based firmware: Vincent J. Zimmer & Shiva R. Dasari & Sean P. Brogan , IBM & Intel manuals, 2009
- ARMv7-M Architecture Reference Manual: ARM, ARM Limited, 2010
- C Programming Tutorial: Tutorials Point, Pvt. Ltd., 2014
- The C Programming Language: Brian W. Kernighan & Dennis M. Ritchie, Prentice Hall, 1988
- Windows 10 for Dummy: Andy Rathbone, John Wiley, 2015
- Linux Insides: @oxAX, GitBook, 2018
- Programmazione Concorrente: Antonio D'Angelo, Materiale Didattico, 1996
- Lectures from the Course, available as registered users