
Real-Time Java™ Platform Programming By Peter C. Dibble Publisher : Prentice Hall PTR Pub Date : March 11, 2002 ISBN : 0-13-028261-8 Table of Contents Pages : 352 Written for experienced Java platform developers, this practical guide provides a solid grounding in real-time programming. Dibble, a member of the RTSJ expert group, starts with an overview of real-time issues unique to the Java platform. He then explains how to use each major feature of the RTSJ. From broad real-time principles to detailed programming pitfalls, Real-Time Java Platform Programming covers everything you need to know to build effective RT programs. Key topics include: • Interoperability with non-RT code, tradeoffs in real-time development, and RT issues for the JVMtm software • Garbage collection, non-heap access, physical and "immortal" memory, and constant-time allocation of non-heap memory • Priority scheduling, deadline scheduling, and rate monotonic analysis • Closures, asynchronous transfer of control, Yasynchronous events, and timers L F M A E T Team-Fly® Table of Content Table of Content...................................................................................................................i Copyright..............................................................................................................................v Preface ................................................................................................................................vi Introduction ........................................................................................................................vii Chapter 1. Landscape........................................................................................................1 Java Technology and Real Time..................................................................................1 Definition of Real Time ..................................................................................................3 Java's Problem Domain.................................................................................................8 Real-Time Java's Problem Domain .............................................................................9 Summary........................................................................................................................10 Chapter 2. Architecture of the Java Virtual Machine...................................................11 Write Once, Run Anywhere—Maybe.........................................................................11 JVM Components .........................................................................................................12 Interpreter Implementation..........................................................................................23 Chapter 3. Hardware Architecture..................................................................................28 Worst-Case Execution of One Instruction.................................................................28 Management of Troublesome Hardware ..................................................................32 Effects on the JVM .......................................................................................................33 Chapter 4. Garbage Collection .......................................................................................35 Reference Counting .....................................................................................................35 Basic Garbage Collection............................................................................................35 Copying Collectors .......................................................................................................39 Incremental Collection .................................................................................................41 Generational Garbage Collection...............................................................................44 Real-Time Issues..........................................................................................................45 Chapter 5. Priority Scheduling ........................................................................................46 Scheduling Terms.........................................................................................................46 Execution Sequences ..................................................................................................46 Preemption ....................................................................................................................47 Fixed versus Dynamic Priority....................................................................................49 Priority Inversion...........................................................................................................49 Why 32 Priorities? ........................................................................................................52 Problems with Priority Scheduling .............................................................................53 Chapter 6. Scheduling with Deadlines...........................................................................55 Underlying Mechanism ................................................................................................55 Scope of the Scheduler ...............................................................................................56 Some Systems..............................................................................................................56 Timing Is Usually Probabilistic....................................................................................63 Chapter 7. Rate Monotonic Analysis..............................................................................65 Theorems.......................................................................................................................65 Restrictions....................................................................................................................71 Chapter 8. Introduction to the Real-Time Java Platform ............................................74 A Brief History of Real-Time Java..............................................................................74 Major Features of the Specification ...........................................................................76 Implementation .............................................................................................................80 RTSJ Hello World .........................................................................................................80 Chapter 9. Closures..........................................................................................................82 The Language Construct.............................................................................................82 Java Closures ...............................................................................................................82 Limitations of Closures ................................................................................................84 Chapter 10. High-Resolution Time.................................................................................87 Resolution......................................................................................................................87 ii The "Clock"....................................................................................................................87 HighResolutionTime Base Class................................................................................88 Absolute Time ...............................................................................................................89 Relative Time ................................................................................................................90 Rational Time ................................................................................................................90 Chapter 11. Async Events...............................................................................................92 Binding a Happening to an Event ..............................................................................92 Basic Async Event Operation .....................................................................................93 Async Events without Happenings ............................................................................95 Implementation Discussion .......................................................................................100 Chapter 12. Real-Time Threads...................................................................................102 Creation........................................................................................................................102 Scheduling ...................................................................................................................106 Periodic Threads without Handlers..........................................................................110 Periodic Threads with Handlers ...............................................................................115 Interactions with Normal Threads ............................................................................122 Changing the Scheduler............................................................................................123 Chapter 13. Non-Heap Memory ...................................................................................131 The Advantage of Non-Heap Memory.....................................................................131
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages254 Page
-
File Size-