145 views
2 2 votes

A system uses base-and-bound address translation.

The registers contain:

$\texttt{base} = 1000$

$\texttt{bound} = 100$

The CPU fetches and executes the following instruction:

$\texttt{load 10, r1}$

Assume that the instruction itself is stored at a valid logical address.

How many main-memory accesses are generated while fetching and executing this instruction?

  1. $0$
     
  2. $1$
     
  3. $2$
     
  4. $3$

1 Answer

1 1 vote

The instruction requires two separate main-memory accesses.

First memory access: The CPU fetches the instruction $\texttt{load 10, r1}$ from memory.

Second memory access: The CPU loads the data stored at logical address $10$.

The physical address of the operand is:

$\text{Physical address} = \texttt{base} + \text{logical address}$

$= 1000 + 10$

$= 1010$

The bound check and address addition are performed by hardware. 

They do not require an additional main-memory access.

$\therefore\text{Total memory accesses} = 1 + 1 = 2$

Answer:
Position:
Show:

Related questions

2 2 votes
1 1 answer
156
156 views
GO Classes asked Aug 4
156 views
The instruction:$\texttt{LOAD GR, B, AD}$adds the contents of base register $B$ to the address field $AD$. The resulting effective address is used to access main memory, ...
4 4 votes
1 1 answer
273
273 views
GO Classes asked Aug 4
273 views
Consider the following C program executing on a computer that supports virtual memory and paged segmentation:#include <stdio.h int main(void) { int w; printf("%p", (void ...
3 3 votes
1 1 answer
210
210 views
GO Classes asked Aug 4
210 views
Consider the following table of active processes:$$\begin{array}{|c|c|c|}\hline\text{Process} & \text{Base} & \text{Bound} \\\hlineA & 100 & 10 \\B & 1000 & 20 \\C & 500 ...
3 3 votes
1 1 answer
161
161 views
GO Classes asked Aug 4
161 views
Consider the following segment table:$$\begin{array}{|c|c|c|}\hline\text{Segment} & \text{Base} & \text{Limit} \\\hline0 & 219 & 600 \\1 & 2300 & 14 \\2 & 90 & 100 \\3 & ...