|
|
|
vii | |
| Introduction |
|
ix | |
|
Chapter 1 Introduction to Threads in Java |
|
|
1 | (26) |
|
1.1 Processes versus threads |
|
|
1 | (1) |
|
|
|
2 | (1) |
|
|
|
3 | (1) |
|
|
|
4 | (1) |
|
1.5 Monotask versus multitask |
|
|
5 | (8) |
|
1.6 Different states of a thread |
|
|
13 | (1) |
|
1.7 Lifecycle of a thread |
|
|
13 | (3) |
|
1.8 A few notes concerning threads |
|
|
16 | (5) |
|
1.8.1 Two threads without using sleep |
|
|
16 | (1) |
|
1.8.2 Time allocation between two threads |
|
|
17 | (2) |
|
1.8.3 Priority between threads |
|
|
19 | (2) |
|
1.9 Programming a task: Timer and TimerTask |
|
|
21 | (6) |
|
1.9.1 By specifying an initial delay |
|
|
21 | (2) |
|
1.9.2 With an initial delay and periodicity |
|
|
23 | (4) |
|
Chapter 2 Thread Synchronization |
|
|
27 | (34) |
|
2.1 Synchronization upon termination: join() method |
|
|
27 | (3) |
|
2.2 Resource in mutual exclusion: synchronized modifier |
|
|
30 | (3) |
|
2.3 Shared variables: internal class |
|
|
33 | (2) |
|
2.4 The problem with mutual exclusions |
|
|
35 | (1) |
|
|
|
36 | (5) |
|
2.6 Synchronized instance method |
|
|
41 | (2) |
|
2.7 Shared variables: class variable |
|
|
43 | (2) |
|
2.8 Synchronization between threads |
|
|
45 | (6) |
|
|
|
45 | (3) |
|
|
|
48 | (3) |
|
2.9 Classic Producer--Consumer pattern |
|
|
51 | (3) |
|
|
|
54 | (7) |
|
|
|
55 | (2) |
|
|
|
57 | (4) |
|
Chapter 3 Real-Time Systems and Real-Time Java |
|
|
61 | (10) |
|
|
|
61 | (4) |
|
|
|
61 | (1) |
|
3.1.2 Examples of real-time operating systems |
|
|
62 | (1) |
|
|
|
62 | (1) |
|
|
|
63 | (1) |
|
3.1.5 Task ordinance with priorities |
|
|
63 | (2) |
|
|
|
65 | (6) |
|
3.2.1 RTSJ (Real-Time Specification for Java) |
|
|
65 | (2) |
|
|
|
67 | (4) |
|
Chapter 4 Distributed Programming in Java |
|
|
71 | (56) |
|
4.1 Definition of a distributed application |
|
|
71 | (1) |
|
4.2 Communication in a distributed application |
|
|
72 | (55) |
|
4.2.1 Low-level communication: socket |
|
|
72 | (17) |
|
4.2.2 High-level communication: middleware |
|
|
89 | (38) |
| Appendix |
|
127 | (28) |
| Bibliography |
|
155 | (2) |
| Index |
|
157 | |