
(DRAFT) The Real-Time Specification for Java™ The Real-Time for Java Expert Group http://www.rtj.org Greg Bollella Ben Brosgol Peter Dibble Steve Furr James Gosling David Hardin Mark Turnbull Rudy Belliardi The Reference Implementation Team Doug Locke Scott Robbins Pratik Solanki Dionisio de Niz ADDISON-WESLEY Boston • San Francisco • New York • Toronto • Montreal London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City Copyright © 2000 Addison-Wesley. Duke logo ΤΜ designed by Joe Palrang. Sun, Sun Microsystems, the Sun logo, the Duke logo, and all Sun, Java, Jini, and Solaris based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc., in the United States and other countries. UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd. All other product names mentioned herein are the trademarks of their respective owners. U.S. GOVERNMENT USE:This specification relates to commercial items, processes or software. Accordingly, use by the United States Government is subject to these terms and conditions, consistent with FAR12.211 and 12.212. THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICATION. THE REAL-TIME FOR JAVA EXPERT GROUP MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME. IN PARTICULAR, THIS EDITION OF THE SPECIFICATION HAS NOT YET BEEN FINALIZED: THIS SPECIFICATION IS BEING PRODUCED FOLLOWING THE JAVA COMMUNITY PROCESS AND HENCE WILL NOT BE FINALIZED UNTIL THE REFERENCE IMPLEMENTATION IS COMPLETE. THE EXPERIENCE OF BUILDING THAT REFERENCE IMPLEMENTATION MAY LEAD TO CHANGES IN THE SPECIFICATION. The publisher offers discounts on this book when ordered in quantity for special sales. For more information, please contact: Pearson Education Corporate Sales Division One Lake Street Upper Saddle River, NJ 07458 (800) 382-3419 [email protected] Visit Addison-Wesley on the Web at www.awl.com/cseng/ Library of Congress Control Number: 00-132774 ISBN 0-201-70323-8 Text printed on recycled paper. 1 2 3 4 5 6 7 8 9 10-MA-04 03 02 01 00 First printing, June 2000 To Vicki, who has been committed to our effort from the beginning — GB To Deb, Abz, and Dan, for making it all worthwhile — BB To Ken Kaplan and my family, who allowed me the time and resources for this work — PD To Linda, who has always been a true friend, cared for my home in my absences, welcomed me at the airport and generally shown patience and consideration — SF To Judy, Kelsey, and Kate, who gave me the Love and Time to work on this book — JG To Debbie, Sam, and Anna, who endured my frequent absences, and general absentmindedness, during the writing of this book — DH To my daughters Christine, Heather, and Victoria, and especially to my wife Terry, who all put up with my strange working hours — MT To my mother Maria, brother Luigi, sister-in-law Claude, and nephew Nicola — RB To my wife Kathy for her unflagging support throughout this effort, and her patience with the time required to complete this work — DL To my mother Donna and my father Jerry, who put up with me all these years, and my brother Kenneth who introduced me to computers in the first place — SR To my wife Sohini, for her love and understanding — PS To my wife Chelo, for her love, support and understanding in this journey; and to my daughters Ana and Sofia, the light of the journey — DdN To the Stanford Inn-by-the-Sea, the Chicago Hilton, and the Chateau Laurier for providing space for a bunch of geeks to hang out; and to the Beaver Tail vendors by the Rideau Canal for providing a yummy distraction. Contents Caveat ............................................................................................... 9 Authors ........................................................................................... 11 Foreword ........................................................................................ 13 Preface ............................................................................................ 17 1 Introduction ..................................................................................... 1 2 Design ............................................................................................... 5 3 Conventions ................................................................................... 17 4 Conformance, Compliance, and Portability of the RTSJ .......... 19 5 Threads .......................................................................................... 23 RealtimeThread .................................................................................. 25 NoHeapRealtimeThread ..................................................................... 38 6 Scheduling ...................................................................................... 43 Schedulable ......................................................................................... 47 Scheduler ............................................................................................ 54 PriorityScheduler ................................................................................ 58 SchedulingParameters ........................................................................ 63 PriorityParameters .............................................................................. 63 ImportanceParameters ........................................................................ 65 ReleaseParameters .............................................................................. 66 PeriodicParameters ............................................................................. 70 AperiodicParameters .......................................................................... 73 SporadicParameters ............................................................................ 75 ProcessingGroupParameters ............................................................... 81 7 Memory Management .................................................................. 85 MemoryArea ....................................................................................... 90 HeapMemory ...................................................................................... 95 ImmortalMemory ............................................................................... 96 SizeEstimator ...................................................................................... 97 ScopedMemory ................................................................................... 98 VTMemory ....................................................................................... 105 5 CONTENTS July 31, 2002 LTMemory ....................................................................................... 107 PhysicalMemoryManager ................................................................ 110 ImmortalPhysicalMemory ................................................................ 113 PhysicalMemoryTypeFilter .............................................................. 119 LTPhysicalMemory .......................................................................... 122 VTPhysicalMemory ......................................................................... 129 RawMemoryAccess ......................................................................... 135 RawMemoryFloatAccess ................................................................. 145 MemoryParameters .......................................................................... 150 GarbageCollector ............................................................................. 154 8 Synchronization ........................................................................... 155 MonitorControl ................................................................................. 156 PriorityCeilingEmulation ................................................................. 158 PriorityInheritance ............................................................................ 158 WaitFreeWriteQueue ....................................................................... 159 WaitFreeReadQueue ........................................................................ 162 WaitFreeDequeue ............................................................................. 165 9Time .............................................................................................. 169 HighResolutionTime ........................................................................ 172 AbsoluteTime ................................................................................... 176 RelativeTime .................................................................................... 182 RationalTime .................................................................................... 187 10 Timers .......................................................................................... 191 Clock ................................................................................................ 192 Timer ................................................................................................ 194 OneShotTimer .................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages346 Page
-
File Size-