Quiz 7, Q&A
Q. What are the advantages of segmentation with paging?
A. Advantages of Segments; Supports sparse address spaces. If segment is not used, no need for page table. Decreases memory required for page tables.
Advantages of Paging; Eliminate external fragmentation. Segments to grow without any reshuffling
Advantages of Both. Increases flexibility of sharing. Share at two levels: Page or segment (entire page table)
Q. What is the block device? Explain.
Transfer is made by means of blocks
Block devices include disk drive
Commands include read, write, seek
Raw I/O or file-system access
File system maps location i onto block + offset
Memory-mapped file access possible
Q. What are the disadvantages of segmentation with paging?
A. Internal fragmentation increases. Last page of every segment in every process Increases overhead of accessing memory. Large page tables.
Do not want to allocate page tables contiguously
More problematic with more logical address bits
Two potential solutions: Page the user page tables (multilevel page table), Inverted page table
Q. What is the character device? Explain.
Transfer is made by means of stream of characters
Character devices include keyboard, mouse, serial port
Commands include get, put
Libraries layered on top allow line editing