>> >I see there is a way to share pids? Is that still un-implemented or
>> >have things changed?
>> Hell knows. What for? To emulated Solaris idiocy?
>I was wondering what was intended by that feature and whether
>any further progress had been made.
>No matter how idiotic Solaris might be, it is worthwhile to be
>able to have their programs port to linux w/o having to change
>source code.
_If_ it doesn't mean putting extra cruft into the kernel. Otherwise you'd
have to copy every idiotic feature ever invented. Not a good idea.
Quote:>Let's see, maybe I don't want to write my own scheduler, but also don't
>want my 50 compute threads to act like 50 processes and take over
>the system.
Lower their priority and be done with that. Same effect, no new API needed.
Quote:>So, do you bother to deallocate all memory on exit, or do you
>chase down all open i/o channels, or do you simply exit. why
>why why. I wouldn't be asking if there were no reason. And
>just becuase one can solve the problem writing code doesn't
>mean it's good to be forced to write code.
Deallocating memory and closing files avoids kernel leaks. It _can't_
be reliably done in userland. Delivering signals to processes you want
is doable there. Moreover, _not_ doing that is a valid decision and
such decision belongs to userland.
Quote:>> >3. do clones share stacks? do they get fixed sizes or can they
>> >grow like a process?
>> Not necessary and it depends on the mmap() flags used to create a
>> stack for child.
>Suppose I have a program that has a local array (on the stack) and
>I want to send a pointer to it to one or more of my threads. Will
>that work with clone? And even if you think that is stupid, suppose
>I have to port a program that does it and I don't have time to modify it.
If these clones share VM - sure, it will (they may have separate VM,
but shared file descriptors - combination that also makes sense and
again, that's a decision belonging to userland).
Quote:>> Process is a collection of resources. VM is one of them. Processes can
>> have some resources in common. Why bother with LWPs when context switch
>> between the normal processes that share VM is equally cheap?
>So you can easily port code. Clone is a great system call, but I can't use
>it since it is not portable. There are still other systems in the world I have
>to be aware of.
Let's see. By that logics we would have to implement
* streams (every Missed'em'V out there)
* doors (Solaris)
* environment-dependent symlinks (dual-universe monsters)
* mpx (remember that v7 misfeature?)
* /dev/poll (SGI barfball)
* several mutually incompatible variants of devfs
* logicals (Vomit Making System)
* drive letters (DEC-derived systems, including CP/M branch)
* AST (VMS)
I can easily continue, but I think you already see what I mean.
BTW, I would like to see Solaris supporting notes, clean userland filesystems,
per-process namespaces and _both_ rfork() a-la BSD (== clone() in Linux) and
rfork() a-la Plan 9 (stack is always private). You see, there's a bunch of
very nice programs that rely on them and I'd love to see them on Solaris.
Yes, some of them are ported, but it would be nice to have all this stuff
natively. Call me when it happens, OK?
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid. Get yourself a better computer" - Dilbert.