Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

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 #14 on: April 13, 2005, 01:37:47 PM »
You don't have any amiga programming experience either?

About the same as me. Except I'm guessing you're still an active programmer. I'm horribly rusty. Trying to relearn it all again. All I can still really understand is ANSI C and a few assemblers including PIC, and basic, but that doesn't count. I'd rather be tortured than use pascal again.

I think I'm moving again sometime too. I don't know.

I'm going to hassle one of the developers at infogrames for a job tomorrow. It can't hurt  :-D It'll give me more cash for living.
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 #15 on: April 13, 2005, 03:08:54 PM »
Yes, my main occupation is software designing. During my coffee breaks I check amiga.org. (must cut down on my coffee breaks) Anyway I don't think it will be all that difficult learning the Amiga. The main problem I see is lack of proper documentation availanble. The amiga system is pretty old and uncommen. Its not I walk into a store and get myself a book or something.
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 #16 on: April 13, 2005, 03:34:13 PM »
I agree about difficulty with documentation. There are usually books on ebay, but they cost money. Sometimes serious money.

Most of the info I find is sketchy at best.
There's probably a lot in the headers of various compiler packages. But there are some things that can't tell you.

I'm not even sure if the so called amiga developer CD would be much use.

Best of luck though.

There are probably people out there that would donate information to a worthy cause like a nice small IP Stack. Can't hurt asking.
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 #17 on: April 13, 2005, 03:53:33 PM »
Some of my colleques have done amiga programming in their carreer. I got 2 books for free from them. One is an Os1.3 reference the orher an OCS hardware reference. The latter is in german :-(.

I also have the developer cd 2.1. So i think it will be enough to get me started.

As for the stack. I know you have an A500 so there might not be anything in it for you.

The A500 has no easy obtainable network interface. I would puy my stack on top of cnet.device. That means an A600 or 1200 would be required (guess what's in my fleet).

Maybe I can make it OS1.3 compatible. Then it would require changing it to a hardware interface available on the A500 to make it work for you. Perhaps we could work something out there. But I have no means of doing any A500 related testing.

As for donations and such. I dont want to make any obligations. If people donate I'm obliged to deliver. To me it is just a hobby. I don't want to have a 'time to market'. Not that this means anything in amiga context. Even amiga itself does not seem to be aware of the concept 'time to market'
 :lol:

But I'm sure I will look into this matter as soon as my game database/starter is finished (which I haven't even started aswell.....so many ideas...so little time).
Regards,
Erno

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

Offline Tomas

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2828
    • Show only replies by Tomas
Re: wow. Talk about different...
« Reply #18 on: April 13, 2005, 05:08:45 PM »
Quote
Does Contiki support preemptive multi-threading?


 Yes. While the Contiki kernel is based on event driven cooperative multitasking, an additional library provides preemptive multi-threading. The reason for not basing the kernel on a preemptive multi-threading model is that it would increase the complexity not only of the operating system, but also of the applications that would run under it. By providing preemptive multi-threading as a library, only programs that explicitly require such functionality will need to pay the extra price.
 

Offline Doppie1200

  • Sr. Member
  • ****
  • Join Date: May 2004
  • Posts: 497
    • Show only replies by Doppie1200
Re: wow. Talk about different...
« Reply #19 on: April 13, 2005, 08:38:15 PM »
Great! I didn't know that. I'm still not going to port it :-)
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 #20 on: April 14, 2005, 01:13:14 AM »
I didn't even think of the obligation. Dont I feel silly. In my defense, I just had a very big meal of filipino takeaway and was feeling kind of sleepy....

I didn't realise 1.3 was that bad! Although I did kind of expect it. When I finish the kickflasher it'll be upgraded anyway. Probably to 3. Then I'll get even more upset with the lack of RAM and upgrade to 9mb total.

Don't blame you for saying no to porting contiki. It'd be interesting but not really worth the hassle unless someone really wanted it. Did I mention it can have a VNC interface?
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 Jupp3

  • Sr. Member
  • ****
  • Join Date: Mar 2002
  • Posts: 364
    • Show only replies by Jupp3
    • http://jupp3.amigafin.org
Re: wow. Talk about different...
« Reply #21 on: April 14, 2005, 09:35:17 AM »
Quote
A preemitive task scedular would take too much ram (and time) due to it's complexity.


Nonsense!

A pre-emptitive task scheduler can be done in well under 100 bytes of code and a table, size of which depends on max number of tasks (Or maybe you just consider that too big / complex :-) )

And how do I know?

Becouse I've done it!

Of course it was very simple (didn't have priorities, events or anything else, but it kinda proved, that it is possible)

Maybe I'll finish it some day :-)

And I don't quite agree with pre-emptitive multitasking making things more complex than co-operative... With pre-emptitive you don't have to even think about giving time for other tasks, as the OS will switch to the next task after pre-set time.
 

Offline Doppie1200

  • Sr. Member
  • ****
  • Join Date: May 2004
  • Posts: 497
    • Show only replies by Doppie1200
Re: wow. Talk about different...
« Reply #22 on: April 14, 2005, 09:39:29 AM »
Don't worry it was just an idea of yourse. Maybe I did fancy the obligation.

why do you think 1.3 is that bad.
The NIC I was talking about has nothing to do with the OS.
Nic is just the network interface. None of the amiga OSses have something like that build in. That does not mean you cant implement a network interface. This just takes some effort in hardware and in software.

As for hardware; with big box amiga's this is no problem. Just insert a network card.
As for wedgies the A600 and 1200 can use the PCMCIA interface to use a network card. The A500 has no such interface. (I'm speaking of interfacing directly to a network not via dialup).

There is a processor bus on the left if I recall correctly. And if that is unusable just pop the cpu and piggyback the expantions between the cpu and it's socket :-)

What you would need is a piece of hardware that allows your amiga to interface to the network. And a piece of software like cnet.device. I beleive the latter is called a SANA-II driver or something. You could slam the to be created TCP/IP stack on top of that and you'd end up with a networking enabled OS1.3.

Upgrading to a newer OS would not be needed if all the software is 1.3 compatible.
Regards,
Erno

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

Offline Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show only replies by Cymric
Re: wow. Talk about different...
« Reply #23 on: April 14, 2005, 11:45:51 AM »
Quote
Tomas wrote:
Quote
Does Contiki support preemptive multi-threading?
Yes. While the Contiki kernel is based on event driven cooperative multitasking, an additional library provides preemptive multi-threading. The reason for not basing the kernel on a preemptive multi-threading model is that it would increase the complexity not only of the operating system, but also of the applications that would run under it. By providing preemptive multi-threading as a library, only programs that explicitly require such functionality will need to pay the extra price.

I think you can do away safely with this library, to me it seems like it was added as a mere curiosity. The kernel does not support pre-emptive scheduling: well, then no application library will give you the Real Thing. I am not saying nót having pre-emptive scheduling is bad---there are applications where you don't need it---just that you should not rely on that library too much (read: at all).
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.
 

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 #24 on: April 14, 2005, 02:14:37 PM »
It's true. Pre-emptive multitasking is simple.
IIRC it involves the following steps (varies a little from platform to platform). This is a very basic example.

* Induce an NMI. Whether it be from a clock or whatever.
* Jump to handler.
* Save registers, PC, and stack somewhere.
* Grab next process from the list
* load its stack, registers and PC.
* End interrupt

I have nasty memories of doing this in MIPS RISC assembler.

Its what I don't get about contiki. I can only guess why cooperative multitasking was used. Maybe for portability?
It can also help if you don't want to reimplement low level functions. more than one preemptive multitasking OS can't happily coexist on one machine (VMs excluded).

Ohhh. I thought that AmigaOS 2+ made it a bit easier for networking.
That's just a completely uninformed guess.
And 1.3 seems to be fighting me all the way. Everything I find needs wb/ks 2 or later. I'd like FFS for floppies, and the ability to unmount too.

I'm going to have one helluva card under my 68k. I shot myself in the foot with the hard drive controller. If I could un-superglue the connector from my interface card I could add the extra connections I need for the RAM expansion. But I can't.
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 Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show only replies by Cymric
Re: wow. Talk about different...
« Reply #25 on: April 14, 2005, 02:54:48 PM »
Quote
Generale wrote:
It's true. Pre-emptive multitasking is simple.
IIRC it involves the following steps (varies a little from platform to platform) [...] Its what I don't get about contiki. I can only guess why cooperative multitasking was used. Maybe for portability?

If you do not implement pre-emptive sheduling, easy as it is to implement, then you do not have to worry about race conditions and deadlocks. The kernel itself cannot be interrupted at crucial moments. Everything is single-threaded: a resource is either occupied or free, and there is almost no contention to it. These design considerations make cooperative scheduling far cleaner and easier to implement, but it comes at a price: your computer no longer has control over what the programs do.

Quote
And 1.3 seems to be fighting me all the way. Everything I find needs wb/ks 2 or later. I'd like FFS for floppies, and the ability to unmount too.

Forget about 1.3. It's dead, gone, and should be forgotten. Its BCPL legacy makes any decent DOS programming a nightmare. Stick to OS2.x or higher. So much easier and cleaner it hurts.
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.
 

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 #26 on: April 14, 2005, 03:37:29 PM »
Heh. I forgot about race and deadlock. You can still get it though with preemptive multiprocessing.
Usually where shared resources, I/O and job control are concerned. There are algorithms to get around all that, but it makes the OS grow.
Even if it is something as simple as a semaphore or a mutex.

I keep getting urges to read through my concurrent systems stuff, but then I realise that my textbook can be fairly impenetrable without the right mindset.

WB1.3 does have some horrible hangovers I agree. It....angers....me. Can't wait to upgrade.
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 #27 on: April 14, 2005, 03:40:42 PM »
Fine. So I will not have to bother making the tcp stack 1.3 compatible. There will probably be too few programs making use of the stack. What are the requirements for amiga explorer anyway?
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 #28 on: April 14, 2005, 04:32:47 PM »
I wouldn't want you going out of your way to do it. Especially if software support is scant. Now that I think of it, the logical progression of thoughts says that if there isn't a TCP/IP stack available that works properly with wb1.3 then there probably won't be any software that uses said stack.

I just feel that 1.3 is incomplete somehow. It does some things, and only half-does others. Sort of like GTA3. There are so many half finished things in that game. If they'd finished off a lot of the things they were putting in, it would have been something extra special.
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 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.