Operating Systems and Middleware.pdf

(2760 KB) Pobierz
Operating Systems and Middleware:
Supporting Controlled Interaction
Max Hailperin
Gustavus Adolphus College
Revised Edition 1.1.1
August 8, 2011
Copyright c 2011 by Max Hailperin.
This work is licensed under the Creative Commons Attribution-ShareAlike
3.0 Unported License. To view a copy of this license, visit
http:// creativecommons.org/ licenses/ by-sa/ 3.0/
or send a letter to Creative Commons, 171 Second Street, Suite 300, San
Francisco, California, 94105, USA.
To my family
iv
Contents
Preface
1 Introduction
1.1 Chapter Overview . . . . . . . . . . . . . . . . . . .
1.2 What Is an Operating System? . . . . . . . . . . . .
1.3 What is Middleware? . . . . . . . . . . . . . . . . . .
1.4 Objectives for the Book . . . . . . . . . . . . . . . .
1.5 Multiple Computations on One Computer . . . . . .
1.6 Controlling the Interactions Between Computations .
1.7 Supporting Interaction Across Time . . . . . . . . .
1.8 Supporting Interaction Across Space . . . . . . . . .
1.9 Security . . . . . . . . . . . . . . . . . . . . . . . . .
2 Threads
2.1 Introduction . . . . . . . . . . . . . . .
2.2 Example of Multithreaded Programs .
2.3 Reasons for Using Concurrent Threads
2.4 Switching Between Threads . . . . . .
2.5 Preemptive Multitasking . . . . . . . .
2.6 Security and Threads . . . . . . . . . .
xi
1
1
2
6
8
9
11
13
15
17
21
21
23
27
30
37
38
45
45
46
49
51
54
55
61
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3 Scheduling
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Thread States . . . . . . . . . . . . . . . . . . . . . . .
3.3 Scheduling Goals . . . . . . . . . . . . . . . . . . . . .
3.3.1 Throughput . . . . . . . . . . . . . . . . . . . .
3.3.2 Response Time . . . . . . . . . . . . . . . . . .
3.3.3 Urgency, Importance, and Resource Allocation
3.4 Fixed-Priority Scheduling . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
v
Zgłoś jeśli naruszono regulamin