Professional Documents
Culture Documents
Chapter 2: Operating-System Structures: Silberschatz, Galvin and Gagne ©2013 Operating System Concepts - 9 Edition
Chapter 2: Operating-System Structures: Silberschatz, Galvin and Gagne ©2013 Operating System Concepts - 9 Edition
Structures
2.2
Objectives
To describe the services an operating system provides to users,
2.3
One set of operating-system services provides functions that are helpful to the
user:
User interface - Almost all operating systems have a user interface (UI).
I/O operations - A running program may require I/O, which may involve a
file or an I/O device
2.4
2.5
Another set of OS functions exists for ensuring the efficient operation of the
system itself via resource sharing
Accounting - To keep track of which users use how much and what kinds of
computer resources
2.6
2.7
2.8
2.9
Various mouse buttons over objects in the interface cause various actions
(provide information, options, execute function, open directory (known as a
folder)
Apple Mac OS X is Aqua GUI interface with UNIX kernel underneath and
shells available
Unix and Linux have CLI with optional GUI interfaces (CDE, KDE, GNOME)
2.10
Touchscreen Interfaces
Touchscreen devices require new
interfaces
2.11
2.12
System Calls
Programming interface to the services provided by the OS
Typically written in a high-level language (C or C++)
Mostly accessed by programs via a high-level Application
Three most common APIs are Win32 API for Windows, POSIX API for
(Note that the system-call names used throughout this text are
generic)
2.13
2.14
2.15
and returns status of the system call and any return values
The caller need know nothing about how the system call is
implemented
2.16
2.17
system call
2.18
2.19
end, abort
load, execute
2.20
Device management
2.21
Communications
2.22
2.23
2.24
2.25
Example: MS-DOS
Single-tasking
Shell invoked when system
booted
program
No process created
reloaded
2.26
Example: FreeBSD
Unix variant
Multitasking
User login -> invoke users choice of shell
Shell executes fork() system call to create
process
2.27
System Programs
System programs provide a convenient environment for program
File manipulation
Communications
Background services
Application programs
2.28
System Programs
Provide a convenient environment for program development and
execution
File management - Create, delete, copy, rename, print, dump, list, and
Status information
Some ask the system for info - date, time, amount of available
memory, disk space, number of users
2.29
2.30
Application programs
Run by users
2.31
2.32
be done
engineering
2.33
Implementation
Much variation
Now C, C++
Main body in C
But slower
2.34
2.35
Simple Structure
I.e. MS-DOS written to provide
2.36
UNIX
UNIX limited by hardware functionality, the original UNIX operating
Systems programs
The kernel
2.37
2.38
Layered Approach
The operating system is
2.39
passing
Benefits:
More secure
Detriments:
2.40
Application
Program
File
System
messages
Interprocess
Communication
Device
Driver
user
mode
messages
memory
managment
CPU
scheduling
kernel
mode
microkernel
hardware
2.41
Modules
Most modern operating systems implement loadable kernel modules
2.42
2.43
Hybrid Systems
Most modern operating systems actually not one pure model
environment
2.44
Mac OS X Structure
graphical user interface
Aqua
Cocoa
Quicktime
BSD
kernel environment
BSD
Mach
I/O kit
kernel extensions
2.45
iOS
Apple mobile OS for iPhone, iPad
2.46
Android
Developed by Open Handset Alliance (mostly Google)
Open Source
machine
2.47
AndroidApplications
Architecture
Application Framework
Libraries
Android runtime
SQLite
openGL
surface
manager
media
framework
webkit
Core Libraries
Dalvik
virtual machine
libc
Linux kernel
Operating System Concepts 9th Edition
2.48
Operating-System Debugging
Debugging is finding and fixing errors, or bugs
OSes generate log files containing error information
Failure of an application can generate core dump file capturing
kernel memory
2.49
Performance Tuning
Improve performance by
removing bottlenecks
2.50
DTrace
DTrace tool in Solaris,
Example of following
2.51
DTrace
DTrace code to record
2.52
2.53
System Boot
When power initialized on system, execution starts at a fixed memory
location
can start it
2.54
End of Chapter 2