> Since the Internet seems to be full of people with way too much time on their hands, I would just like to kindly shoo away any C/C++ pedants out there. Yes, I am sure there are a million different ways to achieve many of the same results. Yes, I am sure there are some fine points of language semantics that could be argued about. Yes, I am sure you have a more efficient way of writing some of the functions.
>Piccolo OS [...] is designed primarily as a teaching tool.
This means you must carefully balance teaching the right thing (a realistic system implemented skillfully) against teaching the right way (simplification for didactic purposes).
In short: it's a toy OS built primarily for teaching, and it's a cooperative multitasking OS, without process isolation. So it's more like Node.js (or win16, or macOS classic) than like what we usually call an OS.
That’s a weird comment. Node.js is a stack that works on top of an OS. If you could just plop it on a SD card and boot a computer with it, it would be a OS. Things like DOS or MacOS 9 were definitely operating systems. There is no reason to restrict the term to those with preemptive multitasking.
"OS" in this context means "scheduler", i.e the code that coordinates your application tasks.
That description can also apply to VMs such as JS, hence the comparison.
You could consider this type of library OS even more tightly bound to the application than your typical JS app as its actually linked to the user code.
"Operating Systems" for microcontrollers such as this are frequently just schedulers as the Application typically contains drivers and hits the hardware itself. e.g. FreeRTOS.
And the scheduler decides which thread gets to run next. On a cooperative multitasking system, guess what the OS code you jump to when you yield from a thread does, and what it's called?
> Since the Internet seems to be full of people with way too much time on their hands, I would just like to kindly shoo away any C/C++ pedants out there. Yes, I am sure there are a million different ways to achieve many of the same results. Yes, I am sure there are some fine points of language semantics that could be argued about. Yes, I am sure you have a more efficient way of writing some of the functions.
> To be honest, I am not interested.
I respect this so much.
>Piccolo OS [...] is designed primarily as a teaching tool.
This means you must carefully balance teaching the right thing (a realistic system implemented skillfully) against teaching the right way (simplification for didactic purposes).
TIL and looked it up, typedef is indeed just a specifier like any other in a declaration.
for a less toy example, it seems like FreeRTOS can be used also on the Rpi pico: https://freertos.org/Documentation/02-Kernel/03-Supported-de...
This is cool! works well as a way of understanding how to get an OS going on Pico
In short: it's a toy OS built primarily for teaching, and it's a cooperative multitasking OS, without process isolation. So it's more like Node.js (or win16, or macOS classic) than like what we usually call an OS.
That’s a weird comment. Node.js is a stack that works on top of an OS. If you could just plop it on a SD card and boot a computer with it, it would be a OS. Things like DOS or MacOS 9 were definitely operating systems. There is no reason to restrict the term to those with preemptive multitasking.
"OS" in this context means "scheduler", i.e the code that coordinates your application tasks. That description can also apply to VMs such as JS, hence the comparison.
You could consider this type of library OS even more tightly bound to the application than your typical JS app as its actually linked to the user code.
A scheduler is part of a OS, but a scheduler alone does not make a OS.
"Operating Systems" for microcontrollers such as this are frequently just schedulers as the Application typically contains drivers and hits the hardware itself. e.g. FreeRTOS.
And the scheduler decides which thread gets to run next. On a cooperative multitasking system, guess what the OS code you jump to when you yield from a thread does, and what it's called?
That was my point.
replied to the wrong coment, sorry
By your definition, CP/M and DOS are not operating systems either
It’s also running on a microcontroller with a few hundred kb of memory so even win16 or macOS classic would be a bit heavy.
> so even win16 or macOS classic would be a bit heavy.
Speed-wise, both would run exceptionally well on that hardware.
The first Mac had 128kB memory, about 32 of which were taken by its video and audio buffers. It ran at about 8MHz.
The first version of Windows ran on similar hardware, requiring a 8088 and 256kB of memory.
The pico has at least that amount of memory, at top speed 16 times the clock frequency, and two cores.
The Pico doesn't have an external memory bus, but something like MacOS Classic for an STM32 with a chunk of SDRAM and VGAish video would be fun.
> The Pico doesn't have an external memory bus
I may be misunderstanding what you are saying here but if I read this correctly, you are wrong.
The project to run Transputer code on the Pi Pico uses a memory expansion for the original Pi Pico. I described it here:
https://www.theregister.com/2022/05/06/pi_pico_transputer_co...
The Pico 1 (i.e. the RP2040) doesn't. The Pico 2 (RP2350) does, albeit a fair bit slower (since it's QSPI PSRAM) than the internal SRAM.
Not everything needs to run directly from RAM.