Welcome, Guest. Please login or register.

Author Topic: Contiki: I wonder....  (Read 6781 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Jupp3

  • Sr. Member
  • ****
  • Join Date: Mar 2002
  • Posts: 364
    • Show only replies by Jupp3
    • http://jupp3.amigafin.org
Re: wow. Talk about different...
« Reply #29 from previous page: April 14, 2005, 08:07:55 PM »
Quote
I can only guess why cooperative multitasking was used. Maybe for portability?

That might be one of the reasons. Think of C64 for example. Just save the registers somewhere, that simple. But have you ever thought of how to write that on C? I'd guess it would be quite impossible.

There are just so many things you can't write in C. Accessing certain registers, zero page etc... Don't know if it would be possible to even change the stack pointer (if you wanted to share the stack between many tasks)

But in any case, Contiki is a proof of what can be done on an unexpanded C64 with C.
 

Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
Re: wow. Talk about different...
« Reply #30 on: April 14, 2005, 09:48:01 PM »
Not possible with vanilla C. It has to be done with assembler. C, especially of the ANSI variety knows jack about hardware, because that violates the 'platform independence' of ansi C.

I hate to think of what C would do if used for state saving and restoration. hehe. strange concept really.

Gotta say it. ANSI C is platform independent, fast and good at what it does. Java is none of those. Sorry, I just _really_ hate java. It was a good idea (I guess) that went badly astray.

I find contiki inspiring. To my eyes anyway, it is more capable byte for byte than GEOS, which was painfully optimised assembler. Mind you, geowrite still impresses me.

More OSes should be like it.
I get upset that any OS needs more than 1mb RAM. It shouldn't!...unless it does a lot of things like unix/linux which does pretty well at keeping its RAM footprint down.

And windows shouldn't need more than 640k RAM, because nothing should ever need more than that, eh, Mr. Gates?
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3
 

Offline Trev

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 1550
  • Country: 00
    • Show only replies by Trev
Re: wow. Talk about different...
« Reply #31 on: April 14, 2005, 09:56:49 PM »
@Doppie1200

Amiga Explorer needs bsdsocket.library emulation for IP. I'm really liking the idea of a real bsdsocket.library wrapper for lwIP that handles access to the network dynamically (i.e. the network is available as long the library is loaded by at least one task). I really hate that most Amiga stacks run like an application and not a service.

Trev
 

Offline weirdami

  • Hero Member
  • *****
  • Join Date: Jan 2003
  • Posts: 3776
    • Show only replies by weirdami
    • Http://Bindingpolymer.com
Re: Contiki: I wonder....
« Reply #32 on: April 14, 2005, 10:07:55 PM »
Quote
Quite frankly, can't think why anyone would want to use it


That's what I said about MUI.  :lol:
----
Binding Polymer: Keeping you together since 1892.
 

Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
Re: Contiki: I wonder....
« Reply #33 on: April 15, 2005, 11:40:52 AM »
I can't use MUI. Either that or I'm doing something wrong.
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3
 

Offline patrik

Re: Contiki: I wonder....
« Reply #34 on: April 15, 2005, 12:02:27 PM »
@Generale:

MUI requires WB2.0.


/Patrik
 

Offline Doppie1200

  • Sr. Member
  • ****
  • Join Date: May 2004
  • Posts: 497
    • Show only replies by Doppie1200
Re: wow. Talk about different...
« Reply #35 on: April 15, 2005, 05:17:18 PM »
Quote

Trev wrote:
@Doppie1200

Amiga Explorer needs bsdsocket.library emulation for IP. I'm really liking the idea of a real bsdsocket.library wrapper for lwIP that handles access to the network dynamically (i.e. the network is available as long the library is loaded by at least one task). I really hate that most Amiga stacks run like an application and not a service.

Trev


Maybe they had good reason to implement the stacks that way I don't know. I'll keap your idea in mind when I'm going to take this beyond ythe vapour stages.
Regards,
Erno

(O\\\\_|_/O) <- this is supposed to look like the front of my beetle
(entire front not possible in signature)
 

Offline GeneraleTopic starter

  • Full Member
  • ***
  • Join Date: Feb 2005
  • Posts: 233
    • Show only replies by Generale
    • http://members.dodo.com.au/~izabellion
Re: wow. Talk about different...
« Reply #36 on: April 16, 2005, 04:17:16 AM »
Oh. it needs wb2 or later. That explains it.

Anyway I have a question about having a dynamically loaded stack.
Would it at least have a small resident portion to load the stack when there is incoming data?
I mean it's perfectly fine to have something that is loaded when needed, without doubt. But how easy is it to initialise whenever the stack is required by an incoming packet, for uses such as file sharing when there may be no need for the IP stack most of the time.
I hope you can understand what I mean. I can't figure out how to explain it properly. Sorry.
A500 (salvo): 1Mb RAM (512k chip, 512k SlowFast)
1x880k Floppy Disk, 1xIBM 540Mb 3.5\\"HDD KS1.3, WB1.3
1084S monitor. AT Keyboard!
A500 (Whitey): 512k RAM, 1x880k Floppy Disk, KS1.2, WB1.3
 

Offline Doppie1200

  • Sr. Member
  • ****
  • Join Date: May 2004
  • Posts: 497
    • Show only replies by Doppie1200
Re: wow. Talk about different...
« Reply #37 on: April 16, 2005, 09:55:33 PM »
Just realising most of this thread is offtopic but here goes another post.

Quote

Generale wrote:
Anyway I have a question about having a dynamically loaded stack.
Would it at least have a small resident portion to load the stack when there is incoming data?


how easy is it to initialise whenever the stack is required by an incoming packet, for uses such as file sharing




My interpretation was that the stack was loaded on demand. An incoming packet would never load a TCP/IP stack. When something like filesharing is active the stack would be loaded. The filsharing software will listen for incoming data (connectionless or not). Filesharing means there is a demand for the stack to be present.
But when filesharing is off and no other programs are active that requires a stack the stack should unload.

I like this idea and will surely look into it. But for staters I guess its best to get it going the traditional way and have the user load/unload the stack.
Regards,
Erno

(O\\\\_|_/O) <- this is supposed to look like the front of my beetle
(entire front not possible in signature)