Managing Information Technology

(Frankie) #1

Our very short example contains only three instruc-
tions and obviously represents only a small portion of a
program, but these few instructions should provide the
flavor of machine language programming. A complete
program would consist of hundreds or thousands of
instructions, all expressed in the machine language of the
particular computer being used. The person preparing
the program (called a programmer) has to know each
operation code and has to remember what data he or she
has stored in every memory cell. Obviously, machine
language programming is very difficult and time consuming.
(As we will learn later in this chapter, programs can be
written in languages that are easier for us to use and then
automatically translated into machine language, so almost
no one programs in machine language today.)
Once the entire machine language program has
been prepared, it must be entered into the computer,
using one of the input methods already described, and
stored in the computer’s memory. This step of entering
the program in memory is called loading the program.
The control unit then is told (somehow) where to find
the first instruction in the program. The control unit
fetches this first instruction and places it in special stor-
age cells called registers within the control unit. Using
built-in circuitry, the control unit interprets the instruc-
tion (recognizes what is to be done) and causes it to be
executed (carried out) by the appropriate components of
the computer. For example, the control unit would inter-
pret the add instruction shown previously, cause the
contents of memory cells 470 and 500 to be sent to the
arithmetic/logical unit, cause the arithmetic/logical unit
to add these two numbers, and then cause the answer to
be sent back to memory cell 500.
After the first instruction has been completed, the
control unit fetches the second instruction from memory.
The control unit then interprets this second instruction and
executes it. The control unit then fetches and executes the
third instruction. The control unit proceeds with this
fetch–execute cycle until the program has been completed.
Usually the instruction that is fetched is the next sequential
one, but machine languages incorporate one or more
branching instructions that, when executed, cause the con-
trol unit to jump to a nonsequential instruction for the next
fetch. The important point is that the control unit is fetch-
ing and executing at electronic speed; it is doing exactly
what the programmer told it to do, but at its own rate
of speed.
One of the primary measures of the power of any
computer model is the number of instructions that it can
execute in a given period of time. In the 1980s the most
commonly used speed rating was MIPS,or millions of in-
structions per second executed by the control unit.


Chapter 2 • Computer Systems 27

However, it may take several instructions on one computer
model to accomplish what one instruction can do on anoth-
er computer model. Thus, the use of MIPS ratings has
largely gone out of favor because of the “apples and or-
anges” nature of the comparisons of MIPS ratings across
classes of computers.
Another speed rating used is MegaFLOPS or
MFLOPS—millions of floating point operations per sec-
ond. These ratings are derived by running a particular set
of programs in a particular language on the machines
being investigated. The ratings are therefore more mean-
ingful than a simple MIPS rating, but they still reflect only
a single problem area. One publicly available (and regu-
larly updated) set of MFLOPS ratings is the LINPACK
ratings, in which the problem area considered is the solu-
tion of dense systems of linear equations using the LIN-
PACK software in a FORTRAN environment (Dongarra,
2009). Later in this chapter, Table 2.1 includes rough esti-
mates of the range of MFLOPS ratings for various types
of computer systems.
Published speed ratings can be useful as a very
rough guide, but the only way to get a handle on how
various machines would handle your computer workload
isbenchmarking.Benchmarking is quite difficult to do,
but the idea is to collect a representative set of real jobs
that you regularly run on your computer, and then for
comparison actually run this set of jobs on various
machines. The computer vendors involved will usually
cooperate because they want to sell you a machine. To
make benchmarking easier, software vendors have created
ready-to-use computer benchmark packages, using
everyday programs, which will measure the performance
of various computers. For example, PC Worldmagazine
has created WorldBench 6, which is designed to test
microcomputers running the Windows 7 operating
system. WorldBench 6 includes eight applications, such
as Adobe Photoshop, Microsoft Office, and Roxio
VideoWave Movie Creator. You can do your own bench-
marking by buying a license to use WorldBench 6 on
a single computer at a time for $249 (Murphy, 2009;
PC World Labs, 2009a, 2009b).
Again, processing speeds vary across machines, but
all computers use the stored-program concept. On all com-
puters, a machine language program is loaded in memory
and executed by the control unit. There is a great deal more
to the story of how we get the machine language program,
but suffice it to say at this point that we let the computer do
most of the work in creating the machine language pro-
gram. Neither you nor programmers working for your
organization will write in machine language; any programs
will be written in a language much easier and more natural
for humans to understand.
Free download pdf