Contents

Preface

Acknowledgments

About the Authors

PART I REAL-TIME COMPUTING CONCEPTS

Chapter 1 Real-Time for the Rest of Us

Qualities of Real-Time Systems

Predictability and Determinism

Identifying Latency

Identifying Jitter

Hard and Soft Real-Time

Isochronal Real-Time

Real-Time Versus Real Fast

Real-Time Versus Throughput

Task Completion Value

Real-Time Computing

The Highway Analogy

The Highway Analogy—Adding a Priority Lane

Real-Time Scheduling

Scheduling Constraints

Scheduling Algorithms

Real-Time Operating Systems

RT-POSIX Operating System Extensions

Further Reading

Chapter 2 Real-Time and Java SE

Is Java a Real-Time Language?

Sources of Unbounded Latency and Jitter

Lack of Strict Thread Priorities

Garbage Collection

What, Exactly, Is Garbage Collection?

Common Garbage Collection Algorithms

Garbage Collection in Sun’s Java SE 6 HotSpot

Java Object Generations

Collectors

Memory Allocation

Safepoints

The Future: Garbage-First (G1)

Real-Time GC Algorithms

Work-Based GC

Time-Based GC

Henriksson’s GC

RTGC in the Sun Java Real-Time System

The Java Dilemma

Chapter 3 The Real-Time Specification for Java

A Foundation for Real-Time Java

Inside the RTSJ

Scheduling

Memory Management

Resource Sharing

Asynchronous Event Handling (AEH)

Asynchronous Transfer of Control

Physical Memory Access

Optional RTSJ Facilities

The Future of Real-Time Java

Chapter 4 The Sun Java Real-Time System

A Prelude to Java RTS Programming

Operating System Support

Solaris and Real-Time

Linux and Real-Time

Installing Java RTS

Solaris Installation

Linux Installation

Guide to Determinism

Use Real-Time Threads

Tuning the Real-Time Garbage Collector

Critical Reserved Memory

Processor Bindings

Java RTS Code Compilation

Interpreting RTGC Statistics

Using the RTSJ Clock API

Command-Line Options

RTGC-Related Options

Memory-Related Options

Thread-Related Options

Asynchrony-Related Options

Compiler and Interpreter-Related Options

Java RTS Optimization Options

PART II INSIDE JAVA RTS

Chapter 5 Threads, Scheduling, and New Memory Models

Schedulable Objects

The Real-Time Scheduler

Scheduling Parameters

Release Parameters

Real-Time Threads

Using RealtimeThread

Using NoHeapRealtimeThread

Implementing Periodic Threads

Deadline Miss Handler

Implementing Aperiodic Threads

Memory Models

Memory Access Rules

Scoped Memory

Physical Memory

Chapter 6 Synchronization

Resource Sharing

Priority Inversion Control

Priority Inheritance in Action

Wait-Free Thread Communication

Using WaitFreeWriteQueue

Using WaitFreeReadQueue

Chapter 7 The Real-Time Clock API

The Clock API

Java RTS High-Resolution Time Operations

A Conflated Stock Data Feed Example

The Conflater Class

Chapter 8 Asynchronous Events

Asynchronous Event Processing

Building an Asynchronous Event Handler (AEH)

Internal Application Events

Bound Asynchronous Event Handlers

Working with Event Fire Count

Handling POSIX Events

Specifying a Memory Area

Time-Based Events

One-Shot Timers

Periodic Timers

Chapter 9 Asynchronous Transfer of Control and Thread Termination

Asynchronous Transfer of Control (ATC)

Implementing Interruptible Code

Implementing Timed Operations

Asynchronous Thread Termination

Chapter 10 Inside the Real-Time Garbage Collector

RTGC Theory of Operation

Concurrent Marking

Concurrent Sweeping

Concurrent Zeroing

RTGC Memory Allocation

Heap Layout

Thread-Local Allocation Buffers

Object Splitting

Array Splitting and Caching

RTGC Policies

Full-Time RTGC Policy

Segregated RTGC Policy

Time-Based RTGC Policy

Isolated RTGC Policy

PART III USING JAVA RTS

Chapter 11 An Equities Trading System

The Equities Market

Limit Orders

Stop Orders

The Trading System Implementation

The System Architecture

The Trading Engine

The Java SE Version

The MarketManager Class

The OrderManager Class

The Java RTS Version

The Java RTS No-Heap Version

The OrderManager Class

The MarketManager Class

Application Configuration

Chapter 12 Java RTS Tools

Java RTS Development

Remote Debugging with the NetBeans Plugin

Alternative Development Environments

The Thread Schedule Visualizer (TSV)

TSV Log File Format

Working with TSV Log Files

Record Your Application’s Events

Working with the TSV Viewer

Java RTS DTrace Probes

DTrace Probes for Schedulables

DTrace Probes for Memory

DTrace Probes for Threads

DTrace Probes for AsyncEventHandlers

DTrace Probes for Compilation

DTrace Probes for RTGC

DTrace Probes for Class Loading

DTrace Probes for VM Activity

Application-Specific DTrace Probes

Bibliography

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.132.235