Resources managed by the JanosVM on a per-team basis. Managed resources are:
  • Classpath - The parts of the global class path that a team is able to access.
  • Memory - The amount of memory available to the team and the policy for the GC.
  • Namespace - The namespace for the java code running in the team. This works similarly to a standard VM, class loaders have their own name spaces that are separate from each other and classes loaded into the team can't be seen by other teams. However, in order for teams to communicate they'll need to be able to share classes, so the name space resource allows teams to export groups of classes from their name space so that other teams can import these classes into their root name space.
  • Stdio - The source/sink for the System.in, System.out, and System.err I/O streams. When running the VM on unix these can just piggy back the stdio values for the VM, or they can be redirected to their own files.
  • For each resource a specification and a client object exist. The specification is the object that communicates what is required from the resource when creating a new team. For example, creating a team with the spec, new MemorySpec(8 * 1024 * 1024), would give the new team an eight megabyte memory limit. The client object is the object held by the team that gives it access to the resource. In the case of global resources like memory, the client object is manipulated through static methods in the corresponding resource class, for example, MemoryResource.