Professional Documents
Culture Documents
Operating Systems
Concepts and Principles
monolithic and micro kernels
Implementation Techniques
resource allocation time management - process scheduling memory management - usage models and page allocation file systems case studies - Kops, Linux, NT etc.
1
Coursework
To Be Announced
probably involving some programming
deadline - mid-term
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.
Motivation
An Automated Teller Machine (ATM) process
process to deposit an amount into an account:
deposit (account, amount) { read ( account, balance ); balance = balance + amount; // read balance from database // add deposit amount
// update database
process to withdraw an amount from an account: withdraw ( account, amount ) { read (account, balance); balance = balance - amount; write ( account, balance); } concurrent processes?
4
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
An OS aims to be efficient
for user for system manager
10
11
12
Interfaces
user user user user user
process
process
process
process
process
Operating System
Hardware
13
14
15
16
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
Reasons:
control of asynchronous I/O devices
17
18
19
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
access to all areas of virtual memory ability to switch interrupts on and off
each level may have its own processor registers to speed context switching
20
Interrupt handling
Device drivers File system Networking Applications?
Web browser? Email?
21
22
real-time system may need to pre-allocate processor time to guarantee meeting deadlines
overall efficiency may need to suffer
23
avionics
- FADECs, GPS, FMS
24
Monolithic OS
each function coded as a separate procedure linked into one executable code object event-driven core which calls appropriate procedures when required
driven by interrupts and system calls from processes
Linux
modules can be dynamically linked and unlinked as required
25
Micro-kernel OS
each function coded as a separate process
system processes
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
Windows NT Structure
Hardware
27
micro-kernel
better partitioning - should be easier to implement and maintain smaller memory resident core slower switching to system processes inter-system-process communications may be slower
28