OS respuestas repaso

Páginas: 9 (2246 palabras) Publicado: 13 de noviembre de 2014
Nombre: __________________________________________________ Matrícula: ______________
1. On a system using simple segmentation, compute the physical address for each of the logical addresses, given the following segment table. If the address generates a segment fault, indicate so.
Segment
Base
Length
0
1
2
3
330
876
111
498
124
211
99
302

(a) 0,99 330 + 99 = 429
(b) 2,78111 + 78 = 189
(c) 1,265 Segment overflow
(d) 3,222 498 + 222 = 720
(e) 0,111 330 + 111 = 441

2. On a system using paging and segmentation, the virtual address space consists of up to 8 segments where each segment can be up to 229 bytes long. The hardware pages each segment into 256-byte pages. How many bits in the virtual address specify the:
(a) Segment number? _______3 bits__________Hint: Considere cuantos bits
(b) Page number? _______21 bits_________ se requieren para re-
(c) Offset within page? _______8 bits__________ presentar cada compo-
(d) Entire virtual address? _______32 bits_________ nente de la dirección
como (s, p, d)
3. Why is paging faster than segmentation?
En segmentación, el desplazamiento (d)debe ser sumado a la dirección inicial del segmento. En paginación no se requiere hacer sumas de ningún tipo. El número del marco de página y el desplazamiento se concatenan/juntan para formar la dirección física. La concatenación de los 2 patrones de bits (marco + desplazamiento) es más rápido que sumarlos.
4. What are the two major differences between segmentation and paging?
1) Ensegmentación, el programa se divide en segmentos de tamaño variable. En paginación, el programa se divide en páginas de tamaño fijo.

2) En segmentación, el usuario (el compilador) es responsable de dividir el programa en segmentos. En paginación, la división en páginas la hace el sistema operativo y es transparente para el usuario.

5. A program containing relocatable code was created, assuming itwould be loaded at address 100. In this code, the program refers to the following addresses: 135, 160, 164, 220, 224. If the program is loaded into memory starring at location 500, to what do those addresses have to be changed?
Respuesta: 535, 560, 564, 620, 624

6. In this problem, use decimal values, a page size of 2000 bytes, and the following page table.

Nota: en éste ejercicio,“In/out”
hace las veces del bit
de residencia



Which of the following virtual addresses would generate a page fault? For those that do no generate a page fault, to what physical address would they translate?

(a) 10451 10451 Mod 2000 => (5, 451) = La página 5 no está en memoria => Page Fault
(b) 5421 5421 Mod 2000 => (2, 1421) = 200*2000 + 1421 = 400000 + 1421 = 401421(c) 14123 14123 Mod 2000 => (7, 123) = 101*2000 + 123 = 202000 + 123 = 202123
(d) 9156 9156 Mod 2000 => (4, 1156) = La página 4 no está en memoria => Page Fault
7. In this problem, use binary values, a page size of 26 bytes, and the following page table.







Which of the following virtual addresses would generate a page fault? For those that do not generate a page fault, towhat physical address would they translate?
P d
(a) 0000101|101001 La página 5 no está en memoria => Page Fault
(b) 0000010|010010 11011 concatenado con 010010 = 11011010010
(c) 0000100|010101 La página 4 no está en memoria => Page Fault
(d) 0000001|110101 00001 concatenado con 110101 = 00001110101
Hint: considere la representación de una direcciónvirtual como (p, d).
8. Given references to the following pages by a program,

0,9,0,1,8, 1,8,7,8,7, 1,2,8,2,7, 8,2,3,8,3,

How many page faults will occur if the program has three page frames available to it and uses:

(a) FIFO replacement? 8 fallos de página
(b) LRU replacement? 9 fallos de página
(c) Optimal replacement? 7 fallos de página

9. You have...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Dinero y banca respuestas a preguntas de repaso Cap. 1
  • Respuestas preguntas de repaso economia
  • Un repaso por Farmacolog a preguntas y respuestas MIR
  • Laudon cap 1 respuestas de repaso
  • Preguntas Y Respuestas De Repaso De Paradigmas De Programación Utn 1Er Parcial
  • Repaso
  • Repaso
  • repaso

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS