Bugs

Joseph Allen jallen at eeserv1.ic.sunysb.edu
Sun May 12 08:25:23 AEST 1991


In article <1991May7.080724.3904 at robobar.co.uk> ronald at robobar.co.uk (Ronald S H Khoo) writes:
>jallen at eeserv1.ic.sunysb.edu (Joseph Allen) writes:

>> >Why not use pipes instead?
>> Because how do you make a pipe between unrelated processes?

>With the mknod command or system call, and the open system call.
>Named pipes have been in UNIX since System III at least.
>SCO Xenix documentation has a section on in in the "writing and using pipes"
>section of the Programmer's Guide.  The pipe appears in the filesystem
>so anyone can open it.

! Oops, you're right.  This leads to two questions:  Why did they add message
passing (which is very very ugly) when they already had an elegent IPC system?
Why didn't I notice them? (the answer to the second question is that I'm used
to BSD's sockets (which can be filesystem named) and since xenix didn't have
sockets...) 

>> Also I've found that the message passing system calls are very fast (I don't
>> have experience with streams but BSD sockets were always a bit slow).
>There is *zero* difference in speed between using pipes and using
>message queues.  The reason is that the IPC overhead is completely
>swamped by the cost of the context switch.  If you write a program
>	Process 1		Process 2
>	Send message
>				Receive message
>				Send message
>	Receive message
>in a loop, you will find that the number of transactions that you can do in
>any given time frame is about the same no matter which IPC mechanism you
>use.  Context switching in 386 Unixes is *AWFUL*.  BAD BAD BAD.  Terrible.
>You could do the IPC by carrier pigeon and and the transaction rate would
>*still* be the same.  Ugh.  <Shudder>

Anyway, it's good that pipes at least arn't any _slower_ than message passing
Mostly I solve this problem by:

	Process 1
	---------
	Send message 1
	Send message 2   or Send big message 1
	Send message 3
	(task switch and) Receive message

>This is probably a good reason to switch to Mach.  Anyone want to
>volunteer some figures for this on Mach 386?

Here's the most important figure:  Mach for 386 costs about $3000

And second most important figure: AMR's Unterminal doesn't work on it

And third most important figure: it doesn't run Lotus 123 (er.. um.. SCO
Professional) or Wordperfect 
-- 
/*  jallen at ic.sunysb.edu  */     /* Amazing */     /* Joe Allen 129.49.12.74 */
int a[1817];main(z,p,q,r){for(p=80;q+p-80;p-=2*a[p])for(z=9;z--;)q=3&(r=time(0)
+r*57)/7,q=q?q-1?q-2?1-p%79?-1:0:p%79-77?1:0:p<1659?79:0:p>158?-79:0,q?!a[p+q*2
]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}



More information about the Comp.unix.xenix.sco mailing list