Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
_yosefk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
76 ms
·
631.
▲
by
_yosefk
13y ago
OK, so how come Rob Pike calls his own Sawzall language parallel but not concurrent? I presented your way of looking at it in the article more than once and I said it was valid, just not the only one; then several comment threads emerge rei
632.
▲
by
_yosefk
13y ago
I think if the simulation is deterministic it's parallel, if it's OK with not being deterministic then it's concurrent; I'd fight to keep it parallel and not concurrent, but I don't know how hard it is, maybe in some cases you can't realist
633.
▲
by
_yosefk
13y ago
Pike's definition was "handling many things at once" vs "doing many things at once"; Sawzall or, to take a simple example he also used, a dot product where you compute sub-products in parallel, is basically doing one logical thing at a time
634.
▲
by
_yosefk
13y ago
Seriously? I mean, it can't be that hard; if the GPU code is written in OpenCL then it could be cross-compiled to the CPU instead of the GPU and then the checkedthreads checker or the Cilk checker or some such would be almost applicable to
635.
▲
by
_yosefk
13y ago
Care to elaborate? Specifically, what mechanisms are used for handling conflicts (two withdrawals from the same bank account), and what mechanisms are available for preventing/detecting conflicts (two tasks modify the same array index)?
636.
▲
by
_yosefk
13y ago
Sure; a parallel for loop with each task processing a[0], a[1], ... a[N] has no data races but if task 0 modifies a[0] and reads a[1], task 1 modifies a[1] and reads a[2], etc. then this loop is full of data races without there being anythi
637.
▲
by
_yosefk
13y ago
Task/data are orthogonal to concurrent/parallel. "Task parallel": compute a() in parallel with b(). "Data parallel": compute a(0), a(1), ..., a(N) in parallel. "Task concurrent" (not idiomatic, but hear me out): handle mouse events concurre
638.
▲
by
_yosefk
13y ago
OK, so here's another quote ( http://www.haskell.org/haskellwiki/Concurrency ): "This page contains notes and information about how to write concurrent programs in Haskell. If you're more interested in performance than non-determinism, lear
639.
▲
by
_yosefk
13y ago
If race detectors so behave, then they aren't very good race detectors - most aren't good, in fact, because they can't be very good, because they support concurrency (that's why Helgrind misses bugs and Cilkscreen doesn't), which was a part
640.
▲
by
_yosefk
13y ago
I see; deterministic by design then. I guess I'd trust myself without much tooling as well; my background is a hundred of developers hacking on a million of lines of code, hence my love for automated debugging tools.
641.
▲
by
_yosefk
13y ago
"It is almost like you didn't read my post." Seconded. "They provide forkIO as a basic tool to do both." Computers provide bits to do both and then some. You can call the ensuing distinctions "matters of convenience" and not "requiring diff
642.
▲
by
_yosefk
13y ago
So which terms do you suggest? What I was talking about was event handing systems needing different things than computational systems, and misapplications of tools designed for the former in the latter. The way I use the terms "concurrency"
643.
▲
by
_yosefk
13y ago
Well, I wouldn't call that "concurrency" just because there's a queue in it - I'd call it "parallel but not concurrent"; or we can call it differently - I really don't claim to use the terms in "the right way" - but that's what I was referr
644.
▲
by
_yosefk
13y ago
I'm sorry if I misrepresented the way things were in Rust; I also gleaned from some places that you might add things like parallel loops in the future, and was pretty sure that you were heading towards the same place as, say, Haskell where
645.
▲
by
_yosefk
13y ago
The vast - VAST - majority of computing power in the world today is standalone devices (PCs, phones, tablets and innumerable embedded crap with stunning horsepower - each car has ~90 microprocessors for a single example). Most of these st
646.
▲
by
_yosefk
13y ago
It's like you said, roughly, though it's certainly possible to use a system designed for concurrency without introducing non-determinism - by not letting the queues provided by the system (message queues, STM, locks, thread-safe data struct
647.
▲
by
_yosefk
13y ago
From here: http://www.haskell.org/haskellwiki/Concurrency "This page contains notes and information about how to write concurrent programs in Haskell. If you're more interested in performance than non-determinism, learn about parallelism
648.
▲
by
_yosefk
13y ago
I think that according to standard terminology, syncing accesses to mutable data does prevent all data races - but not all race conditions : http://blog.regehr.org/archives/490 (Race Conditions vs Data Races) The nice thing about elimi
649.
▲
by
_yosefk
13y ago
I think that this angle adds another dimension - dealing with latency and not letting it hurt throughput. The problem could be "embarrassingly parallel" - 10000 processes with 10000 sockets not ever interfering with each other - or it could
650.
▲
by
_yosefk
14y ago
I'd be glad to discuss this over email if you like; the upshot is that I don't think there's anything formally proven anywhere along the way, but it might be interesting to discuss if it theoretically could be (that is, given a hypothetical
651.
▲
by
_yosefk
14y ago
OK, so I picked the 2-clause FreeBSD license for brevity; hope this helps.
652.
▲
by
_yosefk
14y ago
OK; I kind of thought WTFPL was a good enough license and mine was pretty much similar except for the F part. Since I got 3 different people asking for a license, I might as well find one. I'd like something really permissive that also le
653.
▲
by
_yosefk
14y ago
Well, yeah. The reason such reordering is worth mentioning is because it's necessary for instrumentation to do its thing, and because in practice, we've found that this finds a load of bugs by itself; which is good because instrumentation i
654.
▲
by
_yosefk
14y ago
Well, no formal proof, but give me one counter-example and maybe we can work from there :) The post does have an informal kind of "proof" (there are various degrees of "formality"...) where I cover the various cases. What's "all of the nece
655.
▲
by
_yosefk
14y ago
My README.md says the code is "free" as in "do whatever you want with it" - isn't it good enough? As in, does the license have to be in some specially-named file or what-not?
656.
▲
by
_yosefk
14y ago
Depending on how you look at it :) * It does work in the sense of reordering every pair of instructions that could ever run in parallel. * It doesn't work in the sense that results aren't changed; this is true for a lot of more likely progr
657.
▲
by
_yosefk
14y ago
Glad to hear that - and do contact me (Yossi.Kreinin@gmail.com) if anything goes wrong, or if you need a feature. It's working very smoothly for us, to the point where nobody is worried about parallelism bugs any more - but while it's basic
658.
▲
by
_yosefk
14y ago
I specifically said "1000 linked lists" with an unknown amount of nodes in each. "Just keep four cursors" - why four and not N? This involves rather ugly and not quite portable/"scalable" code (different processors can issue different amoun
659.
▲
by
_yosefk
14y ago
You don't need 4 times the memory pipelines. If you have one pipeline and cores issue few enough requests for bandwidth to not be a problem, then contentions between cores only cost you 0-3 cycles of latency , which is a tiny cost compar
660.
▲
by
_yosefk
14y ago
I didn't claim to disprove Amdahl's law - I argued with an assumption based on "Amdahl's law" that I put in quotes, exactly because there's a leap from real Amdahl's law to something that doesn't follow from it in that line of reasoning. Wh
More ›