![]() a single-core processor which accesses the RAM in a way that can be modeled by sequential consistency.some nominal amount of RAM (say, 4096 bytes). ![]() Let’s say we’re using a microcontroller with these features: So let’s set the stage for one alternative, a bare-metal system that has two processes that need to communicate. The typical 8- or 16-bit system running bare-metal and with kilobytes (or less!) of RAM rather than megabytes or gigabytes doesn’t have the luxury of using queues everywhere - at least not without careful design. This approach works better on a high-end embedded system or a general-purpose PC, where you can make use of the message-passing features of operating systems, and the required overhead is small. You’ll need some kind of a hardware or software queue with enough room to handle pending messages. Run the concept of message-passing by anyone working on a resource-constrained embedded system, and they will probably look at you as though you have two heads. Using message-passing between isolated processes (exemplified by languages such as Go and Erlang) is one way to deal with concurrency… but then you need a system that supports message-passing as a primitive operation, along with the resources to support it. ![]() There are many reasons why concurrency is hard to manage - at least if you’re using an imperative programming language with shared mutable state. This article is available in PDF format for easy printing
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |