Page 107 - Anatomy of a Robot
P. 107
03_200256_CH03/Bergren 4/17/03 12:27 PM Page 92
92 CHAPTER THREE
step up to a 32-bit computer. If the computer has a memory management unit
(MMU), it is possible to step up to a very large addressing range and to support a
vast memory.
MMU An MMU is a set of registers within the computer chip that enables the
computer to access a vast memory array. Let’s use a visual image to describe what
an MMU does. Think of the memory array as a vast outdoor wheat field of bytes.
Think of the computer as being inside a house with a window looking out on the
field of bytes. The computer can process instructions to manipulate all the bytes
it can see out of the window, but not the ones it cannot see. Now let’s make a mag-
ical MMU that can move the window around the wall of the house. The MMU
stores window locations and can remember a bunch of different locations for the
window (called pages). In fact, each user of the computer can have his or her own
window location and, as such, a private memory space out in the field of bytes. In
this way, the computer can support multiple users without the difficulty of keep-
ing them all apart. If only the operating system can manipulate the MMU, then it’s
possible to keep the users secure from one another so they cannot disturb each
other’s field of bytes. In a robot design, this can come in handy if multiple groups
of engineers reprogram the robot’s functions. It is possible to keep them from
interfering with one another.
In addition, if a user needs more memory than the addressing range allows, a
secure portion of the MMU can be made available to the user. The user can con-
trol multiple pages of memory to get access to more memory. The only catch
is that the pages cannot all be accessed at the same time without altering the
MMU between accesses.
So how does an MMU work? Basically, the computer must come up with extra
memory bits to add to the largest address range, which can be done in several
ways. In the first place, a few extra bits can be added by allowing multiple users
to access the overall memory. Accommodating 32 users would add 5 more bits.
Most computer architectures enable each user to control a few more bits. The
net result is that the MMU structure, inside the CPU, looks just like a small
memory. The address signals of the MMU memory is made up of the extra bits.
The data stored in the memory is generally the effective address of the user’s
memory page. In addition, the MMU memory contains security bits that spec-
ify what sort of operations are allowed on the memory page. It is possible to
disable writes and reads, and to restrict access to different classes of users.
To recap, an MMU enables the computer to access a much larger memory than
the addressing range ordinarily does. In addition, an MMU can provide secu-
rity for multiple users. In general, unless the robot design is very complex with
a large operating system and many users, an MMU won’t be of much use.