What is bounds testing, and how does the 68020 implement it? If you were a processor designer, would you implement bounds testing in the same way as the 68020? Can you think of other ways of incorporating bounds testing into architecture?

What will be an ideal response?

When an array is accessed, the array element must be within the bounds of the array; for example, if an array
has elements x0 to x99, then the array index must be in the range 0 to 99. When accessing arrays in memory,
pointers are used and the range of memory addresses allocated to an array might be 0x00001A00 to 0x00001A63. In this case, any pointer accessing the array must fall within this numeric range. If a pointer is
incorrectly calculated (or a pointer error is generated by a virus or other malware), it is necessary to take action.
The 68020 has bounds check instructions that compare a pointer with bounds and either set a flag or call the
operating system if the result is out of range. The 68020 puts both its pointers in memory, which means that
you have to do two memory reads to perform a bounds check. This is very inefficient. If you did apply bounds
checking it might make more sense to include bounds checking registers in the CPU.

There are many ways in which bounds testing could be incorporated in architecture. For example, each register
could have an associated upper and lower limit register. Hard?wired comparators could be included so that any
attempt to exceed a bound would be signaled (for example, by an exception).

Computer Science & Information Technology

You might also like to view...

Moving between worksheets in a workbook is done by clicking the ________

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What law prevents the removal of protection mechanisms placed on a copyrighted work by the copyright holder?

A. HIPAA B. DMCA C. GLBA D. ECPA

Computer Science & Information Technology