Requirements of a RTOS

Go To Last Post
21 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can I ask guys, I designed a RTOS recently and it never disables interrupts or exceptions, they always answered straight away.  However, RTOS api calls may be deferred.  Does that still meet the requirements as a RTOS?????

Last Edited: Mon. Jul 30, 2018 - 09:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You designed a RTOS without knowing what the requirements of a RTOS were??  The concept of 'real time' is rather fluid in terms of actual time, but it is meant to represent that the code will respond in a bounded time frame. This contrasts with non real time OS's like Linux and Windows that may decide to do something else rather than respond to your request for an unknown amount of time. The scheduler determines if the system is 'real time' or not. API calls are 'pulling the levers' - therefore can be pre-empted by the scheduler.

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

RTOSes don't have "requirements"; applications have requirements OF an RTOS.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Frameworks have requirements; frameworks have requirements of applications.

wink

Embedded Gurus

State Space

Modern Embedded Programming: Beyond the RTOS

by Miro Samek

April 27th, 2016

https://embeddedgurus.com/state-space/2016/04/beyond-the-rtos-a-better-way-to-design-real-time-embedded-software/

(immediately after 2nd picture)

This also illustrates the most important characteristics of a framework called inversion of control.

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The designer of an RTOS can certainly place "requirements" on the RTOS. But there are no inherent requirements, that I know about. Other than maybe "behave in a real-time manner". Often, this is taken to mean deterministic. But, what often happens is that there is a deterministic upper bound to the response time.

 

It is up to the potential user to determine whether or not that response time is fast enough. THAT will depend on the application. A computer in an engine control unit will have a very different speed requirement compared to, lets say, a storm water level gauge. 

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wikipedia wrote:
A key characteristic of an RTOS is the level of its consistency concerning the amount of time it takes to accept and complete an application's task; the variability is jitter.[1] A hard real-time operating system has less jitter than a soft real-time operating system. The chief design goal is not high throughput, but rather a guarantee of a soft or hard performance category. An RTOS that can usually or generally meet a deadline is a soft real-time OS, but if it can meet a deadline deterministically it is a hard real-time OS.[2]

https://en.wikipedia.org/wiki/Real-time_operating_system

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Jul 31, 2018 - 07:32 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 3

I loathe the term RTOS on two counts...

 

1) Very very few of them are RT...ie Real Time

2) Very very few of them are OS...ie Operating Systems. At best most of them are nothing more than task schedulers.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Brian Fairchild wrote:
2) Very very few of them are OS...ie Operating Systems. At best most of them are nothing more than task schedulers.
Where do you draw the line on that? When does a task scheduler become more than that and a full blown OS? Is it as a result of things like adding Mutex, Sem4, Q's etc? Or something else? Disk services? Networking?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

Brian Fairchild wrote:
2) Very very few of them are OS...ie Operating Systems. At best most of them are nothing more than task schedulers.
Where do you draw the line on that? When does a task scheduler become more than that and a full blown OS? Is it as a result of things like adding Mutex, Sem4, Q's etc? Or something else? Disk services? Networking?

 

For me, an OS has, at the very least, all the features of CP/M (yes, even v1.4).

 

Curious about what Wikipedia said about CP/M I see the following...

 

Quote:

In the 8-bit versions, while running, the CP/M operating system loaded into memory had three components:

  • Basic Input/Output System or BIOS,
  • Basic Disk Operating System or BDOS,
  • Console Command Processor or CCP.

 

...which for me sums up the minimum requirements of an Operating System.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But you can use an OS in devices that do not have a disk ?!? So how could a disk operating system be a requirement?

 

(when I worked at Sky we made 10million+ Sky decoders running the Nucleus Plus operating system and there wasn't a hint of a disk in sight - only later Sky+ boxes had disks)

 

Also what use are "console commands" in a missile guidance system or an Airbus A380 - both of which are undoubtedly running (many) operating systems?

 

BTW CP/M did not have any kind of tasking/threading and hence no need for mutex, sem4, Q, pipes, etc etc. (all of which I would consider "bread and butter" in an OS these days).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

IMO a OS must at least provide some kind of standardized function calls to abstract the hardware from the applications that are running on it, and must be able to load and execute at least one application. So for example, is the BIOS on a PC an operating system? I say maybe...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:
and must be able to load and execute at least one application.
Again you are thinking too much in terms of desktops. When you deploy Nucleus Plus or VxWorks or QNX or some other "professional" OS it's not like your Smartphone launching apps. It's an embedded solution. It doesn't "load" anything. Usually the OS is part of the code that runs from power on. At an early step that app makes some call to StartOS() or similar (perhaps some createTasks() first?) but there isn't the concept of "loading" in the same way that Linux has ELF/.so loading or Windows has EXE(COFF)/DLL loading.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:
IMO a OS must at least provide some kind of standardized function calls to abstract the hardware

clawson wrote:
Again you are thinking too much in terms of desktops. 

Indeed.

 

Often (usually?) it will be custom hardware - so how can that be provided as part of the OS?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

NuttX is an RTOS with a binary loader.

NuttX Real-Time Operating System

http://nuttx.org/

...

 

http://nuttx.org/#key_features

...

  • Loadable kernel modules; lightweight, embedded shared libraries.

...

 

http://nuttx.org/#file_system

...

Binary Loader with support for the following formats:

  • Separately linked ELF modules.

  • Separately linked NXFLAT modules. NXFLAT is a binary format that can be XIP from a file system.

...

 

edit :

Contiki :

https://github.com/contiki-os/contiki/wiki/The-dynamic-loader

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Wed. Aug 1, 2018 - 05:24 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:

IMO a OS must at least provide some kind of standardized function calls to abstract the hardware from the applications that are running on it, and must be able to load and execute at least one application.

 

Nice definition and one I'd agree with.

 

 

I know we're going to start splitting hairs here, but while I wait for the kettle to boil...

 

 

clawson wrote:

When you deploy Nucleus Plus or VxWorks or QNX or some other "professional" OS it's not like your Smartphone launching apps. It's an embedded solution. It doesn't "load" anything. Usually the OS is part of the code that runs from power on. 

 

Except QNX does have a built-in filesystem which means it *could* load something. (see image above)

 

awneil wrote:

Often (usually?) it will be custom hardware - so how can that be provided as part of the OS?

 

Via the board support package. (see image above)

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:
Via the board support package. (see image above)

Which is all very well if you're using a "standard" board that the "OS" already knows about...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:
Except QNX does have a built-in filesystem which means it *could* load something. (see image above)

QNX® Software Development Platform 6.5.0 SP1 <br/> QNX® Platform for ADAS 1.0 - Dynamic Linking

http://www.qnx.com/developers/docs/6.5.0SP1.update/index.html#./com.qnx.doc.neutrino_sys_arch/dll.html

wasn't aware that QNX is a part of BlackBerry (glad BlackBerry is still alive)

QNX Operating Systems

http://blackberry.qnx.com/en/products/neutrino-rtos/index

 


due to

https://www.adacore.com/press/gnat-pro-ada-toolchain-for-blackberry-qnx

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
... VxWorks ...
by Wind River Systems.

The ones at Wind River, in Intel, created a lighter RTOS than VxWorks then gave it to the Linux Foundation where it's now FOSS and named the ZephyrTM Project.

Couldn't find a linking loader in ZephyrTM; there's an I/O API that might be something like a HAL.

ZephyrTM can run on a SAM D20 and BBC micro:bit.

 

https://www.zephyrproject.org/

https://www.zephyrproject.org/what-is-zephyr/

...

(4th paragraph)

The Zephyr kernel is derived from Wind River’s commercial VxWorks Microkernel Profile for VxWorks.

...

http://docs.zephyrproject.org/api/io_interfaces.html

http://docs.zephyrproject.org/boards/boards.html

 


https://www.windriver.com/products/vxworks/

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:
So for example, is the BIOS on a PC an operating system? I say maybe...

The 30-year-long Reign of BIOS is Over: Why UEFI Will Rock Your IT

by Administrator SandroVillinger ‎19-07-2011 07:36 AM - edited ‎22-08-2011 05:09 AM

https://web.archive.org/web/20130626000135/http://h30565.www3.hp.com/t5/Feature-Articles/The-30-year-long-Reign-of-BIOS-is-Over-Why-UEFI-Will-Rock-Your/ba-p/198

...

UEFI is “OS-like:” By default, you have full access to the entire hardware of your computer – Ethernet adapter, Wi-Fi, Bluetooth, graphics card, USB, even the audio chip, as well as full blown x86 and x64 support. This enables not only high-resolution UIs, but highly functional pre-boot environments. [OEM diagnostics, OEM maintenance, OEM instant boot an application, etc]

...

An alternative to UEFI is coreboot which is on some notebook PC.

https://www.coreboot.org/

https://puri.sm/coreboot/

https://github.com/osresearch/heads

 

Edit:

TianoCore is a FOSS UEFI that has ports to several Intel CPU architectures and one Texas Instruments arm Cortex-A architecture.

https://www.tianocore.org/

https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Platforms

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Fri. Aug 3, 2018 - 01:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The original intent of the thread seems to have 'wandered'.  The OP has moved on and created a new thread as this one seems to have turned into something different

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tock OS has a HAL and applications that are on the MCU's flash with a loader and bootloader; Tock applications are stored on a PC or Mac and sent via a Python loader.

Tock is on SAM4L with a few more arm Cortex-M MCU from Nordic Semiconductor and Texas Instruments.

Tock is implemented in Rust with applications in any computer language that targets the board's MCU (arm Cortex-M0, M3, M4)

Tock's debugger is via Microsoft Visual Studio Code extensions.

 

https://www.tockos.org/documentation/design (search for HAL)

https://github.com/tock/tockloader

https://github.com/tock/tock-bootloader

https://github.com/tock/tock/tree/master/boards

https://www.avrfreaks.net/forum/memory-safe-computer-languages

https://github.com/tock/tock/blob/master/doc/debugging/VSCode_Debugging.md

 

"Dare to be naïve." - Buckminster Fuller