Re: I prefer to:
by shonorio (Hermit) on Jan 14, 2007 at 11:40 UTC
|
I've a dream of one day we'll programming with threads simple as like we do with single threads, specially with the evolution of multiples processors. When Perl will have better tools to help-us with threads and we'll be able to use all the threads power.I have a dream ....
Solli Moreira Honorio
Sao Paulo - Brazil
| [reply] |
|
I share your dream.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
Re: I prefer to:
by BrowserUk (Patriarch) on Jan 14, 2007 at 08:45 UTC
|
| [reply] |
|
come on, take off your 'if all you have is a hammer every problem looks like a nail' hat. the question is not "i always" it's "i prefer". that's like saying i prefer whatever kind of ice cream is in the freezer when you actually have a favorite.
| [reply] |
|
that's like saying i prefer whatever kind of ice cream is in the freezer when you actually have a favorite.
If I've just eaten something heavy, say pasta with cream cheese sauce, then I'll opt for something light, say lemon sorbet.
On the other hand, if I've just eaten something light, sushi and salad, then I'd go for something with a bit more body. Butterscotch and Pecan ripple sounds good.
So, my favorite does not depend just upon what is available, but also on the circumstances.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
|
|
Re: I prefer to -- What we really need
by starX (Chaplain) on Jan 14, 2007 at 17:54 UTC
|
Is a new way of creating processes called spork().I don't really care what it does or why it's different from fork, as long as it is some trivial feature that is enough for the spork() zealots to get behind it, look everyone else in the eye, and say "Oh yeah, well I'm using spork()." | [reply] |
|
| [reply] |
|
I hang my head and kick some dirt around with my toe, muttering something about it being just a joke that I really didn't put much thought into. :)
| [reply] |
Re: I prefer to:
by zerogeek (Monk) on Jan 14, 2007 at 06:30 UTC
|
Oh... wait!
You said FORK....
This relates to Perl after all! | [reply] |
Re: I prefer to:
by stonecolddevin (Parson) on Jan 14, 2007 at 21:44 UTC
|
| [reply] |
Re: I prefer to:
by tye (Sage) on Jan 14, 2007 at 05:30 UTC
|
| [reply] |
|
Added. Never let it be said that I am unwilling to accomodate the handicapped! :-)
| [reply] |
|
| [reply] |
|
Okay, I do use Linux and BSD, but I'm not exactly a card-carrying Unix bigot. Non-Unix OSes I've used include PC-DOS 3.3, MS-DOS 5.0, 6.0, 6.22, Win95 OSR2, Win98SE, WinXP, Mac System 6, 7, MacOS 8, 9, BeOS 5PE, and OpenVMS 6, 7.2.
Yet, I've never heard of spawn in this context before. And I can't seem to find it listed on Wikipedia, either. What type of system is it associated with, and what are the semantic differences between spawn versus fork or threads?
Also I was under the impression that threading did not originate in the Unix universe but elsewhere were forking was more expensive, and was adopted by the Unix community only later. Was I mistaken?
Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. You can just call me "Mister Sanity". Why, I've got so much sanity it's driving me crazy.
| [reply] [d/l] |
|
You mention VMS. Surely you've heard of lib$spawn(), not to mention the DCL command spawn, which is the natural way of creating a subprocess to do something different from the parent (as distinct from launching a detached process, which is roughly the equivalent of a nohup). The posix layer implements fork, but this is not the native VMS way of doing or thinking about things.
Digital had a lot to do with the invention of threads. PThreads are a derivative of DecThreads, and VMS was one of the platforms on which they were originally targetted. The reason for this was that there is a substantial overhead in process creation - spawns were expensive, and threads provided a convenient way of multitasking inside a process's address space.
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ? (Missquoting Janis Joplin)
| [reply] [d/l] [select] |
|
|
Yet, I've never heard of spawn in this context before. And I can't seem to find it listed on Wikipedia, either. What type of system is it associated with, and what are the semantic differences between spawn versus fork or threads?
It sounds familiar to me, because of the node They didn't give me a fork so I have to eat with a spawn..
"To spawn" is to produce offspring, hence, creating a child process. No mystery there. You can do it by calling system, for example.
| [reply] |
|
*mutter* buggered Unix bigots
I just tried to find it in an archive somewhere and failed
by that remark reminds me of a Dilbert cartoon from
years ago that showed a Unix Guru type telling his
protagonist "Here kid, here's a nickle, go buy
yourself a real computer." One of my all time
favorites and I can't find it.
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
| [reply] |
|
| [reply] |
Re: I prefer to:
by tbone1 (Monsignor) on Jan 16, 2007 at 16:13 UTC
|
I chose fork, but really I prefer to spoon.
In June.
'neath the moon.
At noon.
Or soon.
With a loon.
Or raccoon.
On a dune.
While the Goons.
Sing a tune.
(But not on a Zune.)
--
tbone1, YAPS (Yet Another Perl Schlub)
And remember, if he succeeds, so what.
- Chick McGee
| [reply] |
Re: I prefer to:
by kwaping (Priest) on Jan 14, 2007 at 17:57 UTC
|
| [reply] |
|
| [reply] |
Re: I prefer to:
by arc_of_descent (Hermit) on Jan 18, 2007 at 21:32 UTC
|
By spawn, I hope that implies a system() call? Then yes, If my solution requires no IPC, then I would use system()
What about POE?
| [reply] |
|
Yes definitly !
I would POE.
| [reply] |
Re: I prefer to:
by swampyankee (Parson) on Jan 15, 2007 at 04:39 UTC
|
What?
No linda?
No MPI?
(yes, I know they're not the same thing; MPI and Linda are true parallel programming paradigms).
emc
At that time [1909] the chief engineer was almost always the chief test pilot as well. That had the fortunate result of eliminating poor engineering early in aviation.
—Igor Sikorsky, reported in AOPA Pilot magazine February 2003.
| [reply] |
Re: I prefer to:
by arkturuz (Curate) on Jan 15, 2007 at 13:34 UTC
|
Godfrey: Yes, Hell: where Satan belches fire, and enormous devils break wind
both night and day! Hell: where the mind is never free from the
torments of remorse, and your bottom never free from the pricking
of little forks!
Duke: Nooo! Spare me the little forks!
Quoted from here.
| [reply] |
|
Knew that one without even looking :-)
| [reply] |
Re: I prefer to:
by OfficeLinebacker (Chaplain) on Jan 14, 2007 at 05:31 UTC
|
| [reply] |
Re: I prefer to:
by blue_cowdawg (Monsignor) on Jan 18, 2007 at 18:42 UTC
|
Once you get the threads out of the way, forking may
result in spawning... <evil grin>
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
| [reply] |
Re: I prefer to:
by margulies (Friar) on Jan 16, 2007 at 11:31 UTC
|
F**k, of course....
Oh no, wait... You said Fork....
Yeah, can be it too. | [reply] |
Re: I prefer to:
by Andrew_Levenson (Hermit) on Jan 18, 2007 at 11:42 UTC
|
Dance with reckless abandon.
C(qw/74 97 104 112/);sub C{while(@_){$c**=$C;print
(map{chr($C!=$c?shift:pop)}$_),$C+=@_%2!=1?1:0}}
| [reply] [d/l] |
Re: I prefer to:
by tweetiepooh (Hermit) on Jan 18, 2007 at 12:08 UTC
|
Sometimes I just use exec without the fork.
For example, one bit of code, running under cron, needs some environment settings made and rather than using a wrapper shell script I check the settings in the script and if not present make them then exec the script over itself.
Probably not the best or even a good way to do it but it does work. | [reply] |
Re: I prefer to:
by xiaoyafeng (Deacon) on Jan 16, 2007 at 06:13 UTC
|
| [reply] |
|
Spawn is a graphic novel and then a movie:
In the light of this background, spawning processes are like resurrecting running code from the ashes in a flawed agreement with the powers of darkness ;)
| [reply] |
Re: I prefer to:
by poqui (Deacon) on Jan 16, 2007 at 21:14 UTC
|
Thread; but on machines where that is not sufficiently supported I will fork. I don't believe that I have ever spawned. | [reply] |
|
| [reply] [d/l] |
Re: I prefer to:
by jesuashok (Curate) on Jan 15, 2007 at 02:09 UTC
|
| [reply] |
|
| [reply] |
|
do you mean sleep() -> fork() ? but, I meant fork() -> exec()
| [reply] |
|
Re: I prefer to:
by ambrus (Abbot) on Jan 27, 2007 at 12:45 UTC
|
I prefer lightweight user-level threads, like ruby threads. They are ideal for both simple coroutines and hiding the select calls.
| [reply] |
Re: I prefer to:
by neniro (Priest) on Jan 27, 2007 at 23:06 UTC
|
| [reply] |
Re: I prefer to:
by vili (Monk) on Jan 29, 2007 at 20:58 UTC
|
"We're forked."
-- Corey Ostman
| [reply] |
Re: I prefer to:
by johndageek (Hermit) on Jan 29, 2007 at 21:06 UTC
|
oooohhhh, you said FORK, suppose I shouldn't have voted with my glasses off. :(
| [reply] |
Re: I prefer to:
by OfficeLinebacker (Chaplain) on Jan 30, 2007 at 00:00 UTC
|
| [reply] |