5Threads, Scheduling, and New Memory Models

“The only reason for time is so that everything doesn’t happen at once.”

—Albert Einstein

IN a real-time environment, it’s important to ensure the timely and predictable execution of tasks. This implies that the system make conscious decisions about priorities, resource usage profiles, and latency requirements when scheduling individual tasks, or threads. Java RTS works closely with its host operating system to properly schedule threads to achieve the deadlines of all running tasks. It begins with a Schedulable object, for which there are four types in the Java RTS system, controlled by a real-time scheduler.

This chapter begins with a discussion of thread priorities and the effect that shared resources ...

Get Real-Time Java™ Programming with Java RTS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.