Pumpkin, Inc.

Pumpkin User Forums

OS_CallBIOS() new service?

Have an idea on how to make Salvo better? Post it here!

OS_CallBIOS() new service?

Postby luben » Mon Sep 09, 2002 8:35 am


SALVO is in fact operating system like the BIOS or Windows in the computers – it supports the working of multiple program simultaneously, the intercommunication between programms. But like every BIOS I think that SALVO needs some special services – “BIOS” features.

I’m sure that you have some experience with the BIOS. Imagine that you have to read or write to hard disk – then you call some BIOS sowtware interrupt, for keyboard reading/writing – other software interrupt.

The software interrupts are sofisticated way to call some special programs, that are very important for the system.

My idea is to add some OS_CallBIOS(destination, Label) service, that will bring the control to fixed tasks – like display, keyboard, emergency. Maybe this idea is similar to one old idea of “emergency” priorities.

What’s special in the OS_CallBIOS() service? Let’s think:

- the destination task receives higher then the highest task’s priority – thus allowing immediately after contex switching to pass the program flow to the desired task. SO OS_CallBIOS() is like OS_Yield() with this difference that you chose where to pass the control. In fact you can do similar functionality by increasing the priority of the desired task to highest possible value and then calling OS_Yield(). That means – this feature could be implemented like macros into existing SALVO. Well, the user should keep free this priority level (should be 0) only for the new service.

- When the desired task is already active and took the control, it has highest possible priority. So, if the task will finish it job for let say 1 second, that means that it need to contex switch within this period and to bring the control back to other tasks (if we want to keep other tasks active). And here is something that doesn’t exists in current SALVO – if the priority is kept highest – then no other task could take the control if the contex switch is made by OS_Yield(). Well, using OS_Delay() could do similar job in some cases, but it’s not the solution. If the priority is decreased to the priority of other tasks – it doesn’t quarantee that the “BIOS” task will get the control as soon as possible.

- So, maybe we need of some new type OS_Yield(), let’s say – OS_BIOSYield(), that contex switch to kernel. The difference is that it will decrease the priority of the current task to lowest possible priority. Then, if other task takes the control (not all tasks are delayed) the kernel will restore the original highest possible priority of the BIOS task. That means – if you call OS_BIOSYield() you bring the control to other task, BUT ONLY ONE TIME. After the user task finished and returns the control to the kernel the BIOS task will get the control again.

- We could add some OSSET_BIOSINTERLEAVE value that controls after how many contex switches the BIOS task will be ensured that takes again the control. I spoke for OSSET_BIOSINTERLEAVE equal to 2. But you can set it to 4 – that means – after the BIOS task returns the control to kernel and there are eligible tasks, after 3 contex switches SALVO will sure return the control to the BIOS task.

In short – my idea is to add some new type of services, that break the normal flow of the operation (as you remember my ideas about “compassion” to low priority tasks, “emergency” priorities, etc.). I don’t know how to say it, but current SALVO has extremely strong connection between tasks and priorities and it’s quite difficult to run something out of the order, some BIOS, or emergency service. Maybe you can get better and more elegant way to do this. My idea is to add some “noise”, some “haos” into SALVO, because sometimes we need to break the ordinary flow of the tasks, to do something and then to return to nowmal operation. Don’t forget one other old idea of TRAP functionality – fi some event happens to pass the control to fixed task. All these ideas are pointed into one direction – how to break the normal flow of the operations.

Best regards

Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: OS_CallBIOS() new service?

Postby aek » Thu Sep 12, 2002 9:38 am

Hi Luben.

Can you give a more concrete example of how / why you would use this feature?



Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest