52 points · by jaydub · 18y ago · 98 comments
Nevertheless, you can still see what Paul is trying to get at: CS curriculums are woefully under-preparing their students for a parallel world.
It's worth pointing out that the "speed-of-light collides with 20+GHz serial processor" See http://www.hppc-workshop.org/HPPC07/Vishkin_HPPC07.pdf
However, if universities start teaching programming with pure functional languages (which is highly unlikely), concurrency becomes a much easier topic for discussion.
Perhaps this is the sort of thinking that will lead to more universities adopting something like PLT Scheme, which in recent versions, has moved the notion of mutable pairs into a library. Doing this might bring functional languages out of academia and more into the mainstream, which would be fantastic.
I remember fellow students having trouble grasping pointers, even after a 2nd year architecture course, which I thought was completely absurd since they were writing assembly code without tremendous strain.
One of the things that doing good OO and following the Law of Demeter does for you is to reduce the levels of indirection you have to deal with to one or two.
It's not the notation, it is the concept.
The old CodeWarrior debugger was great for this. Lots of windows you could pop up for every in-memory object you cared about. sigh
I agree. I don't think it should start from CS1, but you can start with the Dining Philosophers problem in CS1 to introduce the ideas of locks and starvation.
that is because you have slept through the entire revolution of share-nothing concurrency
Hyperbole, hyperbole, hyperbole <-- summary of this article.
Poll.transaction { increment!(:results_counter) }
This worked fine with one mongrel in our dev and test environments but when we threw that out to our cluster of mongrels, we got all sorts of locking errors when a torrent of people would vote. To resolve the issue we had to add:
Poll.transaction{ lock!; increment!(:results_counter); }
If this isn't a bottleneck or leaky abstraction then I don't know what is. Locks are ugly and I consider them a hack. In our case an RDBMS probably isn't the best data store solution.
it will be. you're getting beaten over the head by chip designers telling you that your future cpu is going to consist of a (possibly large) array of processing cores with a high-capacity bus connecting them. they are telling you this is the only way they can give you higher performance. you had better start believing them because these systems are starting to get delivered now.
A great example of that is Rails, when set up with mongrel processes, each of which can run on its own core if necessary
?????? so mongrel comes with its own OS kernel that has better support for multicore than linux and freebsd? wow!! coolzzz!
Hi. You may not have noticed it, but this site is not Reddit. Please try to keep commentary like this to a minimum, where 0 is the minimum.
Anyway, please also read the posts you are replying to. They are saying that many applications get concurrency "for free", since the database library handles the concurrency for them. Yes, this can be a bottleneck, but it is a fundamental problem with the notion of locking. If you want maximum performance, don't lock. If you want absolute data integrity, you have to lock. That's a problem.
Concurrency should definitely be a part of CS programs, but Intel's thread library isn't the way to do it. CL-STM or Haskell's STM would be much better.
If your chip designers are telling you that they're building a large array of procesing cores connected with a high-capacity bus, you need to get some new chip designers.
If you've got a bus that can actually support a modest number of cores, your cores are too wimpy and should be built with whatever was used for the bus.
More likely, you actually have a saturated bus that is the system bottleneck, so your cores are spending most of their time waiting for access.
There is no silver bullet. Many problems are bound by bisection bandwidth. The more cores, the worse the problem. You end up devoting proportionally more space and power to communication as you increase the number of processors.
Sorry, but I don't buy that. We're also moving to a thin client world where we don't actually need that much power on our thin clients.
Of course the chip makers are saying that - they want to sell more chips. They have to come up with some other number they can increase.
Do you really think performance doesn't need to be increased from the current status quo? The number of cores will only go up from here.
Yeah, we've heard it before, several times, from the moment that networking was invented and onwards. Why will the push for this stick _this_ time around?
then you clearly aren't buying new high-end servers for data crunching either, because these are already multicore
In fact, quite the opposite. Handling concurrency by having multiple share-nothing processes relies on the OS to handle the scheduling and core assignment.
edit: "real" (system) processes.
Let me make that point even clearer: I don't give a shit how the database has been programmed. Someone there has obviously had to think about parallelism, but I don't need to, because I'm not writing a fricken database.
Got it?
then stop spouting off uninformed comments about how processes are scheduled
The Rails applications themselves don't need to be altered to run in a multi-core environment.
nor do any other program compiled for that architecture. its the OS that schedules processes, not your userland program. the point is, some programs can be written in a way that makes it easier for the OS to exploit multicore. since ruby is not a functional language, my guess is that it would tend to not help the kernel exploit these resources. but obviously in the worst case, a process can run inside one core and never get the advantages of the rest of the chip architecture. this is about exploiting multicore
Got it?
yes, i get that you know very little about how computers function
It is a complex issue. I taught myself to program at 16 to play blackjack. 41 years later, I am still creating and playing games (not video games). For over thirty years I worked for supercomputer companies. Along the way, I went to grad school and formalized my education.
I believe my experience is not atypical. My students who succeed as CS are ones who at some point have a passion to solve a problem and are intent on gaining the skills to do it. Some start from flow charts and pseudo code; some start by debugging an empty file.
What does this mean for this discussion? I don't care whether we view sequential as a special case of parallel; or parallel as a special case of sequential. Ideally, I'm going to help my students have the thinking skills and the experience to solve interesting problems by cutting code with threads, with MPI calls, via Cuda, or just with other code. But there is no question that many of the rarified programming skills of my supercomputer days are fast becoming everyday programming skills.
+
Concurrency is a unsolved problem. There are locks etc; there's smalltalk/Erlang pure-message passing and Web Services/SOA (it's concurrency). Concurrency is of academic interest, and niche apps (game engines; simulations; etc.
=
unsolved problem that is not needed... so far, anyway
Donald Knuth's skepticism over the benefits of concurrency makes me want to rethink my own assumptions.
I haven't really seen anyone describe the changes that should be made to curricula. Do any educators on this thread have specific changes in mind?
What would be interesting would be a kind of "complex systems" programming, stuff like cellular automata, but maybe it is impossible to make them tractable enough.
Also, aren't the most performant "parallel computations" simply specialized matrix operations. I am not sure if learning specialized and hard to understand programming languages for parallel computation are the best way forward.