Zephyr Project Requirements
Virtual Memory

1. Virtual Memory Mapping

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-17
1.1. Enforcing mapping access permissions ZEP-SRS-36-17

When an access that is not permitted for a virtual memory mapping is attempted, the Zephyr RTOS shall raise a fatal error.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-3
1.2. Reclaiming the virtual address region on unmap ZEP-SRS-36-3

When a virtual memory region is unmapped, the Zephyr RTOS shall reclaim its virtual address range so that it can be reused by subsequent mappings.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-4
1.3. Anonymous memory mapping ZEP-SRS-36-4

Where virtual memory is enabled, the Zephyr RTOS shall provide a mechanism to allocate and map an anonymous region of memory with caller-specified access permissions.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-16
1.4. Releasing an anonymous memory mapping ZEP-SRS-36-16

Where virtual memory is enabled, the Zephyr RTOS shall provide a mechanism to release an anonymous memory region back to the system.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-5
1.5. Guard pages for anonymous memory mappings ZEP-SRS-36-5

When an anonymous memory region is mapped, the Zephyr RTOS shall place an inaccessible guard page immediately before and immediately after the region so that accesses beyond its bounds are detected.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-6
1.6. User-mode-accessible memory mappings ZEP-SRS-36-6

Where user mode is enabled, the Zephyr RTOS shall control, for each memory mapping, whether user mode threads are permitted to access the mapping.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-7
1.7. Reporting failure when mappable memory is exhausted ZEP-SRS-36-7

If a memory mapping request cannot be satisfied because available memory is exhausted, then the Zephyr RTOS shall report that the mapping failed.

2. Demand Paging

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-8
2.1. Servicing page faults through demand paging ZEP-SRS-36-8

Where demand paging is enabled, the Zephyr RTOS shall service a page fault on a demand-paged region by bringing the required page into physical memory and resuming execution.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-9
2.2. Paging out a memory region ZEP-SRS-36-9

Where demand paging is enabled, the Zephyr RTOS shall provide a mechanism to evict a memory region from physical memory to the backing store.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-10
2.3. Paging in a memory region ZEP-SRS-36-10

Where demand paging is enabled, the Zephyr RTOS shall provide a mechanism to bring a memory region into physical memory ahead of access.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-11
2.4. Pinning a memory region in physical memory ZEP-SRS-36-11

Where demand paging is enabled, the Zephyr RTOS shall provide a mechanism to pin a memory region in physical memory so that it is never evicted to the backing store.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-12
2.5. Unpinning a memory region ZEP-SRS-36-12

Where demand paging is enabled, the Zephyr RTOS shall provide a mechanism to unpin a previously pinned memory region so that it becomes eligible for eviction again.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-13
2.6. Collecting demand paging statistics ZEP-SRS-36-13

Where demand paging statistics are enabled, the Zephyr RTOS shall provide a mechanism to query system-wide demand paging statistics.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-18
2.7. Collecting per-thread demand paging statistics ZEP-SRS-36-18

Where demand paging statistics are enabled, the Zephyr RTOS shall provide a mechanism to query the demand paging statistics of a specific thread.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-14
2.8. Collecting demand paging timing histograms ZEP-SRS-36-14

Where demand paging timing histograms are enabled, the Zephyr RTOS shall provide a mechanism to query histograms of page eviction times.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-19
2.9. Collecting backing store timing histograms ZEP-SRS-36-19

Where demand paging timing histograms are enabled, the Zephyr RTOS shall provide a mechanism to query histograms of backing store access times.

  • ZEP-SYRS-9
    20. Memory Management framework ZEP-SYRS-9

    The Zephyr RTOS shall support a memory management framework.

ZEP-SRS-36-15
2.10. On-demand evictable code and data sections ZEP-SRS-36-15

Where demand paging is enabled, the Zephyr RTOS shall support designating code and data that are loaded into physical memory on demand and may be evicted when not in use.