Slashdot Mirror


Will Pervasive Multithreading Make a Comeback?

exigentsky writes "Having looked at BeOS technology, it is clear that, like NeXTSTEP, it was ahead of its time. Most remarkable to me is the incredible responsiveness of the whole OS. On relatively slow hardware, BeOS could run eight movies simultaneously while still being responsive in all of its GUI controls, and launching programs almost instantaneously. Today, more than ten years after BeOS's introduction, its legendary responsiveness is still unmatched. There is simply no other major OS that has pervasive multithreading from the lowest level up (requiring no programmer tricks). Is it likely, or at least possible, that future versions of Windows or OS X could become pervasively multithreaded without creating an entirely new OS?"

36 of 657 comments (clear)

  1. It makes sense with multi-core cpus by Thaidog · · Score: 5, Informative

    OSes like BeOS and Zeta are ahead of their time. With 8 core cpus coming out soon it just makes since with this technology... no programming tricks are needed.

    --

    ||| I still can't believe Parkay's not butter.

    1. Re:It makes sense with multi-core cpus by Anonymous Coward · · Score: 4, Interesting

      too true. The linux kernel beats the beos kernel in threading benchmarks, but the entire Be OS GUI stack (kernel, display, windowing, controls) were designed with multithreading in mind. X/KDE/GTK et al are relics based on 1986 era computing.

    2. Re:It makes sense with multi-core cpus by tolan-b · · Score: 4, Informative

      Haiku is coming along very nicely though, and it's open source.

    3. Re:It makes sense with multi-core cpus by LiquidCoooled · · Score: 4, Funny

      Haiku from BeOS
      Multitasking all programs without delay
      Open source victory

      --
      liqbase :: faster than paper
    4. Re:It makes sense with multi-core cpus by Your.Master · · Score: 4, Funny

      Five, Seven, and Five That's how a Haiku should go Not like you did it

    5. Re:It makes sense with multi-core cpus by TheRealMindChild · · Score: 4, Funny

      Good job I am a software developer and not an English teacher isn't it?

      I don't think so.

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    6. Re:It makes sense with multi-core cpus by Anonymous Coward · · Score: 5, Funny

      Seven syllables
      Not seven? so use gzip
      compress the fucker


      ;)

    7. Re:It makes sense with multi-core cpus by jbrader · · Score: 4, Funny

      You were allowed you to graduate...

      Hahahahah! I found an error in your grammar rant, now you look even stupider than the guy you were trying to talk shit about. How does that feel you pedantic ass?

      --
      You are so boring that when I see you my feet go to sleep.
    8. Re:It makes sense with multi-core cpus by billcopc · · Score: 5, Insightful

      I don't understand this logic that a "full featured" operating system has to be slow. What the hell are you OS designers doing that's eating up all the juice ? Just because Windows XP preloads a gazillion binaries doesn't mean it's a good idea.

      An operating system's job is to mediate access to hardware and software resources. The fact that every modern OS is madly bloated is just proof that the world's OS developers are ADHD suburban twits getting lazy and gratuitous with fluffy GUI features, when really they should be focusing on two core things: device drivers and the almighty scheduler.

      Just think about it: Windows Vista is, on average, 10% slower than XP for generic tasks and gaming. Why the hell is that ? Someone fucked with the kernel and stuck things in it that don't belong there, like that ever-annoying popup security model.

      It's like any other optimization job: you tighten the hell out of the most frequently-called code snippets like the scheduler and memory manager. If your scheduler is so contorted and polluted that it can't even fit in the L1 Cache anymore, you should be beaten with your keyboard!

      The BeOS guys probably had a plan, along with some good brains and coding skill, and they stuck to that plan. If a feature isn't in the plan, it doesn't get coded; the system stays lean and fast, and you let the application developers handle all the shiny stuff. That's how it used to be, and still is in some circles... but not Windows nor Linux. That's where we went wrong.

      --
      -Billco, Fnarg.com
    9. Re:It makes sense with multi-core cpus by man_of_mr_e · · Score: 4, Informative

      There are many factors that define the performance of an OS. One of them is the number of features it provides, and another is the timetable in which said features are delivered. Yet another is legacy compatibility.

      BeOS was new. It didn't have to be compatible with anything. But give it 10 years, and 2 Gazillion hacks to let old software continue to work. Give it hundreds or thousands of features, many of which are probably no longer even used by many people, but still have to be there because some small subset needs them. Give it features built upon other features and security patches upon other patches.

      Commercial software vendors seldom have the ability to ship software when it's ready, they have to meet timelines. Look at OS X, each new release cycle takes longer and longer because as the OS matures, it takes more and more time to wade through the existing code to change it. It gets slower because more conditionals have to be added to check for compatibility or security issues, or because it needs to do more than it used to.

      Linux (the kernel), on the other hand, seems to get better and better, faster and faster, with each new release. There is a reason for that, though. No commercial pressure to release, they can set an arbitrary release date and simply ship whatever features are ready, and do so relatively frequently because they don't have to worry about a large and complete OS release, just the kernel.

      Distro vendors, on the other hand, seem to be taking longer and longer between releases (not counting Debian, which has always been glacial), because as the body of software grows, it takes more and more work to maintain it. Distro quality depends largely upon how long they spend stabilizing releases.

  2. That's nothing... by Anonymous Coward · · Score: 4, Funny

    Back in the OS/2 days, we could format 72 floppies simultaneous with no slowdown to our 14.4 connections!

  3. Microsoft's plan is to keep adding cores... by Joce640k · · Score: 5, Funny

    Microsoft's plan is for us to keep adding CPU cores in the hope that at least one of them won't be deadlocked at any given moment in time.

    --
    No sig today...
  4. Multithreaded won't be optional any more. by cmowire · · Score: 5, Insightful

    Given that most machines are already starting to come default with 2 cores, and you can fit 8 cores (2 CPUs) in a nice desktop package, it's pretty clear that it's going to be a requirement.

    It's not entirely the operating system's fault. The biggest advance of BeOS wasn't necessarily just that the kernel was designed to multithread nicely, Be also did their best to force you to write multithreaded code when you wrote a Be application.

    I suspect that the first thing that's going to become clearly a performance bottleneck is the applications. And that's not going to be fun, because there's a lot of applications out there and you can't just magically recompile them with threads turned on and see much difference. You need to synchronize the data structures for multiple threads touching them at the same time and split things up so that you can actually keep a decent number of cores busy. This is not trivial when you are talking about an app that somebody wrote single threaded in the mid 90s without any notion that threads might be useful later.

  5. I hope so by datapharmer · · Score: 4, Interesting

    I still hate that BeOS went belly up. It was a great operating system but was crushed before it ever got very far. The hardware support was also amazing: it would run winmodems and other windows only hardware. I've never tried writing an operating system, but I hope some of the features from BeOS make it into linux/OSX. One interesting thing to note is Be was originally a mac alternative and was only later moved to x86.

    Another cool operating system to check out is MenuetOS... it is written entirely in Assembly! Very fast boot times and the GUI and eevrything fits easily on a floppy!

    --
    Get a web developer
  6. Re:Question... by cmowire · · Score: 5, Funny

    BeOS was like JFK.

    The both got gunned down before we could possibly see any downsides to them.

    There were a few architectural decisions in BeOS that I felt would have resulted in great amounts of pain and suffering 10 years later.

  7. Threading isn't any easier when it is pervasive by mwadams · · Score: 5, Interesting

    It isn't really the pervasive multithreading that does the job on responsiveness for BeOS, and nor does having the "two threads per window" thing (which I think is what the poster is referring to in terms of "pervasive multithreading) avoid "programmer's tricks" - in fact, you have to be just as careful as if you were developing with Windows, and span up a background thread. One issue for BeOS developers was the amount of hard thinking you had to do to perform simple tasks in a pervasively multi-threaded environment, when you're still having to deal with all the pitfalls of lock-based programming.

    However, taking only a few cycles to spin up or kill a thread (rather than the 10,000 plus it takes Windows), or perform a context switch, is a significant help. (There used to be an interesting article benchmarking those things on the Be website, but I can't find it any more).

    MS have also added some more interesting stuff to the scheduler in Vista, which helps with uninterrupted sound or movie playback, so at least some of that stuff is possible without a complete redesign.

  8. BeOS rocked! by Anonymous Coward · · Score: 4, Interesting

    A few years ago, on a Dual Celeron 366Mhz with 256MB of RAM, I went out of my way to attempt to crash it. I opened about 120 OpenGL demos with only minor decrease in performance. After inherriting that mainboard, processors and RAM from my uncle and then increasing it to 512MB, the same test ground both FreeBSD and Linux to a halt.

  9. I don't get it by nanosquid · · Score: 4, Insightful

    The ability to play eight movies simultaneously is a bad way of determining OS thread performance. Most modern operating systems have efficient, low-overhead threads. How well they play multiple videos depends much more on the display pipeline, the codec, and how the players adapt to load. To say anything about system performance, you'd need to know frame rate, resolution, codec, postprocessing options, etc.

    Overall, I really don't see anything in BeOS that you don't get as well or better in a modern Linux system. BeOS has some efficiency gains from having been developed from the ground up with little need for backwards compatibility, but that's probably also why it wasn't successful in the market. And threading and scheduling in particular are highly efficient and mature in Linux.

    (Not that OS X is basically a hacked NeXTStep; the NeXTStep kernel is Mach, the same kernel that is the basis of the GNU Hurd.)

  10. Haiku by Keruo · · Score: 4, Funny

    Is not haiku(beos) open source?
    Take the features and port to linux.
    New scheduler rules them all.
    Speed improvements would increase the desktop performance.
    As they would increase performance with services.

    --
    There are no atheists when recovering from tape backup.
  11. Tried (for Windows) and killed by gnetwerker · · Score: 4, Interesting

    Recall that this was the effet of Intel's NSP (the ill-named "Native Signal Processing"), a real-time multui-thread scheduler inserted at the device-driver level of Windows. Combined with something called VDI (Video Direct Interface), which allowed applications to bypass the Microsoft GDI graphics layer in certain ways, this allowed multiple video, graphics, and audio streams, mixed and synchronized, on circa-1993 computers, something largely not even possible today. While NSP was intended primarily for media streams, its technology was broadly applicable to more responsive and vivid interfaces. The result was Microsoft's threat to cut off Intel from future Windows development and specifically to withhold 64-bit support from Itanium, to more publically support AMD (which they did, for a while), and to threaten any OEMs using the code with withdrawal of Microsoft software support. Much of this was detailed in the Microsoft anti-trust trial and the accompanying discovery documents. Under this pressure, Intel abandoned the software, transferring VDI to Microsoft (it formed the core of what was later called DirectX), and outright killing NSP. Andy Grove admitted to Fortune magazine "We caved." (http://cyber.law.harvard.edu/msdoj/transcript/sum maries2.html) This is not to suggest that this was the best or only way to do this, or that others haven't done it and done it well. But despite the best efforts of Linus and friends, Windows remains the dominant desktop OS, and Windows continues to be built on a base of 1970s-era operating system principles. Microsoft has, and continues to, build substantial barriers to anyone trying to substantially modify the behaviour of Windows at the HAL/device layer. Whether VMWare and equivalent virtualization technologies are finally a camel's nose under the tent edge remains to be seen. But as long as Windows remains the dominant desktop OS, you can expect the desktop to lag 10-15 years (at best) behind the state of the art in OS, GUI, and real-time developments.

    1. Re:Tried (for Windows) and killed by CajunArson · · Score: 4, Insightful

      Windows continues to be built on a base of 1970s-era operating system principles.


      Thank Gawd Linux isn't using any relic of an OS that started in the 1970's as its base! No, no, all 100% 21st clean legacy-free implementation there.

      On a more serious note, I used Beos myself back in the day. It was definitely more responsive than Win98 was, but not everything was perfect either. The networking implementation absolutely sucked. Oh, it had lots of threads, its just that the threads were not all that beneficial to actual performance. The networking stack and some other forms of processing in the system that handle streams of many relatively similar tasks would probably parallelize better via a pipeline scheme where parallelism is achieved by having independent stages of the pipeline run in parallel (much as CPUs break up the task of executing instructions into a pipeline). The type of parallelism that works best can depend on the application, and the one-size fits all philosophy is not usually correct no matter what the solution is.

      --
      AntiFA: An abbreviation for Anti First Amendment.
  12. Yes by MarkPNeyer · · Score: 5, Interesting

    I'm a CS grad student at the University of North Carolina. I've never used BeOS, but I'm confident that responsiveness will increase, because the work I'm doing right now is attended to address this very issue.

    The thing that makes multi threaded programming so difficult is concurrency control - it's extremely easy for programmers to screw up lock-based methods, deadlocking the entire system. The are newer methods of concurrency control that have been proposed, and the most promising method (in my opinion) is 'Software Transactional Memory' which makes it almost trivial to convert correct sequential code to code that is thread-safe. Currently, there are several 'High Performance Computing Languages' in development, and to my knowledge, they all include transactional memory.

    The incredible difficulties involved in making chips faster are precipitating a shift to multicore machines. The widespread prevalence of these machines, coupled with newer concurrency control techniques will undoubtedly lead to an increase of responsiveness.

    --

    My blog
  13. Re:Question... by cmowire · · Score: 5, Insightful

    I believe that's covered by "There were a few architectural decisions in BeOS that I felt would have resulted in great amounts of pain and suffering 10 years later."

    Rewriting things from the ground up, without acceptable justification, has never been an effective strategy.

  14. Amiga beat them all by Anonymous Coward · · Score: 4, Informative

    Serious back in the mid 1980's I used to love putting PC and Mac owners to shame by showing them literally dozens of open, active graphics applications displaying animations, while formatting a floppy disk, and downloading a file online, and still having a normal responsive system with no hic-ups, all in a computer with on 128MB RAM.

    Amiga was a multi-tasking, multi-threaded OS, with multiple processors (graphics and I/O were separate co-processors operating on opposite clock cycles from the CPU, and the graphics co-processor could be dynamically loaded with special executable code).

    It was so far ahead of it's time that people today still don't believe it existed in the 80's when I tell them about it.

    But just because it was better than everything else did not assure it's success. A concept the BeOS fanbois might be familiar with.

    1. Re:Amiga beat them all by nogginthenog · · Score: 5, Insightful

      128MB? In the mid 80s? Maybe you mean 4Mb :-)

    2. Re:Amiga beat them all by GreggBz · · Score: 5, Informative

      Hey, I'm all for Amiga's but in the mid Eighties, if you had 128MB of ram and was downloading a file online, you must have been from the future.
      What the heck are you talking about?

      Just to be a little more correct here, I'm no hardware engineer but will try to be far more accurate.

      The Amiga had a great messaging system in it's OS, you could easily pass messages to other windows and programs in intuition. Further, you had all that ARexx stuff, and you could script programs to interact very easily with it. Basically, every program could listen on it's own ARexx socket for commands from other programs. Of course, there was the poor (read, no) memory protection which made things very unstable if you did not know what you were doing. Despite all this cool stuff, the OS was actually the weakest link. It was rushed. I remember reading specs on the original intended, but non-implemented file system, and it was about as robust as a single user file system could possibly get.

      You also had preemptive multitasking (not true co-operative) and a fantastic unified memory architecture with a very fast blitter. Another nice thing was
      that the kernel was contained on ROM so that it booted quicker then any other platform of it's day, and still faster then most this day. And all those chips played nice
      and were synced to an internal clock that ran on NTSC (or PAL) timings. This, of course, meant that interrupts worked seamlessly, and the chipset was handily compatible with video signals from television equipment. That last thing turned into an incredible boon for the entire film and television industry.

      The strength of the Amiga was it's bus and it's architecture. They absolutely nailed so many things in it's design, it really was a thing of beauty.

  15. Re:We had different programmers 10 years ago by bratboy · · Score: 4, Insightful

    Bah. Today's programmers aren't better or worse than they were ten years ago - they're just distributed differently. Programming video games on a console is an exercise in (frustration) poor tools, worse documentation, highly constrained memory / CPU / IO / bus, multiple threads utilitizing multiple specialized processors, microcode, assembly, etc. Ditto for cell phones. Not so for business applications.

    So yes, if you mean "developers of business applications aren't generally hardcore down to the metal programmers," then I'd agree with you. John Carmack and Michael Abrash would be bored out of their skulls working on UI issues for Quicken 2008. And, given their aesthetic sensibilities, they wouldn't necessarily be the best choices (just *try* to balance your checkbook).

    But if you mean that great programmers are no longer among us, then I'd say that you should change jobs, because it's more likely that they're simply not around *you*.

  16. Multithreaded Windows by Tablizer · · Score: 5, Funny


    [BSOD]

      . , . . , . . [BSOD]

      - . [BS0D]

    [BSOD]

      . . , . [BS0D]

      - . [BSOD]

  17. Re:We had different programmers 10 years ago by dc29A · · Score: 4, Insightful

    Bah. Today's programmers aren't better or worse than they were ten years ago - they're just distributed differently. I am not so sure. I remember my first C++ class in college, we didn't touch C++ for at least half the semester (well almost). We learned the basics of OOP and the rest of time was spent on learning how compilers compile code. We also learned a lot of assembly. Hell, in mainframe assembly class we wrote an entire assembler. Bonus points were given to people who used their own assembler to generate the code of the assignment.

    While C++, assembly and C might no longer be "cool", it definitely teaches people how to write optimal code, how to debug efficiently, understand a wide variety of computing concepts.

    The same college today is too busy teaching C# and Java. While those languages are nice and all, not teaching low level C, C++ and assembly IMO leads to sloppy coders, people who don't understand the byte code generated, people who don't mind wasting system resources because hey ... the garbage collector will take care of it.

    I was nearly crucified when I suggested my boss to recode a piece of an application in C so it scales better than the current shitty VB COM version. He just looked through me and said: add another server! Lot of today's code is written by people who don't even understand how the code is getting executed.
  18. Re:No Maybe Yes by someone300 · · Score: 5, Informative

    X is being fixed, thankfully (finally). There are a lot of interesting projects, including but not limited to Xegl. Xegl, is the long term goal of the X server and pretty much reduces the X server to a tiny part of the system, basically mediating the input devices, rotation and display management and TCP/over-the-wire GL, if I understand correctly, by using the Embedded GL specifications.

  19. Re:No Maybe Yes by PacoTaco · · Score: 4, Funny

    This is a multithreaded comment, right?

  20. Re:We had different programmers 10 years ago by Original+Replica · · Score: 4, Insightful

    I was nearly crucified when I suggested my boss to recode a piece of an application in C so it scales better than the current shitty VB COM version.

    His reaction likely had little to do with code and alot to do with business. To managment's ears you said "This part is done, but I want to take time and money and re-do it really shiny." Now if craftsmanship meant anything in terms of the sales of software, you may have been listened to. But since the hardware companies are all too quick to step up and offer a new gizmo that will have you computer running "blazing fast", the consumer thinks that the sluggish performance is a hardware problem. The end result of all of this is the management of software companies sees little to no reason to take any more time or money than necessary to make a program clean and efficient.

    --
    We are all just people.
  21. Re:Question... by iluvcapra · · Score: 5, Interesting

    This is good, I like this political stuff:

    MS-DOS 1.0 was Herbert Hoover, aloof to the problems of the common man but friend of the engineer in all of us. Also discovered Transformers.

    Mac OS 7-8-9, all Franklin Roosevelt, very competent, lead us through difficult times, but left a legacy of programs which have become quite a mixed bag.

    Windows 3.1, Dwight Eisenhower, amiable enough, competent, but leaving historians (and many contemporaries) very wanting.

    Windows 95 thru ME, Lyndon Johnson, one of the boys, very able at getting things done, but in the end a disaster, rightfully ceding his throne.

    Windows NT, Richard Nixon, the archetypal back-room politician, ruthless, and ultimately brought down by little faults, but many believe he was a great president and did much to modernize the Republican Party.

    Windows XP, Ronald Reagan, everybody who hates him never met him, he could charm anyone, the Great Communicator. Bought Iranian weapons for contras with drug money.

    Mac OS X, Bill Clinton, cheerful and smart, if not the most productive. Known for his speeches.

    --
    Don't blame me, I voted for Baltar.
  22. Re:Is High Performance Computing Really the Goal? by blankaBrew · · Score: 4, Insightful

    I'm so sick of hearing that most users don't need anything greater than say a P3. That is bogus. Users today do more things with their computers than was done during P3's day. Today, people retouch photos and import them into a library with thousands of photos, they render home movies taken from their camcorder, they run movies (quicktime, flash, etc.) at hi resolutions and at full screen, they rip CDs, they sometimes rip DVDs, video teleconferencing, and so much more. Heck, you need a decent system to render most popular websites today. Here's my generalization: Most slashdotters don't give "Joe Six-Pack" enough credit. He may not know how it works, but he uses more features than you think. The fact is that the software has gotten easier and more powerful, thus allowing people to use more and more features. To say that most users don't need anything more than 6 year old technology is insulting to software developers. It essentially is saying that these developers have been wasting their time for the past 6 years.

  23. Re:Question... by nomadic · · Score: 5, Insightful

    Vista, George W. Bush, elected because of his name, even though the prior iteration wasn't especially respected or well-liked. Introduced instability and performance issues, all in the name of "security". Many of the corporate interests who promoted him early on are having second thoughts.

  24. Re:Question... by Jesus_666 · · Score: 4, Funny

    Linux, Fidel Castro, the communist leader that has been in office for ages, just refuses to resign or die and points nukes at Windows from time to time.

    --
    USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)