Analysis of the characteristics of mbed OS

 

MbedOS is a new OS concept, I think it has two representative features:

 

1. Stack sharing.

2. Event-driven.

 

Let's analyze it in detail:

 

Other OSs usually give the system two, one for the kernel and one for the user. Or one for the system and one for the task (RTOS). This brings a requirement of how to allocate memory to these two stacks reasonably. Non-real-time systems are usually dynamically allocated. For example, Linux first allocates all memory to the kernel, and then Allocate space in the kernel's heap for user processes (allocate on write). Refer the following link

http://www.cnblogs.com/clover-toeic/p/3754433.html

http://www.programgo.com/article/13101300282/;jsessionid=D3BCEDA52387EB440D104828DB1ED032

Or the stack size of each task is statically given, and the system stack is given at compile time. This is the practice of most RTOS. The slight difference is that some RTOS teams can be dynamically allocated, while some are Specified when the task is created.

Dynamic allocation will encounter the problem of real-time response, and static allocation will have the problem of wasting size. mbedos uses the same stack directly to solve this problem, please refer to

https://developer.mbed.org/cookbook/Event-Driven-framework 

/media/uploads/raulMrello/rtos_vs_rtc_kernel.png

 

The advantage of this is that the speed and utilization have been improved, but the problem is that it is easy to make mistakes, and it is not easy to correct errors.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326389927&siteId=291194637