[comp.sys.amiga] Amiga IPC should be the Amiga Unix IPC!

craig@unicus.UUCP (Craig D. Hubley) (04/10/88)

Um, I just thought of this.

If Amiga Unix will be System V.3, and System V.3 already has an IPC mechanism,
brain-dead as it may be, it should be used.  So that AmigaDOS tasks can talk
to Amiga Unix tasks (remember AmigaDOS will run as a task under Amiga Unix).
Remember, many of the `real machine' services/facilities/whatever you need
most are likely to be on the Unix side, if you have both.

Even if you don't have Unix, it's worth it just to have a standard.  You 
can always add the message broker, fake Berkeley sockets, etc., on top of
this mechanism, if Commodore hasn't already done it.  Don't forget that 
System V.4 will supposedly have sockets and other Sun-isms.  But I don't
know if it will be available for 680x0 ports... AT&T claims it will.
And you might be able to build a Unix back-end to accept relayed requests from
Amiga programs on a remote/ethernetted Unix machine, giving you an RPC
mechanism to boot.

Not only that, but the System V mechanisms will be well-understood from
the word `go'.  I've never used them, but I understand semaphors and
rudimentary message-passing is available in addition to pipes, etc.
Anyone who's used System V IPC mechanisms care to comment ?
No doubt we'd still need a nice shared library of easy routines...

	Craig Hubley, Unicus Corporation, Toronto, Ont.
	craig@Unicus.COM				(Internet)
	{uunet!mnetor, utzoo!utcsri}!unicus!craig	(dumb uucp)
	mnetor!unicus!craig@uunet.uu.net		(dumb arpa)

papa@pollux.usc.edu (Marco Papa) (04/11/88)

In article <2504@unicus.UUCP> craig@unicus.UUCP (Craig D. Hubley) writes:
|this mechanism, if Commodore hasn't already done it.  Don't forget that 
|System V.4 will supposedly have sockets and other Sun-isms.  But I don't
                                 ^^^^^^^
You got that one upside down.  Sun has given up on sockets and the merged 
SunOS/ATT System V will use ONLY streams, no sockets.  And cheer up, Craig.
Don't be so abnoxious, please :-)

-- Marco
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

dale@boing.UUCP (Dale Luck) (04/12/88)

In article <2504@unicus.UUCP> craig@unicus.UUCP (Craig D. Hubley) writes:
>to Amiga Unix tasks (remember AmigaDOS will run as a task under Amiga Unix).

As far as I know,  AmigaDOS will not be running as a task under Amiga Unix.

However, in the IPC discussion, it does make sense to think about
machine<->machine communication where the other machine may not be
necesarily running Amigados.
Dale

craig@unicus.UUCP (Craig D. Hubley) (04/13/88)

In article <8288@oberon.USC.EDU> papa@pollux.usc.edu (Marco Papa) writes:
>In article <2504@unicus.UUCP> I write:
>|this mechanism, if Commodore hasn't already done it.  Don't forget that 
>|System V.4 will supposedly have sockets and other Sun-isms.  But I don't
>                                 ^^^^^^^
>You got that one upside down.  Sun has given up on sockets and the merged 
>SunOS/ATT System V will use ONLY streams, no sockets.  And cheer up, Craig.

Woops, OK, I'm cheered up already.  I like streams, and I never could 
get sockets to work properly, the concept seems deeply strange to me,
another layer of unecessary abstraction.  Now, the question remains,
can the Amiga support a decent stream mechanism.

>Don't be so abnoxious, please :-)
	     ^^
Well, `ab' means `not', so I presume you would rather I be noxious ? :-)
How about this for a noxious stream:
	 IBM-S36 IBM-S38 VIC-20 8088PC AtariST IBM-RT IBM-PS/2 Applelawsuit

>-- Marco

	Craig Hubley, Unicus Corporation, Toronto, Ont.
	craig@Unicus.COM				(Internet)
	{uunet!mnetor, utzoo!utcsri}!unicus!craig	(dumb uucp)
	mnetor!unicus!craig@uunet.uu.net		(dumb arpa)

jesup@pawl2.pawl.rpi.edu (Randell E. Jesup) (04/13/88)

In article <2504@unicus.UUCP> craig@unicus.UUCP (Craig D. Hubley) writes:
>  So that AmigaDOS tasks can talk
>to Amiga Unix tasks (remember AmigaDOS will run as a task under Amiga Unix).
>Remember, many of the `real machine' services/facilities/whatever you need
>most are likely to be on the Unix side, if you have both.

	Uh, who said that?  Unless someone can come up with a virtual
blitter, I don't think so.  Remember that exec, graphics, intuition, etc, etc,
are based on being able to get to the hardware directly.  This CAN'T be
allowed to a unix task, unless it is somehow 'privleged'.  And if it can,
then it could kill unix real fast when a program goes south.

	You could run AmigaDos under unix if you provided memory address
intercepts for the memory-mapped hardware that passed them on to the unix
kernal, but it would be a) slow, b) tough to do, and c) require real tricky
hardware/software design.

	The only other option is to rewrite everything that touches the
hardware resources.  Then programs that don't touch the hardware would
work, though the ones that play directly wouldn't.  This COULD be done, but
would take a MAJOR investment in software to do.  I would extremely doubt
it.

	If I were asked how to implement Unix and still have AmigaDos, I
would run Unix as a AmigaDos task.  Unix programs don't go to hardware
directly, they go to the kernal.  Since C= is porting the kernal, it could go
to the libraries (graphics, etc) for it's manipulations.  It is much easier
to run a non-realtime system under a realtime one than vice versa.

     //	Randell Jesup			      Lunge Software Development
    //	Dedicated Amiga Programmer            13 Frear Ave, Troy, NY 12180
 \\//	beowulf!lunge!jesup@steinmetz.UUCP    (518) 272-2942
  \/    (uunet!steinmetz!beowulf!lunge!jesup) BIX: rjesup
(-: The Few, The Proud, The Architects of the RPM40 40MIPS CMOS Micro :-)

harald@leo.UUCP ( Harald Milne) (04/13/88)

In article <290@boing.UUCP>, dale@boing.UUCP (Dale Luck) writes:
> In article <2504@unicus.UUCP> craig@unicus.UUCP (Craig D. Hubley) writes:
> >to Amiga Unix tasks (remember AmigaDOS will run as a task under Amiga Unix).
> 
> As far as I know,  AmigaDOS will not be running as a task under Amiga Unix.

	How about Amiga applications and programs? Will they run under Amiga Unix?
Or will Amiga Unix be Unix minus the Amiga?

	If Amiga programs can run at all under Amiga Unix, will we have to wait
as long as the MacII minute to get there?

	If we can't run programs on Amiga Unix, can we switch environments on the
fly?

	I can think of a thousand other questions.

	Hell, I'd be happy just to be able to have Unix at home on my Amiga! 

> Dale
-- 
Work: Computer Consoles Inc. (CCI), Advanced Development Group (ADG)
      Irvine, CA (RISCy business!) 
UUCP: uunet!ccicpg!leo!harald

craig@unicus.UUCP (Craig D. Hubley) (04/14/88)

In article <290@boing.UUCP> dale@boing.UUCP (Dale Luck) writes:
>In article <2504@unicus.UUCP> *I* write:
>>to Amiga Unix tasks (remember AmigaDOS will run as a task under Amiga Unix).
>
>As far as I know,  AmigaDOS will not be running as a task under Amiga Unix.

Arg.  Clarification, Commodore ?

*CONDITIONAL FLAME ON* - read only if AmigaDOS doesn't run under Amiga Unix.
	Boy oh boy, now I get to have *either* a standard multiuser
	operating system *or* a good singleuser multitasking operating system,
	but not both.  No, Unix is not a good singleuser multitasking OS.
	Sun-3s take an abhorrent amount of time just to open windows, and
	you can simply forget writing programs that are actually three or
	four communicating tasks under Unix, which you could do conveniently
	before.  You could simply move Intuition to Unix, and forget the Amiga
	OS,and then *wait, wait, wait* while everybody moves their software to
	Unix and charges an extra hundred bucks for the effort.  Right.
	Not even Apple or IBM has been this stupid, and they don't care either.
	A/UX and OS/2 will supposedly run old Mac and old MS-DOS programs.
	Again, if my software investment is nullified, why should I buy an
	A2500UX instead of another system, something I can get binary licences
	for ?  For those who want to do truly interesting things, combining
	Unix tool power with existing Amiga video/graphic strengths, there
	are better things to do than make them write all software anew.
	Just like the bus argument, I have better things to do with my software
	dollars than buy a `new, improved' version of every single tool I use,
	the sole `new, improvement' being that it runs under Amiga Unix.
*CONDITIONAL FLAME OFF*

Commodore already knows this, I assume, since the Bridgeboard is relatively
well integrated with the Amiga environment.  It should be even easier to 
integrate the other way, implementing the same interface on top of a somewhat
different back end.  Porting AmigaDOS to Amiga Unix couldn't be so difficult
as to warrant nullifying everyone's software investment and giving up goodies
like lightweight tasks, particularly useful for user interfaces, etc.

Technical question, particularly for those involved in writing ARP:
How difficult is it to make Amigadog run under Unix as a task ?
Things like device drivers and the like might have to be rewritten
to speak through Unix to get at the hardware, slowing it down,
but what else would have to be done ?  After all, you can afford a
slowdown if you're running a 16MHz 68020 instead of a 7MHz 68000.

How compatible would programs be, working under a Unix Intuition ?

>However, in the IPC discussion, it does make sense to think about
>machine<->machine communication where the other machine may not be
>necesarily running Amigados.

You bet it does.  Especially when it may be that *nothing* runs Amigados. :-)
For one thing, it would be a snap to convert local (on-machine) service
requests to remote (over network) service requests if the IPC/RPC protocols
were similar enough.

	Craig Hubley, Unicus Corporation, Toronto, Ont.
	craig@Unicus.COM				(Internet)
	{uunet!mnetor, utzoo!utcsri}!unicus!craig	(dumb uucp)
	mnetor!unicus!craig@uunet.uu.net		(dumb arpa)

peter@sugar.UUCP (Peter da Silva) (04/14/88)

In article <2504@unicus.UUCP>, craig@unicus.UUCP (Craig D. Hubley) writes:
> If Amiga Unix will be System V.3, and System V.3 already has an IPC mechanism,
> brain-dead as it may be, it should be used.  So that AmigaDOS tasks can talk
> to Amiga Unix tasks (remember AmigaDOS will run as a task under Amiga Unix).
> Remember, many of the `real machine' services/facilities/whatever you need
> most are likely to be on the Unix side, if you have both.

But the functions provided by UNIX IPC are a very close match to those
provided by the Amiga EXEC already. Apart from named pipes, which have
already been implemented, there really isn't any functional difference
between the two. A package that provides streams-type pushing and popping
of filters would be nice, though there's already a public domain package
that provides more functionality than streams does... I'm talking about the
Commodities Manager.

Now a package that provides a mapping between UNIX IPC and AmigaDOS IPC
would be desirable, should AmigaDOS-under-UNIX (or vice-versa) ever come
about.
-- 
-- Peter da Silva      `-_-'      ...!hoptoad!academ!uhnix1!sugar!peter
-- "Have you hugged your U wolf today?" ...!bellcore!tness1!sugar!peter
-- Disclaimer: These aren't mere opinions, these are *values*.

dale@boing.UUCP (Dale Luck) (04/14/88)

In article <2964@leo.UUCP> harald@leo.UUCP ( Harald Milne) writes:
>
>How about Amiga applications and programs? Will they run under Amiga Unix?
>Or will Amiga Unix be Unix minus the Amiga?

Unix on an Amiga will be like running Ultrix on a Vax.
How many VMS programs run under Ultrix?

>If we can't run programs on Amiga Unix, can we switch environments on the
>fly?

Use of the Vulcan 3 key nerve pinch I believe is the answer.
I don't know if you can have both file systems on one disk. I think they had
more flexibility in doing something smart than we did in amigados. They had
time to do it right, again and again and again. I think Johann ported V
to the amiga 3 or 4 times so he must be getting good at it. Different memory
mappers and different V.x can make you to start all over.

Dale Luck

craig@unicus.UUCP (Craig D. Hubley) (04/15/88)

In article <655@imagine.PAWL.RPI.EDU> jesup@pawl2.pawl.rpi.edu (Randell E. Jesup) writes:
>In article <2504@unicus.UUCP> craig@unicus.UUCP (Craig D. Hubley) writes:
>>  So that AmigaDOS tasks can talk
>>to Amiga Unix tasks (remember AmigaDOS will run as a task under Amiga Unix).
>
>	If I were asked how to implement Unix and still have AmigaDos, I
>would run Unix as a AmigaDos task.  Unix programs don't go to hardware
>directly, they go to the kernal.  Since C= is porting the kernal, it could go
>to the libraries (graphics, etc) for it's manipulations.  It is much easier
>to run a non-realtime system under a realtime one than vice versa.

Yow, come to think of it, you're right.  It *would* have to be the other
way around.  But then, that wouldn't be quite so difficult.  I don't
remember who said it originally, but perhaps I got it backwards.
However, one way or the other, having them both running at the same time
is *not* a `nice feature', its a necessity.  I don't want to go through
the kernel and up again to access the blitter, etc... it'll be as slow
as a Sun.  All I want is an AmigaDOG user interface using Unix as its
processing back-end.  That is, I don't want an improved Intuition under
Unix, because it will be slowwwww and many of the Amiga's real neat
features will go to waste... unless I misunderstood the Amiga Unix concept.
Anyone who knows what the interface will be like, please comment.

>then it could kill unix real fast when a program goes south.

This is a risk that presumably those that need lightweight multitasking
are willing to take in pursuit of their fanatical aims.  And a machine
going south once in a long long while (after you've got the bugs out)
is, in some environments, an acceptable hit to take for lightweight
multitasking.  I don't care if AmigaDOS goes, I just don't want the
obnoxious `multitasking is just like multiuser' UNIX mentality that
makes several closely cooperating tasks treat each other like lepers.
If someone has found a way to make Unix tasks lightweight, fine.
I expect we will have to wait until V.4 and then buy a SPARCintosh to see it.
Better start saving now.

In the meantime, I'll go looking for a decent *workstation* operating
system, and talk to Unix only at a distance.  Too bad, AmigaDOG could
have been it.  Unfortunately nobody took the time.  As an example of
what can be done, Eric Haberfellner's Handshake program is actually four
cooperating tasks (one waiting for serial input, one waiting on keyboard input,
one is the state machine, one blinks the cursor and other blinking text).
At least, that's what I gathered from his explanation at the Toronto ADF.
He said that the overhead for these *four* tasks was negligible, under 5%
of utilized CPU time for the whole program.  Imagine that in Unix.

It's stupid go back to faking multitasking in my own programs because 
the OS's multitasking overhead sucks shit, Unix or not.  I hope that
AmigaDOS doesn't die, because then I'd have to look at the only remaining
multitasking microcomputer operating system: *bluech* OS/2.  A sad fate.

Single-user multitasking != Multi-user multitasking

>     //	Randell Jesup			      Lunge Software Development

	Craig Hubley, Unicus Corporation, Toronto, Ont.
	craig@Unicus.COM				(Internet)
	{uunet!mnetor, utzoo!utcsri}!unicus!craig	(dumb uucp)
	mnetor!unicus!craig@uunet.uu.net		(dumb arpa)

jesup@pawl12.pawl.rpi.edu (Randell E. Jesup) (04/15/88)

In article <2531@unicus.UUCP> craig@Unicus.COM (Craig D. Hubley) writes:
>Commodore already knows this, I assume, since the Bridgeboard is relatively
>well integrated with the Amiga environment.  It should be even easier to 
>integrate the other way, implementing the same interface on top of a somewhat
>different back end.  Porting AmigaDOS to Amiga Unix couldn't be so difficult
>as to warrant nullifying everyone's software investment and giving up goodies
>like lightweight tasks, particularly useful for user interfaces, etc.

>Technical question, particularly for those involved in writing ARP:
>How difficult is it to make Amigadog run under Unix as a task ?

	Remember, Unix tasks can't be trusted with access to the hardware.

Therefor: 1)  Parts of Exec need to be rewritten (task switch, enable, etc),
	      and, of course, AllocMem & the interrupt stuff.
	  2)  Graphics needs a VBlank interrupt, plus all copper/blitter/
	      sprite stuff requires going through Unix.
	  3)  Every .device requires replacement with versions that go to
	      Unix to interface with the hardware.
	  4)  Even if all of these are done, any program that goes to the
	      hardware won't work.
	  5)  Running a realtime system under a non-realtime system doesn't
	      work very well (think about it).

Too bad they didn't have unix run under exec, at least.  It's possible, but
not easy, to make amigados run under unix.

Note that Amazing Computing has an ad for 'Amix' (or Amnix?)  It's a Sys V
workalike, and I think it runs under AmigaDos (certainly it doesn't have
an MMU!)  I don't think it requires an '020 or '010, and it lists for
just under $400.  Of course, I haven't seen it running yet. :-)

     //	Randell Jesup			      Lunge Software Development
    //	Dedicated Amiga Programmer            13 Frear Ave, Troy, NY 12180
 \\//	beowulf!lunge!jesup@steinmetz.UUCP    (518) 272-2942
  \/    (uunet!steinmetz!beowulf!lunge!jesup) BIX: rjesup
(-: The Few, The Proud, The Architects of the RPM40 40MIPS CMOS Micro :-)

peter@sugar.UUCP (Peter da Silva) (04/16/88)

In article <291@boing.UUCP>, dale@boing.UUCP writes:
> Unix on an Amiga will be like running Ultrix on a Vax.
> How many VMS programs run under Ultrix?

Why can't it be like running AU/X on a Mac-II?  Amiga software is much better
behaved than Mac software... it's designed to run under an operating system.
Surely of those wimps over at Apple can do it?...
-- 
-- Peter da Silva      `-_-'      ...!hoptoad!academ!uhnix1!sugar!peter
-- "Have you hugged your U wolf today?" ...!bellcore!tness1!sugar!peter
-- Disclaimer: These aren't mere opinions, these are *values*.