Re: mips and concurrency/simultaneous running tasks

From: Robert Monsen (rcsurname_at_comcast.net)
Date: 01/19/05


Date: Wed, 19 Jan 2005 12:13:45 -0800

Scott Keogh wrote:
> Hi
> I was wondering if anyone can help me as im new to the mips architecture.
> I'm told mips is able to run (or run more efficiently than a conventional
> processor) simultaneous tasks because of its architecture. Is there anyone
> out there who can tell me why this is or point me in the direction of some
> further reading that explains it.
>
> thanks
>
> Scott
>
>

This is wrong, in my opinion. I've written several interrupt and tasking
systems for MIPS chips, and maintained several others, and I can tell
you that it's more painful than most, due to the strange coprocessor
architecture and minimal instruction set. I found writing interrupt
level debuggers 'challenging', for various arcane reasons. The
coprocessor register scheme is novel, to say the least.

You would think they would have gotten this right, and made it easy,
since the chip was basically designed to run UNIX. It's not like they
didn't have good models to crib from, like, for example, the 68000
architecture. Processor guys seem to have their own logic, based on a
nightmarish view of efficiency, which is usually at odds with the
programmer model. MIPS was also the first RISC chip to be generally
available, so there are oddities associated with that premere status.

One famous perversion with MIPS is the 'branch delay slot', which is a
scheme in which the instruction *after* a branch is executed regardless
of whether the branch is taken. This has to do with the instruction
pipeline. It probably saved 10k transistors, and may have speeded up
branch processing, but caused a world of hurt to future programmers.

One thing that is useful is the ability to profile code and to optimize
branch statements based on the most likely outcome of the branch. Many
tools (including GCC) are designed to take advantage of this.

The best book I've found (actually, this may be out of date, I've been
out of touch with MIPS for about 4 years now) is "MIPS RISC
Architecture" by Gerry Kane and Joe Heinrich.

-- 
Regards,
   Robert Monsen
"Your Highness, I have no need of this hypothesis."
     - Pierre Laplace (1749-1827), to Napoleon,
        on why his works on celestial mechanics make no mention of God.


Relevant Pages

  • Re: [Patch 01/12] Prepare the code for Hardware Breakpoint interfaces
    ... * Available values vary according to the architecture. ... I question weather having all these symbols for lengths is the proper approach. ... If we were to use a debug agent hooked into the MIPS EJTAG debugger ... in the arch-specific files and I don't see any part of the generic ...
    (Linux-Kernel)
  • Re: MIPS and RISC
    ... MIPS architecture and designs and license processor cores. ... Some says MIPS to be "Microprocessor without Interlocked Pipeline ... MIPS is a type of RISC architecture right ?? ... "Modern Processor Design: Fundamentals of Superscalar Processors" ...
    (comp.arch)
  • Re: [RFC Patch 1/9] Introducing generic hardware breakpoint handler interfaces
    ... + * Available values vary according to the architecture. ... On MIPS we support breakpoint lengths that are powers of 2 between 8 and ... For architectures such as MIPS where a range of lengths can be possibly ... be specified in numeric terms to the kernel interface (say ...
    (Linux-Kernel)
  • Re: Access individual bytes of a 4 byte long (optimization)
    ... I give you "MIPS" as the architecture (using the MIPS compilers). ... Reading email is like searching for food in the garbage, ...
    (comp.lang.c)
  • Re: MIPS and RISC
    ... I am confused with the difference between MIPS and RISC ... MIPS is an architecture from this genré ... The first generation consisted of MIPS, SPARC, Motorola ... The second generation added HP PA-RISC, ALPHA, IBM Power, and mabe a ...
    (comp.arch)