View
872
Download
3
Category
Tags:
Preview:
Citation preview
Memory Management in
VxWorksDhan V Sagar
CB.EN.P2CSE13007
Overview
Hard Real Time System from Wind River Systems
Used in automobiles, consumer devices, network
switches
Based on a monolithic kernel
VxWorks5 Vs VxWorks6
Address Translation
Real Addressing Mode
Using a Relocation Register
Full Virtual Memory Functionality
Memory Management (VxW 5)
• No Swapping or Paging
• Assumes that there is enough physical memory available
• Does not have a directly supported virtual memory system
• Virtual memory support separately as add-on
• Kernel is loaded into the bottom part of the memory
• System Memory Pool
• Dynamic memory routines for manipulating the heap
• malloc(), free() are used
MMU
MMU page table designs
Memory Allocation
First Fit Allocation (VxWorks 5)
• Allocates the first available space
• Free blocks can be stored in a simple linked list
• Leads to fragmentation
• Dynamic partition sizes are allocated on system initialisation
• Partition the memory into two or more sections
Memory Allocation
Best Fit Allocation (VxWorks 6)
Smallest-sized block that is big enough to satisfy the request
More complex data structure to store the free blocks
Whenever a new size is created, a new node is inserted in the tree
Probability of a larger block having to be split is smaller
Free blocks of the same size can be grouped together
Memory Allocation
Best Fit Allocation (VxWorks 6)
Memory AllocationPerformance Comparison
Memory Management Enhancements (VxWorks 6)
Automatic resource reclamation
Improved memory allocation using a “best-fit” algorithm
User-mode heap and memory partition support
Developer-replaceable user-mode heap allocator
Heap instrumentation for heaps and memory partitions in both the kernel and RTPs
Tight integration with error management
Memory Protection
o MMU-based memory protection provides isolation of the kernel from user-mode applications and of applications from each other, increasing device reliability.
o VxWorks’ preemptive, priority-based global task scheduler
ensures real-time deterministic behavior.
o The ability to create private or public objects in the kernel and in RTPs offers
flexibility to use objects
o The extensible system call interface enables application developers to employ custom-developed kernel services from user-mode execution.
o Support for shared libraries among RTPs improves code efficiency and reusability
Recommended