<< 点击显示目录 >> 主页 exOS使用助手 > exOS Automation Help > General information > Limitations and memory usage |
exOS 数据通信机制使用共享内存和系统间事件在 AR 和 Linux 之间提供进程间通信,从而实现高带宽的快速数据连接。
有以下限制:
•AR <= 4.x:
由于系统默认设置为 Hypervisor 配置中的 32 个系统间事件,进程间共享内存区域(在 exostarget 配置中声明为数据模型实例名称 )的数量 限制为 8 个。
•exOS <= V2.1.0:
exOS 中的数据通信在通信 结构 和 用于数据交换的缓冲区方面有限制 。 详细信息请参阅相应章节:
exOS 的内存使用量在很大程度上取决于 AR 和 Linux 之间通信结构的大小。
•启用数据通信的独立 exOS 配置(无用户特定组件)需要 7.63MB DRAM
•使用默认 200kB 共享内存区域的 exOS 组件需要 1.71MB DRAM
•DRAM 使用量的计算大约是
Mem[MB] ~= 2.11*ShmSize[MB] + 1.27[MB]
• 如果应用程序需要或希望共享内存 的 大小小于 200kB,可以在 exospkg中预先配置 。 确定特定应用程序所需内存大小的最简单方法是减少管理程序配置中的共享内存大小,并检查启动时显示所需内存大小的错误信息。否则,共享内存的计算方法大约是
ShmSize[Bytes] ~= SUM((2 * 12) * (28 + 12 + 4 + sizeof(UniqueDataType)))
而 UniqueDataType 的列表是在 生成的数据模型源文件(如 exos_types.c) 中 可见的 EXOS_DATASET_BROWSE_NAME 宏中 声明 的。在下面的 示例中,共享内存大小为
(24 * (44 + 1)) + (24 * (44 + 4))+ (24 * (44 + 1)) = 3.3kB
这将导致 1.27MB DRAM
The exOS data communication mechanism provides inter-process communication between Automation Runtime and Linux using shared-memory and inter-system-events, which enables a fast data-connection with high bandwidth.
Following limitations apply:
•AR <= 4.x:
The number of inter-process shared memory areas (declared as datamodel instance names in the exostarget configuration) is limited to 8 due to the default system setting of 32 inter-system-events in the Hypervisor configuration.
•exOS <= V2.1.0:
The data communication within exOS has limits in terms of the communicated structures and the buffers used for the data exchange. Please see the corresponding chapters for more detailed information:
The memory usage of exOS is to a large extent dependent on the size of the communicated structures between AR and Linux.
•A standalone exOS configuration with data communication enabled (without user-specific components) requires 7.63MB DRAM
•An exOS component using the default 200kB shared memory area requires 1.71MB DRAM
•The calculation for DRAM usage is approximately
Mem[MB] ~= 2.11*ShmSize[MB] + 1.27[MB]
•The shared memory can be preconfigured in the exospkg if another size than 200kB is needed or desired for the application. The simplest way to determine the size needed for a certain application is to decrease the shared memory size in the Hypervisor configuration, and check the error message at startup which indicates the needed size. Otherwise, the shared memory calculation is approximately
ShmSize[Bytes] ~= SUM((2 * 12) * (28 + 12 + 4 + sizeof(UniqueDataType)))
Whereas the list of UniqueDataType is declared within the EXOS_DATASET_BROWSE_NAME macro visible in the generated datamodel source file (eg. exos_types.c). In the following example, the shared memory size would amount to
(24 * (44 + 1)) + (24 * (44 + 4)) + (24 * (44 + 1)) = 3.3kB
Which in turn would result in 1.27MB DRAM