How do I create my own RTOS?

Thread Starter

Yash2019

Joined Jan 5, 2022
7
It will be portable so I don't want to design for a specific project.

FreeRTOS use two types of scheduling algorithms:
1) round-robin algorithm.
2) Fixed Priority Preemptive Scheduling

Salvo or TinyOS use Cooperative scheduling algorithm.

We have three algorithms for RTOS Which one should I select for start
 

ApacheKid

Joined Jan 12, 2015
1,617
It will be portable so I don't want to design for a specific project.

FreeRTOS use two types of scheduling algorithms:
1) round-robin algorithm.
2) Fixed Priority Preemptive Scheduling

Salvo or TinyOS use Cooperative scheduling algorithm.

We have three algorithms for RTOS Which one should I select for start
how will you be unit testing your code?
 

Thread Starter

Yash2019

Joined Jan 5, 2022
7
Let's start with round Robin scheduling. There are many way to built RTOS. Its common to use queue, list in rtos coding.

What will be use of queue and list in rtos?
 

DickCappels

Joined Aug 21, 2008
10,187
That's for you to decide. If you want to crowdsource the architecture for your RTOS it might work out better to start a fresh thread on that topic.
 

DickCappels

Joined Aug 21, 2008
10,187
The list (I think this is also the Que) is a list of tasks. It is basically a table to addresses to which the processor can jump otherwise be directed.
 

djsfantasi

Joined Apr 11, 2010
9,163
  1. You need to pass through the list
  2. …Identify which tasks to execute
  3. …Add to the list
  4. …Check if the list task is ready
  5. …Delete from the list
  6. Process interrupts.
But this assumes that you have chosen an internal representation for the list. Is it an array? A linked list? Which type of linked list?

And decide what a list record consists of. The address of the next statement is (or should be) obvious. I added an element that contained the time in μs when the task should next be allowed to execute. It was a specific requirement that I had, but your application might include something else. Interrupt number. Priority. These are dependent on what you decide a list record should contain.

I hope you find this basic description useful.
 

MrChips

Joined Oct 2, 2009
30,822
Rather than trying to build an RTOS I would focus on an OS.

My first task would be to create a kernel that would be of benefit to any software application.
 

Thread Starter

Yash2019

Joined Jan 5, 2022
7
Rather than trying to build an RTOS I would focus on an OS.

My first task would be to create a kernel that would be of benefit to any software application.
I only know many source file make up kernel in any OS

Can you tell how would you develop kernel?
 

Sparsh45

Joined Dec 6, 2021
143
Top