Memory management in vx works
-
Upload
dhan-v-sagar -
Category
Technology
-
view
869 -
download
3
Transcript of Memory management in vx works
![Page 1: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/1.jpg)
Memory Management in
VxWorksDhan V Sagar
CB.EN.P2CSE13007
![Page 2: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/2.jpg)
Overview
Hard Real Time System from Wind River Systems
Used in automobiles, consumer devices, network
switches
Based on a monolithic kernel
VxWorks5 Vs VxWorks6
![Page 3: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/3.jpg)
Address Translation
Real Addressing Mode
Using a Relocation Register
Full Virtual Memory Functionality
![Page 4: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/4.jpg)
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
![Page 5: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/5.jpg)
MMU
![Page 6: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/6.jpg)
MMU page table designs
![Page 7: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/7.jpg)
![Page 8: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/8.jpg)
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
![Page 9: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/9.jpg)
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
![Page 10: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/10.jpg)
Memory Allocation
Best Fit Allocation (VxWorks 6)
![Page 11: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/11.jpg)
Memory AllocationPerformance Comparison
![Page 12: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/12.jpg)
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
![Page 13: Memory management in vx works](https://reader035.fdocuments.in/reader035/viewer/2022062707/55814e34d8b42ab9548b4a5b/html5/thumbnails/13.jpg)
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