CompuLab SBC-X270 Manual de usuario Pagina 70

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 226
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 69
SCIOPTA - Real-Time Kernel
7-2 Manual Version 4.1 User’s Manual
SCIOPTA - Real-Time Kernel
7 Pools
7.3 Pool Message Buffer Memory Manager
If a process allocates a message there is also the size to be given. The user just gives the number of bytes needed.
SCIOPTA is not returning the exact amount of bytes requested but will select one of a list of buffer sizes which is
large enough to contain the requested number. This list can contain 4, 8 or 16 sizes which will be defined when a
message pool is created.
The difference of requested bytes and returned bytes can not be accessed by the user and will be unused. It is there-
fore very important to select the buffer sizes to match as close as possible those needed by your application to waste
as little memory as possible.
The pool buffer manager used by SCIOPTA is a very well known technique in message based systems. The SCI-
OPTA memory manager is very fast and deterministic. Memory fragmentation is completely avoided. But the user
has to select the buffer sizes very carefully otherwise there can be unused memory in the system.
As you can have more than one message pool in a SCIOPTA system and you can create and kill pools at every
moment the user can adapt message sizes very well to system requirements at different system states because each
pool can have a different set of buffer sizes.
By analysing a pool after a system run you can find out unused memory and optimise the buffer sizes.
7.3.1 Example
A message pool is created with 8 buffer sizes with the following sizes: 4, 10, 20, 80, 200, 1000, 4048, 16000.
If a message is allocated from that pool which requests 300 bytes, the system will return a buffer with 1000 bytes.
The difference of 700 bytes is not accessible by the user and is wasted memory.
If 300 bytes buffer are used more often, it would be good design to modify the buffer sizes for this pool by changing
the size 200 to 300.
7.3.2 Message Administration Block
Each SCIOPTA message contains a hidden data structure which will be used by the kernel. The user can access
these message information only by specific SCIOPTA system calls. Information such as the process ID of the mes
-
sage owner, the message size, the process ID of the transmitting process and the process ID of the addressed proc-
ess are included in the message header administration block. Please consult chapter 5.3 “Messages” on page 5-7
for more information about SCIOPTA messages. The size of the message header is 32 bytes.
Each SCIOPTA message can contain an end-mark. This end-mark is used for the kernel message check if the mes-
sage check option is enabled at kernel configuration. Please consult the configuration chapter of the SCIOPTA tar-
get manual for more information about message check. The size of the end-mark is 4 bytes.
Please consult chapter 6 “Messages” on page 6-1 for more information about message sizes and message memory
management.
Vista de pagina 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 225 226

Comentarios a estos manuales

Sin comentarios