Continuous Operating System – Basics

Before I began two years back on my first undertaking, I need to concede that I didn’t think a lot about the working of an (ongoing) working framework. All the stuff like – checking semaphores, errand planning, setting switches, occasion control squares, hinders and ISR schedules, undertaking and time the executives and what else and so forth, all appeared a small piece excessively to get a handle on.

For me, the main thing I could consider when somebody said Operating System before was a Windows OS or a Linux kid was numbness ecstasy! As I composed code for the principal implanted framework, I understood how guileless I have been to feel that I would generally stick to Windows 7 iso or a Linux machine and form little programming projects and remain above water.

As it occurred to me this would not be the situation in my new organization; I started seeking quickly to realize what an RTOS (otherwise known as, Real-Time Operating System) could do and how it worked. It took me some time, and a ton of exertion to at long last become more acquainted with why we required one and what every one of the ones could do with one. In any case, I don’t lament the time spent realizing all that I could discover on the point. Indeed, even now I am as yet not a specialist but preferably at least not as guileless and insensible as previously.

So I thought possible, I should merely note everything down someplace perhaps for future reference or only for any individual who needed a fast vibe or looked at what an ongoing OS was required for or could do.

Section 1. RTOS – Fundamentals

To begin, ARTOS is a performing multiple tasks working framework expected for continuous applications which for the most part incorporate those which keep running on implanted structures. The rundown of inserted structures that we find in our regular daily existence continues developing exponentially consistently. These days you find installed frameworks all over the place, be it family apparatuses like microwaves, dishwashers, office machines – like fax machines or copiers, PC peripherals – like modems, printers, scanners, or howdy tech stuff like robots, shuttles, autos, look into types of gear, weapons frameworks and so forth.

The RTOS that I got the chance to work with was called uCOS-II from Micrium. The Basic ideas that one needs to think about before one begins off with an RTOS are –


A straightforward asset method any substance, for instance, an I/O gadget like a console, show, printer or a program characterized exhibit, variable or structure.


A Task or a string as some may call it is only a necessary bit of program that conceives that it has every one of the assets and CPU all to itself. An undertaking can regularly have any of these states – Running, Dormant, Ready, Waiting.

An assignment is said to run when it has control of the CPU, and it can execute its code. An errand is supposed to be prepared when it can achieve its code. However, its need is lesser than the present undertaking which is running. An assignment is said to hang tight when it is sitting tight for the event of an occasion like an Input/Output task to finish or a hinder to happen or any asset to end up accessible. An assignment is said to be lethargic when despite everything it lives in the memory and has not been made available to the portion.

Performing multiple tasks

Performing multiple tasks is the procedure by which a few errands or strings can keep running on a similar CPU. Indeed, better said when a single CPU switches its consideration between different chores successively empowering somebody to believe that every one of the undertakings is being kept running in the meantime.

Setting Switches or Task Switches

This is the procedure by which a bit moves its regard for an alternate assignment from the one it is as of now executing. To empower setting switches, the bit must spare all the running assignments CPU enlists securely on to the stack and after that heap all the spared registers of the following undertaking which is holding on to be run.


The Kernel is the focal part of the Operating framework, and it deals with every one of the undertakings. Its primary occupation is to empower the setting switches or assignment switches. Its duties likewise incorporate coping with different framework assets.


First in First Out

Round Robin

Most limited Remaining Time


The Scheduler is the piece of the Kernel who is in charge of figuring out which on the present assignments must be kept running straightaway.

There exists two kinds of need-based parts – the preemptive ones and the non-preemptive ones.

The non-preemptive booking is likewise called co-usable performing various tasks; the undertakings participate with each other to share the CPU and give the hallucination that every one of them is executing at the same time. In genuine each assignment works for at some point and afterward provides the CPU with control to other undertakings.

The preemptive one runs dependably the most elevated need undertaking which is prepared to run. At the point when a higher need undertaking ends up ready to run, the present errand is pre-discharged ( or suspended), and the CPU control is offered a way to the new higher need assignment. When the higher need undertaking has completed execution, the CPU control is exchanged back to the before appointment which was suspended.

Most Commercial RTOS are pre-emptive as is u-COS-II.