{"id":5031,"date":"2013-07-01T12:00:26","date_gmt":"2013-07-01T11:00:26","guid":{"rendered":"https:\/\/blogs.mentor.com\/colinwalls\/?p=5031"},"modified":"2026-03-26T16:40:59","modified_gmt":"2026-03-26T20:40:59","slug":"how-long-is-a-piece-of-string","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/embedded-software\/2013\/07\/01\/how-long-is-a-piece-of-string\/","title":{"rendered":"How long is a piece of string?"},"content":{"rendered":"<p>Answering questions is something that I am often expected to do. Maybe I am presenting at a conference, doing an online seminar, hanging out on a trade show booth, writing blogs or articles &#8211; these all elicit questions. Sometimes I am asked by a salesperson to respond to a customer&#8217;s question.<\/p>\n<p>I would always do my best to give a complete and accurate answer and certainly aim to be truthful. I was recently posed some questions about <a href=\"http:\/\/www.mentor.com\/embedded-software\/nucleus\/\" target=\"_blank\" rel=\"noopener noreferrer\">Nucleus<\/a>, which made me think &#8230;<!--more--><\/p>\n<p>A customer was considering the deployment of Nucleus RTOS in a new project. I had no background information, but they asked three questions. Here they are, along with my answers and rationale:<\/p>\n<p>Q &#8211; Is the presence of an MMU (Memory Management Unit) a mandatory requirement of the OS?<\/p>\n<p>A &#8211; Nucleus implements a multi-threading environment with a flat memory space, like most classic real time operating systems. It does not carry the overhead of implementing process model. However, depending on the choice of CPU, if an MMU is available, there is the option to deploy it to implement &#8220;thread protected mode&#8221;, where each task\u2019s memory, along with that of the OS, is protected from the other tasks. This is a very lightweight use of the MMU.<\/p>\n<p>[In this case, I did not know whether they were expecting to have an MMU or not. If they knew that there would not be one, they would be pleased to hear that Nucleus did not demand an MMU. On the other hand, if they were going to have an MMU, they might be pleased to hear that it could be utilized.]<\/p>\n<p>Q &#8211; In how much space can we derive the basic functionality of the OS?<\/p>\n<p>A &#8211; This depends on the target CPU and the amount of functionality required. All the functionality outside of the kernel [file system, networking etc.] is optional and is only included if explicitly required by the application. The Nucleus kernel and all the additional components are highly scalable, so only the required functionality is included in the target memory footprint. Here is an example:<\/p>\n<ul>\n<li>ARM Cortex A8 in ARM mode<\/li>\n<li>Built with Mentor Sourcery CodeBench toolchain<\/li>\n<li>Full optimization for size<\/li>\n<\/ul>\n<p>ROM = 12-30 Kbytes<\/p>\n<p>RAM = 500 bytes<\/p>\n<p>Min has essential kernel services [dynamic memory, threads, semaphores, events, queues] \u2013 Runtime library excluded.<\/p>\n<p>Max includes all kernel services.<\/p>\n<p>Compiling for Thumb-2 mode reduces ROM by 35% \u2013 So Nucleus kernel can use 7.8 Kbytes on a Cortex-M based controller<\/p>\n<p>[Again, I had no background on their memory size plans. So, I used the opportunity to emphasize the flexibility of Nucleus configuration options and gave a real example to maintain credibility.]<\/p>\n<p>Q &#8211; How much of the processor&#8217;s computational bandwidth shall be used by the OS?<\/p>\n<p>A &#8211; This question is virtually impossible to answer accurately for any OS. Apart from the choice of CPU and its configuration, the architecture of the application and the way that it uses the OS is critical. Nucleus is designed and very widely used to efficiently utilize the CPU for hard real time applications; OS overhead is not raised as an issue. Measurement of this overhead is quite straightforward using a tool like Sourcery Analyzer, but that can only be done on a complete [albeit maybe prototype] system.<\/p>\n<p>[This really is an almost impossible question to answer usefully, but I saw it as an ideal opportunity to talk about <a href=\"http:\/\/www.mentor.com\/embedded-software\/sourcery-tools\/sourcery-analyzer\/\" target=\"_blank\" rel=\"noopener noreferrer\">System Analyzer<\/a>, which really is an excellent tool for this kind of application.]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Answering questions is something that I am often expected to do. Maybe I am presenting at a conference, doing an&#8230;<\/p>\n","protected":false},"author":71677,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spanish_translation":"","french_translation":"","german_translation":"","italian_translation":"","polish_translation":"","japanese_translation":"","chinese_translation":"","footnotes":""},"categories":[1],"tags":[300,304,374,502],"industry":[],"product":[],"coauthors":[],"class_list":["post-5031","post","type-post","status-publish","format-standard","hentry","category-news","tag-embedded-software","tag-nucleus","tag-nucleus-os","tag-sourcery-analyzer"],"_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/posts\/5031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/users\/71677"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/comments?post=5031"}],"version-history":[{"count":1,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/posts\/5031\/revisions"}],"predecessor-version":[{"id":10184,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/posts\/5031\/revisions\/10184"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/media?parent=5031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/categories?post=5031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/tags?post=5031"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/industry?post=5031"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/product?post=5031"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/coauthors?post=5031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}