 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers wrote:
> Not quite; you COULD implement scheduling / task switching in a single
> thread. It would just be too much hassle when real threading is available.
Actually, if you get a good library for it, it can be beneficial in several
ways.
For example, Erlang does this (one thread per core) and supports hundreds of
thousands of concurrent threads (which would easily blow the stack and the
scheduler if you used OS threads).
Tcl uses this approach (unless you opt for threads, of course) with the
advantage that events that occur are serialized, so you can write code to
handle events coming in from sockets that update shared globals without
worrying about locks. Of course, if you have multiple cores, you're kind of
screwed performance-wise with this approach, which is why Tcl supports real
threads as well. Works great on a single CPU per process, tho.
The drawback is that without continuations as well (Tcl doesn't do lambdas
any better than C++ does), it's hard to coordinate stuff sometimes, because
you're always coming in at the top level. You have to turn all your loops
inside out, basically.
I was thinking of looking at the Python asyncore module (which is what does
this sort of thing for Python) and seeing if I could combine it with yield
and send() to make lightweight isolated threads. Would be very cool.
--
Darren New, San Diego CA, USA (PST)
My fortune cookie said, "You will soon be
unable to read this, even at arm's length."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 3/8/2009 2:35 PM, Nicolas Alvarez wrote:
> Most GUI toolkits either provide a function that blocks waiting for an
> event, or take over control and call your callbacks (ie. event loop inside
> the toolkit). How can you call anything else meanwhile?
Use a GUI toolkit designed with task scheduling on a single CPU w/o
hardware interrupts.
What you're asking is like asking, "How can you implement raytracing
with a graphics engine designed for scanline rendering?" The answer
being, of course, "Use a different engine" :)
--
...Chambers
www.pacificwebguy.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 3/8/2009 2:38 PM, Orchid XP v8 wrote:
> That's what amused me about the "buy 8 blade servers and get the blade
>
> Wow, big deal. :-P
Hey, that's 11% off - I see stores running specials like that all the
time :)
--
...Chambers
www.pacificwebguy.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
D***, your job sounds fun :)
--
...Chambers
www.pacificwebguy.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> Mine is configured like this:
>
> - Dual redundant PSUs.
> - 2x quad-core Xeons at 2.0 GHz. (Yes, you read correctly. That's 8
> cores in total.)
> - 4x 1 GB RAM (i.e., 4 GB RAM on two channels.)
> - 6x SAS 72 GB HDs spinning at 10,000 RPM. (Configured as two RAID-1
> arrays with one hot spare and one cold spare.)
Muhuhuhuhuh!! Check out the attachment. LOOK AT ALL THOSE CORES!!! 8^D
Post a reply to this message
Attachments:
Download 'cores.png' (19 KB)
Preview of image 'cores.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers wrote:
>
> Did the world end when it finished? :0
>
Answer that question yourself. :P
--
~Mike
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers wrote:
> On 3/3/2009 7:59 AM, Mike Raiford wrote:
>> Then I changed it so it played itself.
>
> And it realized the futility of war :)
>
Oh, good one :) Wargames ...
--
~Mike
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 3/9/2009 10:29 AM, Mike Raiford wrote:
> Chambers wrote:
>> On 3/3/2009 7:59 AM, Mike Raiford wrote:
>>> Then I changed it so it played itself.
>>
>> And it realized the futility of war :)
>>
>
> Oh, good one :) Wargames ...
>
Yeah, that was a fun movie. Haven't seen it in ages, though. I wonder
how well it's aged?
--
...Chambers
www.pacificwebguy.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 3/9/2009 2:46 AM, Invisible wrote:
> Muhuhuhuhuh!! Check out the attachment. LOOK AT ALL THOSE CORES!!! 8^D
That's nothing :)
Check out this shot from an article titled, appropriately enough, "A
(http://blogs.techrepublic.com.com/datacenter/?cat=31).
--
...Chambers
www.pacificwebguy.com
Post a reply to this message
Attachments:
Download '256lp-hpsuperdome-sm.jpg' (57 KB)
Preview of image '256lp-hpsuperdome-sm.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers wrote:
> Check out this shot from an article titled, appropriately enough, "A
> Task Manager view that makes me jealous — 256 cores"
I thought this was pretty funny - giant SSD RAID. The video's a lot more
amusing than it sounds, especially starting about 1:15 in if you want to
skip the set-up.
http://www.youtube.com/watch?v=96dWOEa4Djs
--
Darren New, San Diego CA, USA (PST)
My fortune cookie said, "You will soon be
unable to read this, even at arm's length."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |