Re: Demo: multithreading

From: Richard (riplin_at_Azonic.co.nz)
Date: 05/23/04


Date: 22 May 2004 23:08:16 -0700

robert.deletethis@wagner.net (Robert Wagner) wrote

> * Multithreading was invented by Sybase in the late '80s to help their
> * database run faster.

I think that you are quite far away from reality:

""" 1966

[26] The UNIVAC division of Sperry Rand Corporation delivers the first
multiprocessor 1108. Each contains up to 3 CPUs and 2 I/O controllers;
its EXEC 8 operating system provides interface for multithread program
execution.

---------------- """"

> * Although tasks and threads are both dispatched by
> * the operating system, some people thought a thread switch would be
> * faster than a task switch.

I don't know _anyone_ that thought that. What they _did_ think is
that creating a new thread would be much faster than creating a new
task. I recall when the ICL 2900 VME/B introduced threads. A new VM
task took around a million instructions to create while a thread
within an existing VM was just a few thousand. VME/B was using
threads in their servers in the early 70s.

> * The speed difference between the two methods is dramatic. Case 13,
> * mutex, took 5.9 seconds -- 3.3 times slower than single-threading.
> * Case 14 took .6 seconds, 3 times faster than single-threading, on a
> * machine with 4 CPUs.

Presumably the machine was doing nothing else at the time. If it was
running a normal mix of jobs, as you say: hundreds of tasks, then the
chance of getting the use of 2 CPUs at the same time is negligable.



Relevant Pages

  • Re: OT: kernel in C? how translated? [Was Re: Help]
    ... >> The kernel is the core of the operating system. ... > Today's CPUs are actually an operating system unto themselves. ... > machine code instruction is broken into multiple microcode instructions. ... Examples of such designs are the PDP-11, VAX, MC68K and, of course, ...
    (Debian-User)
  • Re: OSR507 Licensing Fee for multi CPU and Hyperthreading - Were they told right?
    ... On Thu, 01 Apr 2004 15:52:01 EST, Brian Keener ... [SCO's out of date licensing scheme] ... UW can manage and much more, for free, to run on as many CPUs as you ... operating system with a future in front of it, ...
    (comp.unix.sco.misc)
  • Re: Compiling for several microprocessors.
    ... >executable without having to purchase the Pocket PC powered with XScale? ... should work well on StrongARM and XScale CPUs. ... inf files, they refer to version of the operating system, not the CPU. ... They let you restrict a specific CAB file to a certain range of ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Why Two CPUs in Task Mgr?
    ... |> SMT) allows for a single physical processor to appear to the operating ... The operating system doesn't know the ... |>>both of these boxes display two CPUs in Task Manager. ...
    (microsoft.public.win2000.general)