To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 65
64  |  66
Subject: 
Re: Idle process
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 20 Mar 1999 00:06:34 GMT
Viewed: 
3827 times
  
Lou Sortman wrote:
> > ID TO FROM LENGTH ..... CHECKSUM(16 or 8 bit? probably 16)
> 
> What is the ID?  Is it for framing?  Is it a byte that is not currently
> taken up by a Lego bytecode?  Do we even care about colliding with Lego's
> communication protocol?

Yes, it's a start byte. Jacob suggested using 0xFn to identify protocol
versions, 0xFF being the LEGO standard.

> > Tasks could register to receive messages from certain ports. But can
> > that replace suspend/resume? I think not.
> 
> Suspend/resume is a different subject, isn't it?  It has been suggested to
> me that tasks could be suspended simply by changing their state to something
> like "P_SUSPEND" (and changing the scheduler to deal with it).  That is much
> simpler than the way that I had been thinking of implementing it (with a
> separate queue for suspended processes in each priority level).  That's the
> easy part, though.  First, we would need signals.

Actually, you wouldn't have to change much, just treat P_SUSPENDED tasks
like they're P_WAITING and the condition failed. suspend(pid) and
resume(pid) wouldn't really need signals that way, as the pid equals the
address of the
process data block - we could manipulate it directly.

> I'd expect to wait for a datagram by doing the wait_event() thing.  Either
> explicitly or wrapped in a function which also grabs the datagram from my
> task's point of view.

Uh, what about datagrams arriving faster than the task can handle,
because it is low priority? We need buffers somewhere.

--
Markus L. Noga noga@inrialpes.fr
Check out legOS! http://www.multimania.com/legos/
"Quand on n'a pas de caractere, il faut bien se donner une methode."
-Camus on Software Engineering



Message has 1 Reply:
  Re: Idle process
 
(...) That is true. (...) Yes, we do, but is that something the tasks need to worry about? If the kernel has buffered 3 datagrams since the last timeslice, the next 3 waits would return immediately, since their criterion (datagram ready for reading) (...) (28 years ago, 20-Mar-99, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Idle process
 
(...) Cool! (...) I had been thinking along the same lines. (...) What is the ID? Is it for framing? Is it a byte that is not currently taken up by a Lego bytecode? Do we even care about colliding with Lego's communication protocol? (...) (...) (28 years ago, 19-Mar-99, to lugnet.robotics.rcx.legos)

10 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR