Skip to content

Memory budget ignores Memory_Size on system and virtual processors and related issues #2169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
philip-alldredge opened this issue Jan 15, 2020 · 6 comments · Fixed by #2281
Closed
Assignees
Labels
Milestone

Comments

@philip-alldredge
Copy link
Collaborator

Summary

I'm trying to perform memory budget analysis for a system. The system consists of a physical execution platform, a virtual machine, and an application. The application is bound to the virtual machine and the virtual machine is bound to physical processors. The AADL standard allows the Memory_Size property to be used on processors, virtual machines, and systems. I'd like to use it on a virtual processor representing the virtual machine to represent the total memory that is available for use by applications running on the VM. On the physical side, i'd like to bind to a system that represents that hardware and has Memory_Size set to the total memory provided.

Expected and Current Behavior

After creating such a model, I expect the memory budget analysis would produce results based on the specified property values.

However, the bound resource analysis plugin produces a message No Memory with Memory_Size or RAMCapacity or ROMCapacity. While that is somewhat clear it is expected that it would support Memory_Size for virtual processors and other cases as well. The unbound analysis does not include memory at all.

Lastly, I would expect to be allowed to specify a RAMBudget and ROMBudget for the virtual processor to express how much memory is is estimated to require. The amount of memory provided by a virtual processor may not be the same as the amount it provides to which it is bound.

Steps to Reproduce

Run bound and/or unbound resource budget analysis on the provided model.

package test_memory_budget
public
	with SEI;

	system system_to_analyze
	end system_to_analyze;
	
	system implementation system_to_analyze.impl
	subcomponents
		hw: system hardware.impl;
		sw: system software.impl;	
	properties
		Actual_Processor_Binding => (reference(hw.core1), reference(hw.core2)) applies to sw.vm;
		Actual_Memory_Binding => (reference(hw)) applies to sw.vm;		
	end system_to_analyze.impl;
	
	system hardware
	end hardware;

	system implementation hardware.impl
		subcomponents
			core1: processor;
			core2: processor;
		properties
			Memory_Size => 4 GByte;
	end hardware.impl;

	system software
	end software;

	system implementation software.impl
		subcomponents
			vm: virtual processor {Memory_Size => 1 GByte;};
			application: process {SEI::RAMBudget => 10.0 MByte; };
		properties
			Actual_Processor_Binding => (reference (vm)) applies to application;
			Actual_Memory_Binding => (reference (vm)) applies to application;
	end software.impl;
end test_memory_budget;

Environment

  • OSATE Version: 2.6.1
  • Operating System: Windows 10
@philip-alldredge
Copy link
Collaborator Author

Additionally, I would expect to be able to model a virtual machine as a system with potentially multiple virtual processor subcomponents. In that case Memory_Size would be specified on the system representing the virtual machine. My guess is that the analysis, unlike the standard property set, only supports memory being provided by memory subcomponents. I feel like this is a big limitation since AADL does not have the concept of a virtual memory subcomponent and such budget analysis are likely intended for early in the development before the details of the execution platform would be defined.

@lwrage lwrage added the analyses analyses from plugins label Jan 15, 2020
@lwrage
Copy link
Contributor

lwrage commented Jan 23, 2020

@reteprelief Could you have a look at the example, please, and check if this is a bug or not?

@reteprelief
Copy link
Contributor

The current bound memory budget analysis only considers things bound to memory components. Furthermore it only considers directly bound components. On the positive side for an application component that is bound the analysis considers memory requirements of application subcomponents.

Given the example it makes sense to support system components with memory size property as a component that other components can be bound to. Actually, the way the memory binding property is defined we need to consider abstract, virtual processor, processor as well.
This will take care of bindings of apps to virtual processors and virtual processors to processors/systems.

@reteprelief reteprelief removed their assignment Jan 28, 2020
@lwrage lwrage assigned lwrage and AaronGreenhouse and unassigned lwrage Mar 24, 2020
@lwrage lwrage added this to the 2.8.0 milestone Mar 24, 2020
@AaronGreenhouse
Copy link
Contributor

Trying to understand what exactly I need to do here. It looks like I need to do the following:

  • Allow system, processor, virtual processor, and abstract components that have Memory_Size property associations to be used in locations where memory components are currently expected.

@AaronGreenhouse
Copy link
Contributor

Updated BoundResourceAnalysis.checkMemoryLoads() to capture all the component instances that are valid according to Actual_Memory_Binding rather than just memory components.

Had to update checkMemoryLoad() to use a new getMemoryBinding() method instead of InstanceModelUtils.getBoundSWComponents() because InstanceModelUtils.getBoundSWComponents() is too general and doesn't handle processors and virtual processors in the way we need here.

Ran on the above example, and it seems to do something reasonable.

@AaronGreenhouse
Copy link
Contributor

Also had to update the SEI property set so that the RAMCapacity and ROMCapacity properties apply to (memory, system, processor, virtual processor, abstract).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants