Professional Documents
Culture Documents
Operating Systems: Concepts and Principles
Operating Systems: Concepts and Principles
Operating Systems
Concepts and Principles
monolithic and micro kernels
processes and threads
their management and synchronisation
interprocess communication
interrupts and signals
virtual memory - paging and segmentation
Implementation Techniques
resource allocation
time management - process scheduling
memory management - usage models and page allocation
file systems
case studies - Kops, Linux, NT etc.
1
Operating Systems: Intro
Coursework
To Be Announced
probably involving some programming
deadline - mid-term
Essay - in-depth comparison of PDA Operating Systems
structure, scheduling, memory management, security etc.
deadline - end of term
2
Operating Systems: Intro
Textbooks
William Stallings, Operating Systems, Internals & Design Principles, 4th
edition, Prentice-Hall, 2001.
Abraham Silberschatz & Peter Galvin, Operating System Concepts, 5th
edition, Addison-Wesley, 1998.
Gary Nutt, Operating Systems, A Modern Perspective, 2nd edition,
Addison-Wesley, 2000.
D.A.Solomon & M.E.Russinovitch, Inside Windows 2000, 3rd edition,
MicroSoft Press, 2000.
D.Boling, Programming MicroSoft Windows CE, MicroSoft Press, 1998.
Michael Beck et al., Linux Kernel Internals, 2nd edition, Addison-Wesley,
1997.
John OGorman, Operating Systems with Linux, Palgrave, 2001.
3
Operating Systems: Intro
Motivation
An Automated Teller Machine (ATM) process
process to deposit an amount into an account:
deposit (account, amount) {
read ( account, balance ); // read balance from database
balance = balance + amount; // add deposit amount
write (account, balance ); // update database
}
process to withdraw an amount from an account:
withdraw ( account, amount ) {
read (account, balance); // read balance from database
balance = balance - amount; // subtract withdrawal amount
write ( account, balance); // update database
}
concurrent processes?
4
Operating Systems: Intro
5
Operating Systems: Intro
Operating Systems
Main purpose is to facilitate the execution of user application programs
bare hardware is extremely messy and difficult for users to program
processors
memory
peripheral devices
concurrency
interrupts
files
networks
6
Operating Systems: Intro
user-level processor
virtual memory
high-level facilities
7
Operating Systems: Intro
8
Operating Systems: Intro
An OS aims to be efficient
for user
9
Operating Systems: Intro
running
blocked
in main memory
ready to run
terminated
10
Operating Systems: Intro
11
Operating Systems: Intro
must cooperate
12
Operating Systems: Intro
Interfaces
Operating System
Hardware
13
Operating Systems: Intro
14
Operating Systems: Intro
15
Operating Systems: Intro
16
Operating Systems: Intro
Interrupts
An interruption in the normal execution flow of a processor
a mechanism for causing the processor to suspend its current computation
and take up some new task
old context must be preserved
control can be returned to the original task at some later time
new context started
Reasons:
control of asynchronous I/O devices
17
Operating Systems: Intro
18
Operating Systems: Intro
process (or OS) continually polls I.e. inspects, device status registers
awaiting some condition e.g. transfer completed
19
Operating Systems: Intro
Privilege
Processors run at various levels of privilege
user-level
only the types of instruction needed by applications programs
only access to permitted areas of virtual memory
supervisor or kernel level
all types of instruction including I/O instructions
access to system registers
- virtual memory registers
- interrupt vectors
access to all areas of virtual memory
ability to switch interrupts on and off
may be intermediate levels on some architectures
each level may have its own processor registers to speed context switching
20
Operating Systems: Intro
Applications?
Web browser?
Email?
Windows?
Command interpreters?
21
Operating Systems: Intro
22
Operating Systems: Intro
efficiency important
database queries
23
Operating Systems: Intro
24
Operating Systems: Intro
Monolithic OS
each function coded as a separate procedure
Linux
25
Operating Systems: Intro
Micro-kernel OS
each function coded as a separate process
system processes
only the minimum possible function in the core kernel
virtual memory organising
interrupt handling
process dispatching
appropriate system process activated as soon as possible to deal with all
other functions
system processes will have higher privilege and usually higher priority than
user processes
Windows NT
Intermediate flavours
some system processes but not a minimal micro-kernel
26
Operating Systems: Intro
Windows NT Structure
Hardware
27
Operating Systems: Intro
micro-kernel
28