Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
wiki1115: Memory_Partitioning_Technology (Version 2)

What is it? #

Memory Partitioning is part of an overall resource partitioning strategy. See Adaptive Partitioning.

Memory partitioning is kernel enforced memory quota for groups of processes known as "partitions". The kernel will make sure each memory partition (group of processes) will not use more memory than its memory quota.

It guarantees an amount of memory for a partition.

High Level Requirements #

User senarios#

1. To make sure untrusted programs will not use up all the system memory accidantally or maliciously.

Examples:

Internet downloaded Java applets running in a car entertainment system.

BSD Jail and Solaris Zones.

2. To guarantee certain amount of memory for processes.

Examples are:

Netcom customer wants to 'rent' out the network device by guaranteeing quota in CPU time and memory usage.

Customer wants to guarantee certain amount memory for its drivers and other important applications so that those program can not fail because of running out of memory.

System considerations#

  • The implementation is optional and has minimal cpu and memory costs when not installed.
  • The overhead may not reduce the throughput of the sytem as load increases. That means the overhead may not increase with the number of processes. But it may increase with the number of partitions.

The user's interface #

  • The user may specify the memory quatos, and all other properties, of a set of memory partitions at boot time. The user may not add memory partions or change quatos at run time.
  • need an API to move the shared objects among partitions?

Operating principles #

  • The quota is for sysram

Limitations, Design considerations and Questions = #

Membership and inheritance #

  • There may be up to 16 memory partitions. One must be the system partition, where at least the procnto lives. The sum of the memory quotas of all adaptive partitions must always be 100%?

  • Spawned and forked children appear in the memory partition of their parents. However, an api will be provided that will allow spawning processes into other memory partitions. This api will be avalable only to the system (root) and is intended to be used to implment a application launcher that launches processes at startup into their respective memory partitions.

Acounting#

  • Granularity is the smallest memory page size in the system.

Security and Logging #

  • Proper instrumentation events
  • Need to make sure the permission is fully enforced.
  • q:tools for reporting memory usage
  • q:alarms or notification when limits are close to being exceeded

Billing algorithms #

  • where to bill for shared memory

Bill the size change to the partition whose process changes the size of the shared memory object

  • where to bill for shared code (in shared library)

Bill to the partition whose process loads this code first