13
Memory Management in VxWorks Dhan V Sagar CB.EN.P2CSE13007

Memory management in vx works

Embed Size (px)

Citation preview

Page 1: Memory management in vx works

Memory Management in

VxWorksDhan V Sagar

CB.EN.P2CSE13007

Page 2: Memory management in vx works

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

Address Translation

Real Addressing Mode

Using a Relocation Register

Full Virtual Memory Functionality

Page 4: Memory management in vx works

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

MMU

Page 6: Memory management in vx works

MMU page table designs

Page 7: Memory management in vx works
Page 8: Memory management in vx works

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

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

Memory Allocation

Best Fit Allocation (VxWorks 6)

Page 11: Memory management in vx works

Memory AllocationPerformance Comparison

Page 12: Memory management in vx works

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

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