• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 5 páginas
Otro

Cs 354 - Exam 2 Study Guide

Document preview thumbnail
Vista previa 2 fuera de 5 páginas

CS 354 - EXAM 2 STUDY GUIDE

Vista previa del contenido

CS 354 - EXAM 2 STUDY GUIDE
Posix API - Answer -standard for maintaining comp. between different UNIX OS

brk - Answer -"program break" - OS's ptr to top of heap

sbrk - Answer -attempts to change the program's top of heap by incr bytes

Dynamically allocated memory - Answer -allocated during runtime to satisfy uncertain
memory needs (process data files/doc/images/spreadsheets)

Heap - Answer -- a segment of processes virtual addr space used for dynamically
allocated memory
- a collection of various-sized memory blocks that are managed by an allocator

Block - Answer -- contiguous chunk of memory
- contains payload and overhead

Payload - Answer -part of block that is usable by process

Overhead - Answer -part of the block that is used by allocator to manage heap
structure

Allocator - Answer -code that allocates and frees blocks as well as "splits" and
"merges" them

Throughput - Answer -- #of malloc and free ops/sec
- higher is better
- free O(1) independent of number of heap blocks
- malloc O(N) linearly dep. on # heap blocks

Memory utilization - Answer -- % of memory used for payload: mem-requests
- mem requests(bytes)/heap allocated(bytes)
- higher is better

Double word alignment - Answer -1) heap blocks size must be a multiple of 8
2) payload address must be word-aligned (multiple of 8)

External fragmentation - Answer -when there is enough free heap memory, but it is
divided into blocks that are too small to satisfy request

Internal fragmentation - Answer -memory in block is used as overhead instead of
payload

Size - Answer -# of bytes in heap block (payload + overhead)

, Status - Answer -whether block is allocated or free

Explicit free list - Answer -- allocator uses data structure that contains free blocks
- code: only need to track size of each block
- space(-): potentially more memory needed to store free list
- time(+): a bit faster since just searching through free blocks

Implicit free list - Answer -- allocator uses a "header" block as its D.S.
- code: must track size and status of each heap block
- space(+): potential less memory required
- time(-): more time needed to "skip over" allocated block; O(N) but more alloc. blocks
than free block, so N is larger

Placement policies - Answer -algorithms used to search heap for Free block to satisfy
request

First fit - Answer -- start from: beginning of heap
- stop at: first free block that is big enough
- fail if: END MARK is reached
- mem util(+): like to choose block close to desired size
- throughput(-): requests for large blocks must skip through many smaller blocks

Next fit - Answer -- start from: block most recently allocated
- stop at: first free block that's big enough
- fail if: start block is reached ("wrap-around")
- mem util(-): might choose a block that's too big
- throughput(+): faster than first fit since each request does not start at beginning

Best fit - Answer -- start from: beginning of heap
- stop at: END MARK, and choose block closest to desired size "big enough"
- stop early: if exact size match is found
- fail if: no block found that's big enough
- mem util(+): closest to best size
- throughput(-): slowest in general, since entire heap is searched

False fragmentation - Answer -when there is a large enough contiguous free space, but
it is divided into blocks that are too small to satisfy request

Immediate coalescing - Answer -do every time a block is free'd - check next + prev
block

Delayed coalescing - Answer -do only when needed to satisfy request for a larger block

Footer - Answer -contains size of free block

Pred - Answer -addr of prev free block

Información del documento

Subido en
3 de septiembre de 2025
Número de páginas
5
Escrito en
2025/2026
Tipo
Otro
Personaje
Desconocido
$12.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
GEEKA
3.8
(379)
Vendido
2229
Seguidores
1451
Artículos
63073
Última venta
2 días hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes