Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Structures
System Calls
System Services
Linkers and Loaders
I/O operations - A running program may require I/O, which may involve a
file or an I/O device
For each type of error, OS should take the appropriate action to ensure correct
and consistent computing
Logging - To keep track of which users use how much and what kinds of
computer resources
Unix and Linux have CLI with optional GUI interfaces (e.g., CDE, KDE,
GNOME)
Operating System Concepts 11 Silberschatz, Galvin and Gagne ©2018
Touchscreen Interfaces
Voice commands
System call sequence to copy the contents of one file to another file
Index of open()
Index table
Process control
create process, terminate process
load, execute
File management
create file, delete file
Device management
request device, release device
Information maintenance
get time or date, set time or date
Communications
create, delete communication connection
Protection
Control access to resources
Single-tasking
No operating system
Unix variant
Multitasking
Communications
Background services
Application programs
File modification
Text editors to create and modify files
Special commands to search contents of files or perform transformations
of the text
Background Services
Launch at boot time
Some for system startup, then terminate
Application programs
Don’t pertain to system, run by users
Not typically considered part of OS
Launched by command line, mouse click, finger poke
Operating System Concepts 32 Silberschatz, Galvin and Gagne ©2018
Linkers and Loaders
Source code compiled into object files designed to be loaded into any
physical memory location – relocatable object file
Linker combines these (also, brings in libraries) into single binary
executable file
Much variation
Early, OSes in assembly language
Then, system programming languages like Algol, PL/1, and now C, C++
Main body in C
Layered – an abstraction
Microkernel – Mach
Kernel
Consists of everything below the system-call interface and above the physical
hardware
Provides the file system, CPU scheduling, memory management, and other
operating-system functions; a large number of functions for one level
Most modern operating systems are actually not one pure model
Hybrid combines multiple approaches to address performance, security,
usability needs
Configure the operating system for the system on which it will run
Operating system failure can generate crash dump file containing kernel memory
Kernighan’s Law: “Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible,
you are, by definition, not smart enough to debug it.”
Operating System Concepts 56 Silberschatz, Galvin and Gagne ©2018
Performance Tuning