where f is the processor clock frequency, in MHz, and IPC (instructions per cycle)
is the average number of instructions executed per cycle. Accordingly, designers
have pursued the goal of increased performance on two fronts: increasing clock
frequency and increasing the number of instructions executed or, more properly,
the number of instructions that complete during a processor cycle. As we have
seen in earlier chapters, designers have increased IPC by using an instruction
pipeline and then by using multiple parallel instruction pipelines in a superscalar
architecture.With pipelined and multiple-pipeline designs, the principal problem is
to maximize the utilization of each pipeline stage. To improve throughput, designers
have created ever more complex mechanisms, such as executing some instructions
in a different order from the way they occur in the instruction stream and
beginning execution of instructions that may never be needed. But as was discussed
in Section 2.2, this approach may be reaching a limit due to complexity and
power consumption concerns.
An alternative approach, which allows for a high degree of instruction-level
parallelism without increasing circuit complexity or power consumption, is called
multithreading. In essence, the instruction stream is divided into several smaller
streams, known as threads, such that the threads can be executed in parallel.
The variety of specific multithreading designs, realized in both commercial
systems and experimental systems, is vast. In this section, we give a brief survey of
the major concepts.
Implicit and Explicit Multithreading
The concept of thread used in discussing multithreaded processors may or may not
be the same as the concept of software threads in a multiprogrammed operating system.
It will be useful to define terms briefly:
• Process: An instance of a program running on a computer. A process embodies
two key characteristics:
—Resource ownership: A process includes a virtual address space to hold the
process image; the process image is the collection of program, data, stack,
and attributes that define the process. From time to time, a process may be
allocated control or ownership of resources, such as main memory, I/O channels,
I/O devices, and files.
—Scheduling/execution: The execution of a process follows an execution path
(trace) through one or more programs. This execution may be interleaved
with that of other processes. Thus, a process has an execution state (Running,
Ready, etc.) and a dispatching priority and is the entity that is scheduled
and dispatched by the operating system.