Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I really liked this. This is the first instance of a time scale for computing that really made sense for me. It's a really good mental metaphor that cleared up how computers work in a way to this script kiddie.

Extending that thought to multiple cores/threads. Comparable to a small business in a way? You have one guy who can go tell other people to do certain tasks. They take anywhere from a few minutes to a few hours. You can set it up so that there is a task list of things for people to do so that you don't have to continually reassign each one, just tell them to pick up the next thing to do. It's much harder and requires more organization, but ultimately, like the division between a small business and a one man show, you get more shit done with multiple people/threads/cores working in parallel than one single unit working by themselves.

Thanks for posting this.



>Extending that thought to multiple cores/threads. Comparable to a small business in a way? You have one guy who can go tell other people to do certain tasks.

Depends on the architecture, actually. What you're describing is a lot like the Cell processor design. For x86-based processors, it's much less organized than that, because each core is, for all intents and purposes, effectively an independent processor.

The best analogy for multithreaded programming I've come up with is a(take a drink) car factory. Each core is a generalized assembly line that is capable of producing any part, but it takes time to switch to a different task. The end goal is a car, which means that you can have one core working on the transmission, one core working on the interior parts, one on the exhaust, and one working on the motor. If you can balance them out, you can have all of them finish around the same time. But if you're trying to actually make a car, you're going to end up with some overhead to finish the entire thing. There is some overhead where the body is made, and all the parts that were produced by the other lines are actually put into the car.

Compared to a single-assembly line factory, it's possible to make cars much faster with multiple lines. But there will always be some percentage of time that you cannot split across multiple cores.


Ahhhh. There is a nonzero cost for going about organizing all the tasks. No matter how many ways you can divide the task, even if you don't actually divide it up, there is always a nonzero time at the end that you have to everything on hand to make the final product. Is that a good way of thinking about it?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: