patterns for safety critical java memory usage
play

Patterns for Safety-Critical Java Memory Usage Juan Rios 1 Kelvin - PowerPoint PPT Presentation

Motivation Contribution Summary Patterns for Safety-Critical Java Memory Usage Juan Rios 1 Kelvin Nilsen 2 Martin Schoeberl 1 1 Department of Informatics and Mathematical Modelling Technical University of Denmark 2 Atego Systems, Inc. Java


  1. Motivation Contribution Summary Patterns for Safety-Critical Java Memory Usage Juan Rios 1 Kelvin Nilsen 2 Martin Schoeberl 1 1 Department of Informatics and Mathematical Modelling Technical University of Denmark 2 Atego Systems, Inc. Java Technologies for Real-time and Embedded Systems, 2012 Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 1/14

  2. Motivation Contribution Summary Outline Motivation 1 Problem Outline and Motivation Previous Work Contribution 2 Scoped Memory Usage Patterns Proposed Modifications to SCJ API Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 2/14

  3. Motivation Problem Outline and Motivation Contribution Previous Work Summary Outline Motivation 1 Problem Outline and Motivation Previous Work Contribution 2 Scoped Memory Usage Patterns Proposed Modifications to SCJ API Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 3/14

  4. Motivation Problem Outline and Motivation Contribution Previous Work Summary Problem and Motivation Real-time Java profiles make use of scoped memory regions Explicit scoping requires care from programmers Deal with temporary objects Pass scope-allocated objects as arguments to methods Returning scope-allocated objects from methods Look into the expressiveness of the SCJ memory model Explore patterns on how to use it Focus on how to pass arguments and return objects between private memories Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 4/14

  5. Motivation Problem Outline and Motivation Contribution Previous Work Summary Problem and Motivation Real-time Java profiles make use of scoped memory regions Explicit scoping requires care from programmers Deal with temporary objects Pass scope-allocated objects as arguments to methods Returning scope-allocated objects from methods Look into the expressiveness of the SCJ memory model Explore patterns on how to use it Focus on how to pass arguments and return objects between private memories Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 4/14

  6. Motivation Problem Outline and Motivation Contribution Previous Work Summary Problem and Motivation Real-time Java profiles make use of scoped memory regions Explicit scoping requires care from programmers Deal with temporary objects Pass scope-allocated objects as arguments to methods Returning scope-allocated objects from methods Look into the expressiveness of the SCJ memory model Explore patterns on how to use it Focus on how to pass arguments and return objects between private memories Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 4/14

  7. Motivation Problem Outline and Motivation Contribution Previous Work Summary Problem and Motivation Real-time Java profiles make use of scoped memory regions Explicit scoping requires care from programmers Deal with temporary objects Pass scope-allocated objects as arguments to methods Returning scope-allocated objects from methods Look into the expressiveness of the SCJ memory model Explore patterns on how to use it Focus on how to pass arguments and return objects between private memories Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 4/14

  8. Motivation Problem Outline and Motivation Contribution Previous Work Summary Outline Motivation 1 Problem Outline and Motivation Previous Work Contribution 2 Scoped Memory Usage Patterns Proposed Modifications to SCJ API Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 5/14

  9. Motivation Problem Outline and Motivation Contribution Previous Work Summary Previous Work Memory pools and memory blocks in Immortal and scoped memories Collections of design patterns for RTSJ RTSJ specific Features not in SCJ Violations to reference assignment rules Mapping between memory areas and methods Reduce the need for reference assignment checks Restricted use of RTSJ memory API very similar to SCJ private memories Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 6/14

  10. Motivation Problem Outline and Motivation Contribution Previous Work Summary Previous Work Memory pools and memory blocks in Immortal and scoped memories Collections of design patterns for RTSJ RTSJ specific Features not in SCJ Violations to reference assignment rules Mapping between memory areas and methods Reduce the need for reference assignment checks Restricted use of RTSJ memory API very similar to SCJ private memories Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 6/14

  11. Motivation Problem Outline and Motivation Contribution Previous Work Summary Previous Work Memory pools and memory blocks in Immortal and scoped memories Collections of design patterns for RTSJ RTSJ specific Features not in SCJ Violations to reference assignment rules Mapping between memory areas and methods Reduce the need for reference assignment checks Restricted use of RTSJ memory API very similar to SCJ private memories Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 6/14

  12. Motivation Problem Outline and Motivation Contribution Previous Work Summary Previous Work IBM’s “Lifecycle Memory Managed Periodic Worker Threads" pattern, with focus on object lifetimes and not on understanding scopes Defines four categories of object lifetimes analogous to the lifetime of objects in SCJ scopes RETAIN_FOREVER = Immortal Memory RETAIN_THREAD_GROUP = Mission Memory RETAIN_THREAD = Private Memory RETAIN_ITERATION = Nested Private Memory Relies on java.lang.reflect package, not part of SCJ Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 7/14

  13. Motivation Scoped Memory Usage Patterns Contribution Proposed Modifications to SCJ API Summary Outline Motivation 1 Problem Outline and Motivation Previous Work Contribution 2 Scoped Memory Usage Patterns Proposed Modifications to SCJ API Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 8/14

  14. Motivation Scoped Memory Usage Patterns Contribution Proposed Modifications to SCJ API Summary SCJ Memory API Brief description Immortal Memory MM Memory area objects represent allocation contexts Mission Memory PM1 PM2 Memory areas are entered with: PEH1 PEH2 enterPrivateMemory() executeInArea() Private Memory 1 Creation of objects in an allocation context other than the current is done NM with: Nested Memory newInstance() newArray() Private Memory 2 It is possible to get references to memory areas with: getMemoryArea(Object O) getCurrentManagedMemory() Object representing memory area Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 9/14

  15. Motivation Scoped Memory Usage Patterns Contribution Proposed Modifications to SCJ API Summary SCJ Memory API Brief description Immortal Memory MM Memory area objects represent allocation contexts Mission Memory PM1 PM2 Memory areas are entered with: PEH1 PEH2 enterPrivateMemory() executeInArea() Private Memory 1 Creation of objects in an allocation context other than the current is done NM with: Nested Memory newInstance() newArray() Private Memory 2 It is possible to get references to memory areas with: getMemoryArea(Object O) getCurrentManagedMemory() Object representing memory area Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 9/14

  16. Motivation Scoped Memory Usage Patterns Contribution Proposed Modifications to SCJ API Summary SCJ Memory API Brief description Immortal Memory MM Memory area objects represent allocation contexts Mission Memory PM1 PM2 Memory areas are entered with: PEH1 PEH2 enterPrivateMemory() executeInArea() Private Memory 1 Creation of objects in an allocation context other than the current is done NM with: Nested Memory newInstance() newArray() Private Memory 2 It is possible to get references to memory areas with: getMemoryArea(Object O) getCurrentManagedMemory() Object representing memory area Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 9/14

  17. Motivation Scoped Memory Usage Patterns Contribution Proposed Modifications to SCJ API Summary SCJ Memory API Brief description Immortal Memory MM Memory area objects represent allocation contexts Mission Memory PM1 PM2 Memory areas are entered with: PEH1 PEH2 enterPrivateMemory() executeInArea() Private Memory 1 Creation of objects in an allocation context other than the current is done NM with: Nested Memory newInstance() newArray() Private Memory 2 It is possible to get references to memory areas with: getMemoryArea(Object O) getCurrentManagedMemory() Object representing memory area Juan Rios, Kelvin Nilsen, Martin Schoeberl Patterns for Safety-Critical Java Memory Usage 9/14

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend