Structures
2.2
Objectives
To describe the services an operating system provides to
system
To explain how operating systems are installed and
2.3
2.4
May occur in the CPU and memory hardware, in I/O devices, in user
program
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
Unix and Linux have CLI with optional GUI interfaces (CDE,
KDE, GNOME)
2.10
Touchscreen Interfaces
Touchscreen devices require new
interfaces
Voice commands.
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
2.13
2.14
2.15
kernel 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
Simple method to run
program
No process created
reloaded
At system startup
2.26
running a program
Example: FreeBSD
Unix variant
Multitasking
User login -> invoke users choice of
shell
Shell executes fork() system call to create
process
code = 0 no error
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
Some of them are simply user interfaces to system calls; others
are considerably more complex
File management - Create, delete, copy, rename, print, dump, list,
Some ask the system for info - date, time, amount of available
memory, disk space, number of users
Others provide detailed performance, logging, and debugging
information
Typically, these programs format and print the output to the
terminal or other output devices
Some systems implement a registry - used to store and
retrieve configuration information
2.29
2.30
2.31
2.32
software engineering
2.33
Implementation
Much variation
Now C, C++
Main body in C
But slower
2.34
Layered an abstrcation
Microkernel -Mach
2.35
2.36
Systems programs
The kernel
2.37
2.38
Layered Approach
The operating system is divided
2.39
message passing
Benefits:
More secure
Detriments:
2.40
2.41
Modules
Many modern operating systems implement loadable kernel
modules
2.42
2.43
Hybrid Systems
Most modern operating systems are actually not one pure model
programming environment
2.44
Mac OS X Structure
2.45
iOS
Apple mobile OS for iPhone, iPad
2.46
Android
Developed by Open Handset Alliance (mostly Google)
Open Source
virtual machine
2.47
Android Architecture
2.48
Operating-System Debugging
Debugging is finding and fixing errors, or bugs
OS generate log files containing error information
Failure of an application can generate core dump file capturing
kernel memory
Beyond crashes, performance tuning can optimize system performance
2.49
Performance Tuning
Improve performance by
removing bottlenecks
OS must provide means of
2.50
DTrace
DTrace tool in Solaris,
2.51
Dtrace (Cont.)
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