[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [rtl] The HLT instruction



Daniele Lugli wrote:

>  PayPC System Mail Subscriber wrote:
>
>> Nathan Harris said in [rtl] The HLT instruction at 30/Sep/1998 (Wed)
>> 00:26:55.
>>
>> > Does RTLinux and/or Linux use the HLT instruction during the OS
>> idle
>>
>> I can speak for Linux.... it uses HLT when no tasks are in "ready"
>> state.
>>
>> I don't have rt-linux, but I doubt that aspect was changed.
>
> I *hope* it has been changed. A real time system should *not* be put
> to sleep to save power!
> Daniele Lugli

Actually, the PC is not put to "sleep" by the HLT instruction in the
sense of power- management, but is executed just like any other
instruction. What is happening is the following:

1.) RT-Linux runs the normal Linux at the lowest priority, therefore as
long as RT- Linux is idle, the linux kernel can run any instruction it
wants

2.) if normal linux is idle, it runs the HLT instruction if that has
been enabled during the kernel compilation

Therefore, no harm is done to the real- time processes unless  the
processor needs longer to start executing other instructions after
having executed the HLT instruction. I do not think that this is the
case, but I might be wrong.
Greetings,
Hartwig





--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/