Arc Forumnew | comments | leaders | submitlogin
Ask PG: using Arc to take advantage of manycores?
2 points by prakash 5748 days ago | 5 comments
How does Arc plan to take advantage of multicore processors?


4 points by stefano 5747 days ago | link

I think mzscheme uses green threads (not sure about it), so the only way to use more than one processor is to run more than one Arc interpreter.

-----

5 points by drcode 5747 days ago | link

Yeah, arc uses green threads...

I actually spent like two hours one day parallelizing some arc code I had written so it would use both CPUs in my laptop...

...I was quite dismayed when only one of my CPUs got pegged at 100% after all that work :-(

I hope the plt-scheme team will address this issue and indirectly fix arc in the process...

-----

2 points by fallintothis 5748 days ago | link

"It has threads and a way to say a chunk of code should be executed atomically. No more than that at the moment. Nor is there any explicit notion of a processor. I'm not sure how that will turn out."

http://news.ycombinator.com/item?id=32801

-----

1 point by almkglor 5746 days ago | link

Re: "chunk of code should be executed atomically" - I'm not 100% sure but I think it's possible that (from the way 'atom is implemented) a sequence that is not protected within an 'atom scope will be able to see an "atomic" operation in progress.

Basically 'atom just acquires a Global Interpreter Lock around the function it executes. I'm not sure, but from the semantics of locking, I think that another thread may see the "atomic" operation step-by-step unless it is itself protected by 'atom (and then there is potential contention for a single global lock!)

Of course, mzscheme uses green threads, so maybe it won't work that way.

-----

1 point by prakash 5747 days ago | link

I'm not sure how that will turn out."

That's the part I want to know more about. Thanks for the link.

-----