Professional Documents
Culture Documents
Structures
2.2
Objectives
To describe the services an operating system provides to
system
2.3
2.4
One set of operating-system services provides functions that are helpful to the
user (Cont.):
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 Application
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
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
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
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
File
System
messages
Interprocess
Communication
Device
Driver
user
mode
messages
memory
managment
CPU
scheduling
kernel
mode
microkernel
hardware
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
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
virtual 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
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
2.49
Performance Tuning
Improve performance by
removing bottlenecks
2.50
DTrace
DTrace tool in Solaris,
Example of following
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