Lecture №5 Memory Management in Embedded os introduction


Download 56.56 Kb.
bet1/3
Sana11.05.2023
Hajmi56.56 Kb.
#1449879
  1   2   3
Bog'liq
Ma’ruza №5

Lecture №5 Memory Management in Embedded OS

Introduction

  • Embedded systems developers commonly implement custom memory-management facilities on top of what the underlying RTOS provides. Understanding memory management is therefore an important aspect of developing for embedded systems.
  • Many embedded devices (such as PDAs, cell phones, and digital cameras) have a limited number of applications (tasks) that can run in parallel at any given time, but these devices have small amounts of physical memory onboard. Larger embedded devices (such as network routers and web servers) have more physical memory installed, but these embedded systems also tend to operate in a more dynamic environment, therefore making more demands on memory.

Memory management

A kernel manages program code within an embedded

system via tasks. The kernel must also have some system o f loading and executing tasks within the system, since the CPU only executes task code that is in cache or RAM. With multiple tasks sharing the same memory space, an OS needs a security system mechanism to protect task code from other independent tasks. Also, since an OS must reside in the same memory space as the tasks it is managing, the protection mechanism needs to include

managing its own code in memory and protecting it from the task code it is managing.

It is these functions, and more, that are the responsibility of the memory management components of an OS. In general, a kernel’s memory management responsibilities include:

It is these functions, and more, that are the responsibility of the memory management components of an OS. In general, a kernel’s memory management responsibilities include:

  • Managing the mapping between logical (physical) memory and task memory references.
  • Determining which processes to load into the available memory space.
  • Allocating and deallocating of memory for processes that make up the system.
  • Supporting memory allocation and deallocation of code requests (within a process), such as the C language “alloc” and “dealloc” functions, or specific buffer allocation and deallocation routines.
  • Tracking the memory usage of system components.
  • Ensuring cache coherency (for systems with cache).
  • Ensuring process memory protection.

Download 56.56 Kb.

Do'stlaringiz bilan baham:
  1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling