jueves, 29 de marzo de 2012

ACTIVIDAD 5.

Chapter 3  Exercises
For exercises 1-3, mark the answers true and false as follows:
A.    True
B.    False

1      A logical address specifies an actual location in main memory.
R=   B
2      In a fixed partition system, main memory is divided into several partition of the same size.
R=   B
3      The first page in a paged memory system is page 0.
R=   A
4      Distinguish between logical addresses and physical addresses.
MEMORIA FISICA: es una locación física dentro de la memoria principal
MEMORIA LOGICA: es una referencia a la locación a la memoria independiente de la ubicación actual del programa.

5      Name three memory management techniques and give the general approach taken in each.
**PARTICIÓN: cuando a la memoria se le divide en espacios que pueden ser ocupados y estos pueden ser de tamaño fijo o no.
**PAGINACIÓN: a la memoria principal se divide en un conjunto de marcos de igual tamaño. Cada proceso se divide en una serie de paginas del tamaño de los marcos. Los procesos se cargan en los marcos.
**SEGMENTACIÓN: cada proceso y sus datos se dividen en segmentos de longitud variable.  Todos los segmentos de un proceso se deben de cargar en memoria.

6      When a program is compiled, where is it assumed that the program will be loaded into memory? That’s , where are logical addresses assumed to begin?
R=   de memoria secundaria pasa a memoria principal.

7      If, in a single contiguous memory management system, the program is loaded at address 30215, compute the physical addresses (in decimal) that correspond to the following logical addresses:
a.    9223
Physical address:  39 438
b.    2302
Physical address:  32 517
c.    7044
Physical address:  37 259
FORMULA: dirección (30 215) + dirección lógica = dirección física.

8      In a single contiguous memory management approach, if the logical address of a variable is L and the beginning of the application program is A, what is the formula for binding the logical address to the physical address?
R=  LA FORMULA ES:           L + A.

9      If, in a fixed partition memory management system, the current value of the base register is 29870 and the current value of the bounds register is 3408, compute the physical address that correspond to the following logical addresses:

d.    9223
Physical address:  30 074
e.    2302
Physical address:  32 892
f.     7044
Physical address: no se puede calcular por que la direcciónlógica rebase el límite de registro.
Se suman el registro base a la dirección lógica.

10   If more than one partition is being used (either fixed or dynamic), what does the base register contain?
RESP: contiene el inicio de la dirección de la partición actual.

11   Why is the logical address compared to the bounds register before a physical address is calculated?
RESP: por que los registros de los límites contienen la longitud de la partición actual.  Si la dirección lógica es mayor que los registros de los limites entonces la dirección física no esta dentro de la partición actual.

EXERCISE 12 USES THE FOLLOWING STATE OF MEMORY.

Operating
System
Process 1
Empty
60 blocks
Process 2
Process 3
Empty
52 blocks
Empty
100 blocks

12   If the partitions are dynamic and a new job arrives requiring 52 blocks of main memory, show memory, after using each of the following partition selection approaches:
1.- First Fit
2.- Best Fit
3.- Worst Fit



Exercises 13 - 14 refer to the following PMT.


Page
0
1
2
3
Frame
5
2
7
3


13.  If the frame size of 1024, what is the physical address associated with the logical address <2, 85>?
RESP=   7253.  Multiplicamos el tamaño del marco(1024) por el tamaño asignado a la pagina 2(7) y le sumamos el desplazamiento de la pagina 2 (85)
14.  If the frame size of 1024, what is the physical address associated with the logical address <3,1555>?
El desplazamiento es más grande que el tamaño de la pagina (marco).
1555  >  1024
CONCLUSIONES: en esta actividad aprendimos a clasificar y distribuir la memoria de acuerdo a cada característica de nuestros procesos, de esta manera aprendimos a re direccionar mediante cálculos matemáticos pasar de una dirección lógica a una dirección física.

No hay comentarios:

Publicar un comentario