CMSC 15400: mem2-segmentation

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/16

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

17 Terms

1
New cards
With segmentation we don't have to worry about the process bound. A process now believes it has the entire logical address space (e.g. a 4GB logical space in a 32-bit architecture)
TRUE
2
New cards
In segmentation, processes of the same program can share the same code segment.
TRUE
3
New cards
"*(int*)main = 7" will cause a segfault (or sometimes called "bus error") because the code segment is not readable.
FALSE. Would be true if the code were not WRITEABLE (R = 1, W = 0)
4
New cards
If you have N processors in your computer, all the N processors share the same MMU (there is only one MMU in your computer)
FALSE. ????
5
New cards
In segmentation, the width of th elogical address is the width of the segment bits plus te width of the segment-offset bits
TRUE
6
New cards
In all the memory management we discuss in class, the values in the segment/page table entries are populated (decided) by the MMU
FALSE. The OS decides the entries -- the MMU and CPU are passive hardware components.
7
New cards
In this class, code is in the lowest segment of the process address space and the stack is in the highest. This means the most isgnificant bit of logical addresses within the code segment is "1" This also means the most significant bit of logical addresses of your local vairables within the stack area is "0")
FALSE> Flip the most signiifcant bits
8
New cards
In segmentation, the OS can support more segments (e.g. 16) than what your process typically uses (e.g. 4), hence the OS must introduce read-write bits in every segment table entry
TRUE
9
New cards
In segmentation, the MMU throws a segfault exception when the segment offset is out of bound AND the memory access violates the read/write bits
TRUE
10
New cards
Virtual addresses provide privacy and fault isolation. By default there is no way I can have a pointer pointing to another process' address space.
TRUE. Logical address: can't point to someone else's space (need IPC)
11
New cards
An insturciton that dereferences a bad/dangling pointer does not always directly lead to a segfault/crash.
TRUE. Might still do something bad, but may not necessarily immediately crash
12
New cards
Using the top 3 bits as the segment indexing is sufficient for OSes that want to support up to 15 segments per process.
FALSE. you need 4 bits.
13
New cards
With 32-bit addressing and 64-segment support, we can create a segment as large as 128 MB.
FALSE. 32 - 6 = 26 bits for offset; 2^26 = 64 MB
14
New cards
To limit a segment size to only 4 MB, we must use 10 bits for the segment indexing (with 32 bit addressing)
TRUE. 4 MB = 2^22 -> 10 bits left over for segment indexing
15
New cards
Segmentation solves the BB's external fragmentation problem
FALSE. Internal! There will always be external fragmentation when different segments have different bounds
16
New cards
Virtual memory gives the illusion of a memory larger than the physical memory
TRUE. Swap space: push some data to the disk
17
New cards
If you have a 32 bit logical address space, that means you can always fill yp your addres space with 2^23 bytes (4GB) of data because the size of th elogical address space represents the true limit of how many physical pages can be allocated for your process
FALSE. True limit is determined by your hardware.