Exam 2 assignment questions Flashcards
Absolute code can be generated for ____.
- compile time binding
- load time binding
- execution time binding
- interrupt binding
compile time binding
_____ is the method of binding instructions and data to memory performed by most general-purpose operating systems
- Interrupt binding
- Compile time binding
- Execution time binding
- Load time binding
execution time binding
An address generated by a CPU is referred to as a ____.
- physical address
- logical address
- post relocation register address
- memory management unit (MMU) generated address
logical address
Suppose a program is operating with execution-time binding and the physical address generated is 300. The relocation register is set to 100. What is the corresponding logical address?
- 199
- 201
- 200
- 300
200
The mapping of a logical address to a physical address is done in hardware by the ________.
- memory management unit (MMU)
- memory address register
- relocation register
- dynamic loading register
memory management unit (MMU)
In a dynamically linked library, ____.
- loading is postponed until execution time
- system language libraries are treated like any other object module
- more disk space is used than in a statically linked library
- a stub is included in the image for each library-routine reference
a stub is included in the image for each library-routine reference
The _____ binding scheme facilitates swapping.
- interrupt time
- load time
- assembly time
- execution time
execution time
The roll out, roll in variant of swapping is used ____.
- when a backing store is not necessary
- for the round-robin scheduling algorithm
- for priority-based scheduling algorithms
- when the load on the system has temporarily been reduced
for priority-based scheduling algorithms
_____ is the dynamic storage allocation algorithm that results in the smallest leftover hole in memory.
- First-fit
- Best-fit
- Worst-fit
- None of the above
Best-fit
Which of the following is true of compaction?
- It can be done at assembly, load, or execution time.
- It is used to solve the problem of internal fragmentation.
- It cannot shuffle memory contents.
- It is possible only if relocation is dynamic and done at execution time.
It is possible only if relocation is dynamic and done at execution time.
A(n) ____ page table has one page entry for each real page (or frame) of memory.
- inverted
- clustered
- forward-mapped
- virtual
inverted
Consider a logical address with a page size of 8 KB. How many bits must be used to represent the page offset in the logical address?
- 10
- 8
- 12
- 13
13
Consider a logical address with 18 bits used to represent an entry in a conventional page table. How many entries are in the conventional page table?
- 262144
- 1024
- 1048576
- 18
262144
Assume a system has a TLB hit ratio of 90%. It requires 15 nanoseconds to access the TLB, and 85 nanoseconds to access main memory. What is the effective memory access time in nanoseconds for this system?
- 108.5
- 100
- 22
- 176.5
108.5
_____ is the dynamic storage allocation algorithm that results in the largest leftover hole in memory.
- First-fit
- Best-fit
- Worst-fit
- None of the above
Worst-fit
Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page number?
- 0xAE
- 0xF9
- 0xA
- 0x00F9
0xAE
Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page offset?
- 0xAE
- 0xF9
- 0xA
- 0xF900
0xF9
Consider a 32-bit address for a two-level paging system with an 8 KB page size. The outer page table has 1024 entries. How many bits are used to represent the second-level page table?
- 10
- 8
- 12
- 9
9
With segmentation, a logical address consists of _____.
- segment number and offset
- segment name and offset
- segment number and page number
- segment table and segment number
segment number and offset
Which of the following data structures is appropriate for placing into its own segment?
- heap
- kernel code and data
- user code and data
- all of the above
all of the above
Assume the value of the base and limit registers are 1200 and 350 respectively. Which of the following addresses is legal?
- 355
- 1200
- 1551
- all of the above
1200
A(n) ______ matches the process with each entry in the TLB.
- address space identifier
- process id
- stack
- page number
address space identifier
Which of the following statements is true with respect to hashed page tables?
- They only work for sparse address spaces.
- The virtual address is used to hash into the hash table.
- They are a common approach for handling address spaces larger than 32 bits.
- Hash table collisions do not occur because of the importance of paging.
They are a common approach for handling address spaces larger than 32 bits.
Which of the following statements regarding the ARM architecture is false?
- There are essentially four different pages ranging from 4-KB to 16-MB in size.
- There are two different levels of TLB.
- One- or two-level paging may be used.
- The micro TLB must be flushed at each context switch.
The micro TLB must be flushed at each context switch.
Which of the following is not a reason explaining why mobile devices generally do not support swapping?
- limited space constraints of flash memory
- small size of mobile applications do not require use of swap space
- limited number of writes of flash memory
- poor throughput between main memory and flash memory
small size of mobile applications do not require use of swap space
There is a 1:1 correspondence between the number of entries in the TLB and the number of entries in the page table.
(True/False)
False
The ARM architecture uses both single-level and two-level paging.
(True/False)
True
Fragmentation does not occur in a paging system.
True/False
False
Hashed page tables are particularly useful for processes with sparse address spaces.
(True/False)
True
Inverted page tables require each process to have its own page table.
(True/False)
False
Without a mechanism such as an address space identifier, the TLB must be flushed during a context switch.
(True/False)
True
A 32-bit logical address with an 8 KB page size will have 1,000,000 entries in a conventional page table.
(True/False)
False
Hashed page tables are commonly used when handling addresses larger than 32 bits.
(True/False)
True
The x86-64 bit architecture only uses 48 of the 64 possible bits for representing virtual address space.
(True/False)
True
Mobile operating systems typically support swapping.
True/False
False
Which of the following is a benefit of allowing a program that is only partially in memory to execute?
- Programs can be written to use more memory than is available in physical memory.
- CPU utilization and throughput is increased.
- Less I/O is needed to load or swap each user program into memory.
- All of the above.
All of the above.
In systems that support virtual memory, ____.
- virtual memory is separated from logical memory
- virtual memory is separated from physical memory
- physical memory is separated from secondary storage
- physical memory is separated from logical memory
physical memory is separated from logical memory
The vfork() system call in UNIX ____.
- allows the child process to use the address space of the parent
- uses copy-on-write with the fork() call
- is not intended to be used when the child process calls exec() immediately after creation
- duplicates all pages that are modified by the child process
allows the child process to use the address space of the parent
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what is the number of page faults for the given reference string?
- 14
- 8
- 13
- 10
8
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what will be the final configuration of the three frames following the execution of the given reference string?
- 4, 1, 3
- 3, 1, 4
- 4, 2, 3
- 3, 4, 2
3, 4, 2
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the LRU replacement algorithm, what is the number of page faults for the given reference string?
- 14
- 13
- 8
- 10
8
Given the reference string of page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and a system with three page frames, what is the final configuration of the three frames after the LRU algorithm is applied?
- 1, 3, 4
- 3, 1, 4
- 4, 1, 2
- 1, 2, 3
3, 1, 4
Belady’s anomaly states that ____.
- giving more memory to a process will improve its performance
- as the number of allocated frames increases, the page fault rate may decrease for all page replacement algorithms
- for some page replacement algorithms, the page fault rate may decrease as the number of allocated frames increases
- for some page replacement algorithms, the page fault rate may increase as the number of allocated frames increases
for some page replacement algorithms, the page fault rate may increase as the number of allocated frames increases
Optimal page replacement ____.
- is the page replacement algorithm most often implemented
- is used mostly for comparison with other page replacement schemes
- can suffer from Belady’s anomaly
- requires that the system keep track of previously used pages
is used mostly for comparison with other page replacement schemes
The _____ allocation algorithm allocates available memory to each process according to its size.
- equal
- global
- proportional
- slab
proportional