Quiz
CS1550 Final Prep
Este quiz tem tipos de pergunta que abrem no player de sempre.
Perguntas do quiz (199)
1
Given the following page reference string, count the number of page faults for a memory capacity of 3 frames using LRU page replacement.
Reference string: 0, 1, 2*, 3*, 0, 1*, 4, 0*, 1, 2*, 3*, 4, 5, 6, 3*, 2, 1*, 0. The starred numbers represent write accesses.- A10
- B17
- C16
- D15
2Given the following page reference string, count the number of disk writes for a memory capacity of 3 frames using LRU page replacement.
Reference string: 0, 1, 2*, 3*, 0, 1*, 4, 0*, 1, 2*, 3*, 4, 5, 6, 3*, 2, 1*, 0. The starred numbers represent write accesses.- A6
- B7
- C8
- D0
3Given the following page reference string, count the number of page faults for a memory capacity of 4 frames using the CLOCK page replacement algorithm.
Reference string: 0, 1, 2*, 3, 0*, 1*, 4, 0, 1, 2, 3*, 4, 5, 6, 3*, 2*, 1, 0. The starred numbers represent write accesses.- A12
- B14
- C15
- D13
4Given the following page reference string, count the number of disk writes for a memory capacity of 4 frames using the CLOCK page replacement algorithm.
Reference string: 0, 1, 2*, 3, 0*, 1*, 4, 0, 1, 2, 3*, 4, 5, 6, 3*, 2*, 1, 0. The starred numbers represent write accesses.- A1
- B3
- C2
- D6
- E0
5Given the following page reference string, count the number of page faults for a memory capacity of 2 frames using the FIFO page replacement algorithm.
Reference string: 0, 1, 2*, 3, 0*, 1*, 4, 0, 1, 2, 3*, 4, 5, 6, 3*, 2*, 1, 0. The starred numbers represent write accesses.- A17
- B10
- C18
- D15
6Given the following page reference string, count the number of disk writes for a memory capacity of 2 frames using the FIFO page replacement algorithm.
Reference string: 0, 1, 2*, 3, 0*, 1*, 4, 0, 1, 2, 3*, 4, 5, 6, 3*, 2*, 1, 0.
The starred numbers represent write accesses.- A3
- B6
- C5
- D4
- E0
7Given the following page reference string, count the number of page faults for a memory capacity of 5 frames using the OPT page replacement algorithm.
Reference string: 0, 1, 2*, 3, 0*, 1*, 4, 0, 1, 2, 3*, 4, 5, 6, 3*, 2*, 1, 0. The starred numbers represent write accesses.- A5
- B6
- C7
- D8
8Given the following page reference string, count the number of disk writes for a memory capacity of 5 frames using the OPT page replacement algorithm.
Reference string:0, 1, 2*, 3, 0*, 1*, 4, 0, 1, 2, 3*, 4, 5, 6, 3*, 2*, 1, 0. The starred numbers represent write accesses.- A0
- B5
- C2
- D1
9
If the working set is defined as the set of pages used by the 3 most recent memory access(es), what is the working set size right after the last reference in the following reference string?
Reference string: 0, 1, 2, 3, 0, 1, 4, 0, 1, 2, 3, 4, 5, 6, 3, 2, 1, 0.- A2
- B3
- C0
- D1
10Imagine a virtual memory system with page size equal to 256 bytes. Only the first 5 entries in the conventional page table of a process are valid, and they contain the following frame numbers (in hexadecimal): 358, 284, 579, 48, 688. The numbering of virtual pages and physical frames both start at 0. What is the corresponding physical address (in hexadecimal) to the virtual address 0x121? If the access causes a page fault, write -1.
[blank_start]_____________[blank_end]- A28421
11 Imagine a virtual memory system with page size equal to 256 bytes. Only the first 5 entries in the conventional page table of a process are valid, and they contain the following frame numbers (in hexadecimal): 496, 971, 908, 541, 150. The numbering of virtual pages and physical frames both start at 0. What is the corresponding virtual address (in hexadecimal) to the physical address 0x90857? Write -1 if no virtual address corresponds to the given physical address.
[blank_start]__________[blank_end]- A257
12The page offset in virtual addresses is the same size (number of bits) as the page offset in physical addresses.
- AVerdadeiro
- BFalso
13A page replacement algorithm typically involves the cooperation of the following components:
- AOS code that runs every page fault
- BMMU processing (in hardware) that occurs every memory access
- COS code that runs every memory access
- DOS code that runs every clock interrupt
14Virtual addresses must be the same size (number of bits) as physical addresses.
- AVerdadeiro
- BFalso
15
A computer has 32-bit virtual addresses and the page size is 2^4 KB. Suppose the text, data, and stack segments of a process need 7 page(s) each.
If the computer uses one-level page tables, how many page table entries (PTEs) need to be in memory when the process starts running? (Hint: The entire page table needs to be in memory.)
[blank_start]__________[blank_end]- A262144
16How many entries does a conventional page table contain assuming a 32-bit logical address with an 8 KB page size?
- A2^19
- B2^13
- C2^20
- D2^32
17Fragmentation (both internal and external) does not occur in a paging memory system.
- AVerdadeiro
- BFalso
18
A computer has 32-bit virtual addresses and the page size is 2^10 KB. Suppose the text, data, and stack segments of a process need 7 page(s) each.
If the computer uses two-level page tables, with 8 bits for the second-level index, how many page directory entries (PDEs) are in the first-level page table?
[blank_start]_______[blank_end]- A16
19
A computer has 32-bit virtual addresses and the page size is 2^5 KB. Suppose the text, data, and stack segments of a process need 8 page(s) each.
If the computer uses two-level page tables, with 9 bits for the second-level index, how many page table entries (PTEs) are in each second-level page table?
[blank_start]________[blank_end]- A512
20
A computer has 32-bit virtual addresses and the page size is 2^6 KB. Suppose the text, data, and stack segments of a process need 5 page(s) each.
If the computer uses two-level page tables, with 7 bits for the second-level index, how many second-level page tables are needed to cover the text, data, and stack segments of the process? Note that the text and data segments are contiguous in the process's address space, but the stack is at the other end of the address space.
[blank_start]_______[blank_end]- A2
21All addresses inside page table entries of a two-level page table are physical addresses.
- AVerdadeiro
- BFalso
22The page offset in virtual addresses is the same size (number of bits) as the page offset in physical addresses.
- AVerdadeiro
- BFalso
23Smaller page size leads to:
- Afewer page faults
- Bless internal fragmentation
- Clikely more TLB misses
- Dreduced paging I/O throughput
- Esmaller page tables
24Right after writing to the virtual address 0xFFFAABBB, which of the following must be true? (Assume the page size is 4 KB.)
- Avalid[0xFFFAA] = 1
- Bmodified[0xFFFAABBB] = 1
- Cvalid[0xFFFAABBB] = 1
- Dmodified[0xFFFAA] = 1
25Virtual addresses must be the same size (number of bits) as physical addresses.
- AVerdadeiro
- BFalso
26In a memory system, it takes 3 ns to search the TLB and 118 ns to access memory. 92% of the time the needed PTE will be in the TLB. What is the effective memory access time in nanoseconds (rounded to the nearest integer) assuming a single-level page table?
[blank_start]_______[blank_end]- A130
27In a memory system, it takes 7 ns to search the TLB and 253 ns to access memory. 85% of the time the needed PTE will be in the TLB. What is the effective memory access time in nanoseconds (rounded to the nearest integer) assuming a two-level page table?
[blank_start]______[blank_end]- A336
28
Imagine a virtual memory system with a page size equal to 4 KB. Assume that the first 5 entries in the inverted page table contain the following (process id, virtual page number) pairs:
(10, 4), (30, 6), (20, 2), (30, 1), (10, 7).
(Numbering of virtual pages and physical frames both start at 0.)
To which physical address will the virtual address 0x1200 accessed by process 30 translate?- A0x1200
- B0x300
- CPage Fault
- D0x3200
29
Imagine a virtual memory system with a page size equal to 4 KB. Assume that the first 5 entries in the inverted page table contain the following (process id, virtual page number) pairs:
(10, 4), (30, 6), (20, 2), (30, 1), (10, 7).
(Numbering of virtual pages and physical frames both start at 0.)
To which virtual address (if any) in the address space of Process 10 does the physical address 0x4500 correspond?- A0x7500
- B0x700
- C0x4500
- DThe physical address 0x4500 doesn't belong to Process 10
30A logical block number is a block index relative to the first block of the file.
- AVerdadeiro
- BFalso
31The blocks of a file are returned to the list of free blocks when:
- AThe link count inside the file's i-node reaches 0
- BThe file's owner deletes the file
- CThe file's permissions are changed so that even the file's owner cannot access the file
- DThe file's owner changes the file name
32Linked allocation may suffer from:
- AExternal Fragmentation
- BInternal Fragmentation
33Consider an i-node that contains 7 direct entries and 4 singly-indirect entries. Assume the block size is 2^8 bytes and that the block number takes 2^2 bytes. Compute the maximum file size in bytes.
[blank_start]_______[blank_end]- A67328
34Random block access is O(1) in the following disk block allocation techniques:
- AFile Allocation Table (FAT)
- Blinked allocation
- CIndexed allocation
- Dcontiguous allocation
35Consider a file that is contiguously allocated on disk starting from disk block number 425. What is the physical block number that stores byte number 31,946 of the file? Assume that disk block is 2 KB.
[blank_start]________[blank_end]- A440
36Consider a file that is contiguously allocated on disk starting from disk block number 2,533. What is the physical offset of byte number 97,881 of the file inside the disk block that stores that byte? Assume that disk block is 8 KB.
[blank_start]______[blank_end]- A7769
37Consider a file that is stored as a linked list of disk blocks. The list contains the following disk block numbers in order: 927,081 -> 676,548 -> 671,225 -> 374,896 -> 929,439. What is the physical block number that stores byte number 16,379 of the file? Assume that the disk block is 4 KB and that the block number takes 4 bytes.
[blank_start]________[blank_end]- A929439
38
Consider a file that uses an index block to store the numbers of the disk blocks of the file. The index block contains the following disk block numbers in order:
569,327
944,383
467,067
146,873
37,074
What is the physical block number that stores byte number 16,372 of the file? Assume that the disk block is 4 KB and that the block number takes 4 bytes.
[blank_start]________[blank_end]- A146873
39
Consider a magnetic disk that has 1,186 cylinders, 500 sectors per track (on average), 0.07 milliseconds minimum seek time, and 4800 rpm rotational speed. Assume that the disk heads have a constant speed. Each sector is 512 bytes, and each block is four sectors.
What is the maximum seek time in milliseconds (with 0 decimal places)?
[blank_start]_____[blank_end]- A83
40
Consider a magnetic disk that has 1,731 cylinders, 500 sectors per track (on average), 0.05 milliseconds minimum seek time, and 4,859 rpm rotational speed. Assume that the disk heads have a constant speed. Each sector is 512 bytes, and each block is four sectors.
What is the average rotational delay in milliseconds (rounded to no decimal places)?
[blank_start]_____[blank_end]- A6
41In modern magnetic disk drives, outer tracks have more sectors than inner tracks.
- AVerdadeiro
- BFalso
42When checking a file system for consistency, the list of used blocks and the list of free blocks are both populated from a single source, namely the i-nodes.
- AVerdadeiro
- BFalso
43The Direct Memory Access (DMA) controller has to interrupt the CPU after every block transfer.
- AVerdadeiro
- BFalso
44
Assume that a disk has 2,498 cylinders and that the heads are initially at cylinder 440, traveling toward higher-numbered cylinders.
Given the following sequence of disk requests, what is the total seek distance using FIFO disk arm scheduling?
234, 165, 462, 763, 581, 730
[blank_start]______[blank_end]- A1204
45
Assume that a disk has 8,959 cylinders and that the heads are initially at cylinder 526. Given the following sequence of disk requests, what is the total seek distance using the Shortest Seek Time First disk-arm scheduling algorithm?
990, 260, 194, 532, 65, 351
[blank_start]______[blank_end]- A1398
46Assume that a disk has 6,565 cylinders and that the heads are initially at cylinder 111, traveling toward higher-numbered cylinders.
Given the following sequence of disk requests, what is the total seek distance using the SCAN disk-arm scheduling algorithm?
535, 486, 257, 374, 59, 5
[blank_start]______[blank_end]- A13012
47Assume that a disk has 3,484 cylinders and that the heads are initially at cylinder 517, traveling toward higher-numbered cylinders.
Given the following sequence of disk requests, what is the total seek distance using the C-LOOK disk-arm scheduling algorithm, assuming that read/write happens only when the head is moving towards the highest-numbered cylinder?
614, 885, 2, 319, 983, 929
[blank_start]________[blank_end]- A1764
48Disk scheduling is important since it tries to decrease:
- Athe rotational delay
- Bthe polling time
- Cthe seek time
- Dthe transfer time
49Assume that it takes 0.08 milliseconds to access a disk block if the block is in the disk cache (i.e, in main memory) and 12 milliseconds if the block is on the disk. Assume that 2 level(s) of indexing is used and the cache hit ratio is 83%. What is the effective (average) disk access time in milliseconds (rounded to zero decimal places)? Ignore the i-node access time.
[blank_start]______[blank_end]- A6
50At 1 bit per 2^3 KB chunk, how many bytes of bitmap are needed per 1 MB of memory?
[blank_start]_____[blank_end]- A16
51In modern magnetic disk drives, outer tracks have more sectors than inner tracks.
- AVerdadeiro
- BFalso
52In the Unix file system, Access Control Lists (ACLs) apply to both files and directories, whereas in the Andrew File System (AFS), they only apply to directories.
- AVerdadeiro
- BFalso
53An access/protection matrix is generally dense.
- AVerdadeiro
- BFalso
54In Discretionary Access Control, the owner of a file cannot change the file's permissions.
- AVerdadeiro
- BFalso
55Cryptography must be unbreakable to be useful.
- AVerdadeiro
- BFalso
56The one-time pad algorithm is an example of unbreakable cryptography (i.e., it provides perfect secrecy).
- AVerdadeiro
- BFalso
57The one-time pad algorithm is an example of security by obscurity.
- AVerdadeiro
- BFalso
58In an access control matrix, the __________ right allows a process to change the entries in a row.
- Acopy
- Bcontrol/modify
- Cswitch/enter
59Which of the following is(are) necessary to protect against unauthorized modification of the access control policy of a system?
- ACryptographically-secured capabilities must be stored in kernel space
- BModifying and checking Access Control Lists is done via system calls
- CAccess Control Lists must be stored in kernel space
60An object with a high-security level in the Bell-La Padula multi-level security model may have a low integrity level in the Biba multi-level integrity level.
- AVerdadeiro
- BFalso
61Modern symmetric-key encryption is usually broken by brute-force.
- AVerdadeiro
- BFalso
62In a system that uses password salts, which of the following is stored inside the password file assuming h(.) is a cryptographically secure one-way hash function and || is the concatenation operation?
- Ah(password || salt) and salt
- Bh(password) and salt
- Cpassword and h(salt)
- Dh(password || salt) and h(salt)
63Which of the following is/are the advantage(s) of increasing the disk block size in a file system? (Choose all correct answers.)
- AIncreased disk read and write throughput
- BReduced disk block transfer delay
- CIncreased maximum file size for indexed allocation policy
- DIncreased disk space utilization
64In a file system, if all files are exactly 12KB, and the block size is 4KB, what is the percentage of disk space lost in internal fragmentation inside the file data blocks?
- Aroughly 30%
- B0%
- C100%
- D50%
65In a disk quota record, the number of block warnings left is initially equal to the soft block limit minus the hard block limit.
- AVerdadeiro
- BFalso
66Because modern systems have larger memory, disk write requests are mostly served from the disk block cache, and most requests that reach the disk are reads.
- AVerdadeiro
- BFalso
67In NAND solid-state disks, pages can be individually overwritten.
- AVerdadeiro
- BFalso
68An address generated by a CPU is referred to as a _________
- Aphysical address
- Blogical address
- Cpost relocation register address
- DMemory-Management Unit (MMU) generated address
69In the figure below, a logical address of 0x2002 will cause an error.
- AVerdadeiro
- BFalso
70Which page will be evicted next?

- AA
- BB
- CC
- DE
- EF
- FG
- GH
71In the previous example, which page will be selected by the Aging Replacement Algorithm right after Tick 4?
- APage 0
- BPage 1
- CPage 2
- DPage 3
- EPage 4
- FPage 5
72Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page offset?
- A0xAE
- B0xA
- C0xF9
- D0xF900
73Consider 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?
- A262144
- B1024
- C1048576
- D18
74For a 32-bit architecture machine with a physical memory of 4GB, a page frame size of 4KB, what is the number of the Page Table Entries in the conventional PT?
- A1M (2^20)
- B4G (2^32)
- C2^12 (4K)
- DNot enough info
75Without a mechanism such as an address-space identifier, the TLB must be flushed during a context switch.
- AVerdadeiro
- BFalso
76When the page-fault rate goes above A in the following graph, the OS should try to ....

- AAllocate more frames to the process
- BAllocate less frames to the process
77After it is determined that a desired piece of data is not in memory, the following occurs:
- Acache miss
- Bvalid bit is set to 0
- Creference bit is set to 0
- Dpage fault
78[trick question] Before going to main memory, the desired data is searched in (mark all that apply)
- Acache (any caches)
- BMMU
- CTLB
- Dpage table
79In the following logical-to-physical mapping for contiguous file allocation, the block size is ______.
Given a logical byte number of 2000:
physical_block_num = (2000 / 1024) + 5 = 6
offset_in_block = 2000 % 1024 = 976- A512 bytes
- B1 KB
- C1000 bytes
80In the logical to physical mapping equations for linked allocation, if the next pointer is stored in the beginning of the block, which of the following calculations has (have) to change?
struct disk_block block
blockNo = start
effective_block_size = block_size – sizeof(uint)
logical_block_num = pos / effective_block_size
offset_in_block = pos % effective_block_size
for (j = 0; j < logical_block_num; j++) {
read disk block no. blockNo into block
blockNo = block.next_block
}- AOffset calculation only
- Bthe for loop
- Cboth offset calculation and the for loop
81Seek time is the time it takes the
- Asector to reach the disk head
- Bdisk arm to reach the requested track
- Cdisk arm to reach the requested sector
- Dsector to reach the requested track
82Mark all that apply for IntelliSeek in Hard Drives
- Aattempts to make seek delay = rotational delay
- Breduces power consumption in hard drives
- Cincreases noise in hard drives
- Dincreases delay in an attempt to reduce noise
83For a 32-bit architecture machine with a physical memory of 4GB, a page frame size of 4KB, a 1-level paging system, what is the size of the page table (IN BITS), where each entry has the physical frame number, a valid bit, a reference bit, a dirty bit, and a protection bit.
- A2^20
- B2^32
- C24*2^20
84Mark all correct statements about Contiguous Disk Block Allocation for a multi-block file
- AReduces overall transfer delay as compared to Linked Allocation
- BReduces overall seek delay as compared to Indexed Allocation
- CResults in inefficient disk utilization when files are allowed to grow arbitrarily
- DReduces overall rotational delay as compared to FAT Allocation
85Which i-node structure allow for unlimited (i.e., only limited by partition size) file sizes?
- Ai-node with double-indirect links
- Bi-node with triple indirect links
- Ci-node with start block number (contiguous allocation)
- Di-node with start and end block numbers (linked allocation)
- Ei-node with start and end block numbers (File Allocation Table)
86In the following pseudo-code, how many hardware interrupts are needed to transfer the buffer to the printer?

- Acount
- Bcount -1
- Ccount + 1
87Assume the page frame and disk block are the same size. A large disk block will cause
- Aa larger average rotational delay
- Ba larger minimum seek delay
- Ca larger page transfer delay
- Dmore internal fragmentation in physical memory
- Ea smaller page table
88Assume that a disk has 1,716 cylinders and that the heads are initially at cylinder 510, traveling toward higher-numbered cylinders.
Given the following sequence of disk requests, what is the total seek distance using the C-LOOK disk-arm scheduling algorithm, assuming that read/write happens only when the head is moving towards the highest-numbered cylinder?
676, 848, 11, 369, 954, 909
[blank_start]______[blank_end]- A1745
89The elevator algorithm and the shortest-seek-time-first algorithm have in common
- AThey both minimize seek delay
- BThey both minimize rotational delay
- CThey both minimize transfer delay
- DNone of the above
90Using the following access matrix, can a process running in Domain 3 write into both File 3 and File 2?

- Ayes
- Bno
91In the technique described in the previous slide (covert channel using file locking), a process wants to covertly send data one byte at a time into another process. How many files are needed?
- A8
- B9
- C7
92m is a message, {m}K is the message encrypted with a public key K, and [m]K−1 is the message mangled then decrypted by a private key K−1.
Given an active adversary who can read, modify, block, and replay messages, which security service(s) is(are) provided in the following scenario?
Alice sends ["Alice" ∣∣ R ∣∣ m]KA−1 to Bob, where R is a random number that was never used by Alice before and "Alice" ∣∣ R ∣∣ m is the concatenation of the string "Alice" with the number R and the message m.- AConfidentiality (i.e., no one other than Alice and Bob can see the contents of the message m)
- BSource Authentication (i.e., Bob's assurance that Alice and no one else has sent the message)
- CIntegrity (i.e., no one other than Alice and Bob can modify the contents of the message m)
- DAvailability
93How many page faults are needed to crack a password of length 10 characters using the TENEX password attack?
[blank_start]____[blank_end]- A10
94At 1 bit per 2^5 KB chunk, how many bytes of bitmap are needed per 1 GB of memory?
[blank_start]_____[blank_end]- A4096
95In contiguous allocation, the physical block number is the same as the logical block number.
- AVerdadeiro
- BFalso
96
Given the following page reference string, count the number of page faults and disk writes for a memory capacity of 4 frames using the CLOCK page replacement algorithm. The R and W letters indicate whether the memory access is a read or a write, respectively.
Reference string: R0, W1, W2, R3, W0, R1, R4, R0, R1, W2, W3, W4, R5, R6, W3, R2, W1, R0.
Write your answer as x,y, where x is the number of page faults and y is the number of disk writes.
[blank_start]_____[blank_end]- A13,6
97The disk blocks allocated to a file are returned to the list of free blocks when:
- AThe file's owner deletes the file
- BThe file's owner changes the file name
- CThe file's permissions are changed so that even the file's owner cannot access the file
- DThe link count inside the file's i-node reaches 0
98
Assume that a disk has 9,328 cylinders and that the heads are initially at cylinder 212, traveling toward higher-numbered cylinders.
Given the following sequence of disk requests, what is the total seek distance using FIFO disk arm scheduling?
332, 951, 600, 476, 313, 219
[blank_start]______[blank_end]- A1471
99
Assume that a disk has 9,005 cylinders and that the heads are initially at cylinder 512. Given the following sequence of disk requests, what is the total seek distance using the Shortest Seek Time First disk-arm scheduling algorithm?
990, 288, 166, 518, 35, 385
[blank_start]______[blank_end]- A1444
100Assume that a disk has 1,384 cylinders and that the heads are initially at cylinder 140, traveling toward higher-numbered cylinders.
Given the following sequence of disk requests, what is the total seek distance using the SCAN disk-arm scheduling algorithm?
515, 467, 210, 313, 57, 7
[blank_start]_____[blank_end]- A2619
101Assume that a disk has 6,929 cylinders and that the heads are initially at cylinder 592, traveling toward higher-numbered cylinders.
Given the following sequence of disk requests, what is the total seek distance using the C-LOOK disk-arm scheduling algorithm, assuming that read/write happens only when the head is moving towards the highest-numbered cylinder?
691, 855, 8, 363, 973, 902
[blank_start]______[blank_end]- A1701
102In a file system, if all files are exactly 32KB, and the block size is 4KB, what is the percentage of disk space lost in internal fragmentation inside the file data blocks?
- A0%
- Broughly 30%
- C50%
- D100%
103The Direct Memory Access (DMA) controller has to interrupt the CPU after every block transfer.
- AVerdadeiro
- BFalso
104Assume that it takes 0.09 milliseconds to access a disk block if the block is in the disk cache (i.e, in main memory) and 13 milliseconds (including the cache access time) if the block is on the disk. Assume that 2 level(s) of indexing is used and the cache hit ratio is 83%. What is the effective (average) disk access time in milliseconds (rounded to two decimal places)? Ignore the i-node access time and assume that if a disk block is not in the cache then all the needed index blocks will not be in the cache as well.
[blank_start]____[blank_end]- A7
105Linked allocation suffers from external fragmentation.
- AVerdadeiro
- BFalso
106
Given the following page reference string, count the number of page faults for a memory capacity of 4 frames using LRU page replacement.
Reference string: 0, 1, 2, 3, 4, 1, 2, 3, 5, 3, 2, 1, 6, 1, 2, 3.
[blank_start]_____[blank_end]- A7
107
Consider a magnetic disk that has 1,927 cylinders, 500 sectors per track (on average), 0.017 milliseconds minimum seek time, and 4800 rpm rotational speed. Assume that the disk heads have a constant speed. Each sector is 512 bytes, and each block is four sectors.
What is the maximum seek time in milliseconds (with 0 decimal places)?
[blank_start]_____[blank_end]- A33
108
Consider a magnetic disk that has 4,435 cylinders, 500 sectors per track (on average), 0.03 milliseconds minimum seek time, and 6,087 rpm rotational speed. Assume that the disk heads have a constant speed. Each sector is 512 bytes, and each block is four sectors.
What is the average rotational delay in milliseconds (rounded to no decimal places)?
[blank_start]_____[blank_end]- A5
109Consider an i-node that contains 10 direct entries and 9 singly-indirect entries. Assume the block size is 2^11 bytes and that the block number takes 2^2 bytes. Compute the maximum file size in bytes.
[blank_start]______[blank_end]- A9457664
110In a file system that uses 16-bit block numbers, what is the maximum partition size given that the block size is 8 KB.
- A128 MB
- B256 MB
- C512 MB
- D1024 MB
111Imagine a virtual memory system with page size equal to 256 bytes. Only the first 5 entries in the conventional page table of a process are valid, and they contain the following frame numbers (in hexadecimal): 915, 231, 381, 73, 644. The numbering of virtual pages and physical frames both start at 0. What is the corresponding physical address (in hexadecimal) to the virtual address 0x244? If the access causes a page fault, write -1.
[blank_start]_____[blank_end]- A38144
112Multi-level queues scheduling with ageing:
- Ais a fair scheduling policy
- Bis more general than multi-level queues with feedback
- Cmay cause starvation of some processes
- Dfavors long jobs
113In the Not Frequently Used page-replacement algorithm, which of the following ordered pairs (Reference
bit, Dirty bit) represents a page that would be the worst choice for replacement?- A(0,0)
- B(0,1)
- C(1,0)
- D(1,1)
114Optimal page replacement
- Ais the page-replacement algorithm most often implemented
- Bis used for comparison with other page-replacement schemes
- Ccan suffer from Belady's anomaly
- Drequires that the system keep track of previously used pages
115The page offset in virtual addresses is the same size (number of bits) as the page offset in physical addresses.
- AVerdadeiro
- BFalso
116A page replacement algorithm typically involves the cooperation of the following components:
- AMMU processing (in hardware) that occurs every memory access
- BOS code that runs every memory access
- COS code that runs every clock interrupt
- DOS code that runs every page fault
117Smaller page size leads to:
- Asmaller page tables
- Bmore TLB misses
- Cfewer page faults
- Dreduced paging I/O throughput
- Eless internal fragmentation
118A computer has 32-bit virtual addresses and the page size is 2^2 KB. Suppose the text, data, and stack segments of
a process need 6 page(s) each. If the computer uses one-level page tables, how many page table entries (PTEs) need to be in memory when the process starts running? (Hint: The entire page table needs to be in memory.)
[blank_start]_________[blank_end]- A1048576
119
A computer has 32-bit virtual addresses and the page size is 2^7 KB. Suppose the text, data, and stack segments of a process need 8 page(s) each.
If the computer uses two-level page tables, with 2 bits for the second-level index, how many page directory entries (PDEs) are in the first-level page table?
[blank_start]_______[blank_end]- A8192
120
A computer has 32-bit virtual addresses and the page size is 2^2 KB. Suppose the text, data, and stack segments of a process need 8 page(s) each.
If the computer uses two-level page tables, with 7 bits for the second-level index, how many page table entries (PTEs) are in each second-level page table?
[blank_start]______[blank_end]- A128
121
A computer has 32-bit virtual addresses and the page size is 2^8 KB. Suppose the text, data, and stack segments of a process need 3 page(s) each.
If the computer uses two-level page tables, with 5 bits for the second-level index, how many second-level page tables are needed to cover the text, data, and stack segments of the process? Note that the text and data segments are contiguous in the process's address space, but the stack is at the other end of the address space.
[blank_start]_____[blank_end]- A2
122All addresses inside page table entries of a two-level page table are physical addresses.
- AVerdadeiro
- BFalso
123Fragmentation (both internal and external) does not occur in a paging memory system.
- AVerdadeiro
- BFalso
124In Project 3, right after writing to the virtual address 0xFFFAABBB, which of the following need(s) to be true? (Assume the page size is 4 KB.)
- Avalid[0xFFFAA] = 1
- Bmodified[0xFFFAA] = 1
- Cmodified[0xFFFAABBB] = 1
- Dvalid[0xFFFAABBB] = 1
125Imagine a virtual memory system with page size equal to 256 bytes. Only the first 5 entries in the conventional page table of a process are valid, and they contain the following frame numbers (in hexadecimal): 918, 306, 778, 755, 983. The numbering of virtual pages and physical frames both start at 0. What is the corresponding virtual address (in hexadecimal) to the physical address 0x77833? Write -1 if no virtual address corresponds to the given physical address.
[blank_start]______[blank_end]- A233
126In modern magnetic disk drives, outer tracks have more sectors than inner tracks.
- AVerdadeiro
- BFalso
127A disk scheduler that assigns higher priority to the CPU-bound processes than the I/O-bound processes causes:
- AHigh CPU utilization and high I/O utilization
- BHigh CPU utilization and low I/O utilization
- CLow CPU utilization and high I/O utilization
- DLow CPU utilization and low I/O utilization
128Virtual addresses must be the same size (number of bits) as physical addresses.
- AVerdadeiro
- BFalso
129The working set is defined as the set of pages used by the 4 most recent memory accesses, what is the working set size right after the last reference in the following reference string?
Reference string: 0, 1, 2, 3, 0, 1, 4, 0, 1, 2, 3, 4, 5, 6, 3, 2, 1, 0.
[blank_start]______[blank_end]- A4
130Consider a file that is contiguously allocated on disk starting from disk block number 22. What is the physical offset of byte number 93,409 of the file inside the disk block that stores that byte? Assume that disk block is 3 KB.
[blank_start]____[blank_end]- A1249
131
Consider a file that is stored as a linked list of disk blocks. The list contains the following disk block numbers in order:
185,867
211,653
534,919
451,832
901,969
What is the physical block number that stores byte number 17,766 of the file? Assume that the disk block is 4 KB.
[blank_start]________[blank_end]- A901969
132
Consider a file that uses an index block to store the numbers of the disk blocks of the file. The index block contains the following disk block numbers in order:
44,115
670,396
677,986
663,180
693,869
What is the physical block number that stores byte number 16,381 of the file? Assume that the disk block is 4 KB and that the block number takes 4 bytes.
[blank_start]_______[blank_end]- A663180
133Given the following page reference string, count the number of page faults for a memory capacity of 4 frames using the CLOCK page replacement algorithm.
Reference string: 0, 1, 2*, 3, 0*, 1*, 4, 0, 1, 2, 3*, 4, 5, 6, 3*, 2*, 1, 0. The starred numbers represent write accesses.- A13
- B12
- C14
- D15
134
Given the following page reference string, count the number of disk writes for a memory capacity of 4 frames using the CLOCK page replacement algorithm.
Reference string: 0, 1, 2*, 3, 0*, 1*, 4, 0, 1, 2, 3*, 4, 5, 6, 3*, 2*, 1, 0. The starred numbers represent write accesses.- A1
- B6
- C0
- D2
- E3
135When checking a file system for consistency, the list of used blocks and the list of free blocks are both populated from a single source, namely the free-block list.
- AVerdadeiro
- BFalso
136The Direct Memory Access (DMA) controller doesn't interrupt the CPU at all.
- AVerdadeiro
- BFalso
137
Assume that a disk has 8,408 cylinders and that the heads are initially at cylinder 488, traveling toward higher-numbered cylinders.
Given the following sequence of disk requests, what is the total seek distance using FIFO disk arm scheduling?
640, 14, 734, 531, 307, 547
[blank_start]_______[blank_end]- A2165
138
Assume that a disk has 4,710 cylinders and that the heads are initially at cylinder 537. Given the following sequence of disk requests, what is the total seek distance using the Shortest Seek Time First disk-arm scheduling algorithm?
953, 300, 168, 494, 39, 372
[blank_start]______[blank_end]- A1412
139Assume that a disk has 4,943 cylinders and that the heads are initially at cylinder 141, traveling toward higher-numbered cylinders.
Given the following sequence of disk requests, what is the total seek distance using the SCAN disk-arm scheduling algorithm?
639, 499, 242, 322, 87, 20
[blank_start]______[blank_end]- A9723
140Assume that a disk has 9,515 cylinders and that the heads are initially at cylinder 522, traveling toward higher-numbered cylinders.
Given the following sequence of disk requests, what is the total seek distance using the C-LOOK disk-arm scheduling algorithm, assuming that read/write happens only when the head is moving towards the highest-numbered cylinder?
660, 865, 3, 387, 989, 914
[blank_start]______[blank_end]- A1837
141Disk scheduling is important since it tries to decrease:
- AThe seek time
- BThe polling time
- CThe rotational delay
- DThe transfer time
142In a file system, if all files are exactly 186 KB, and the block size is 256 KB, what is the percentage (rounding to zero decimal places) of disk space lost in internal fragmentation inside the file data blocks? (Don't write the percentage sign (%).)
[blank_start]_____[blank_end]- A27
143In a disk quota record, the number of files warnings left is initially equal to the soft block limit minus the hard block limit.
- AVerdadeiro
- BFalso
144Assume that it takes 0.02 milliseconds to access a disk block if the block is in the disk cache (i.e, in main memory) and 11 milliseconds if the block is on the disk. Assume that 2 level(s) of indexing is used and the cache hit ratio is 87%. What is the effective (average) disk access time in milliseconds (rounded to zero decimal places)? Ignore the i-node access time.
[blank_start]_____[blank_end]- A4
145External fragmentation does not occur in a paging memory system.
- AVerdadeiro
- BFalso
146Match each of the following file system inconsistency situations to the most accurate reason that caused the inconsistency.
A disk block is neither marked as free nor used by any i-node. [blank_start]________[blank_end]
A disk block is both marked as free and as used by an i-node. [blank_start]_________[blank_end]
A disk block is marked as used by two different i-nodes. [blank_start]___________[blank_end]
A disk block appears twice in the free-block list. [blank_start]_________[blank_end]
A. A system crash occurred right after removing the block from the free-list and before adding it to the i-node
B. The disk block was marked as used by two different i-nodes.
C. The disk block was both marked as free and as used by an i-node.
D. A system crash occurred right after adding the block to the free-list and before removing it from the i-node- AA
- BB
- CC
- DD
- EA
- FB
- GC
- HD
- IA
- JB
- KC
- LD
- MA
- NB
- OC
- PD
147
Imagine a virtual memory system with a page size equal to 2 KB. Assume that the first 5 entries in the inverted page table contain the following (process id, virtual page number) pairs:
(10, 4), (30, 6), (20, 2), (30, 1), (10, 7).
(Numbering of virtual pages and physical frames both start at 0.)
To which physical address will the virtual address 0x2100 accessed by process 20 translate?- A0x3200
- B0x1200
- CPage Fault
148
Imagine a virtual memory system with a page size equal to 2 KB. Assume that the first 5 entries in the inverted page table contain the following (process id, virtual page number) pairs:
(10, 4), (30, 6), (20, 2), (30, 8), (10, 7).
(Numbering of virtual pages and physical frames both start at 0.)
To which virtual address (if any) in the address space of Process 30 does the physical address 0x4500 correspond?- A0x5700
- B0x1D00
- C0x8500
- DThe physical address 0x4500 doesn't belong to Process 30
149
Given the following page reference string, count the number of page faults for a memory capacity of 3 frames using LRU page replacement.
Reference string: 0, 1, 2*, 3*, 0, 1*, 4, 0*, 1, 2*, 3*, 4, 5, 6, 3*, 2, 1*, 0. The starred numbers represent write accesses.- A16
- B10
- C17
- D15
150
Given the following page reference string, count the number of disk writes for a memory capacity of 3 frames using LRU page replacement.
Reference string: 0, 1, 2*, 3*, 0, 1*, 4, 0*, 1, 2*, 3*, 4, 5, 6, 3*, 2, 1*, 0. The starred numbers represent write accesses.- A4
- B8
- C0
- D7
151The indexed allocation technique of disk blocks suffers from external fragmentation.
- AVerdadeiro
- BFalso
152
Consider a magnetic disk that has 1,424 cylinders, 500 sectors per track (on average), 0.017 milliseconds minimum seek time, and 4800 rpm rotational speed. Assume that the disk heads have a constant speed. Each sector is 512 bytes, and each block is four sectors.
What is the maximum seek time in milliseconds (rounded to zero decimal places)?
[blank_start]____[blank_end]- A24
153
Consider a magnetic disk that has 8,879 cylinders, 500 sectors per track (on average), 0.07 milliseconds minimum seek time, and 4,731 rpm rotational speed. Assume that the disk heads have a constant speed. Each sector is 512 bytes, and each block is four sectors.
What is the average rotational delay in milliseconds (rounded to no decimal places)?
[blank_start]____[blank_end]- A6
154Consider an i-node that contains 9 direct entries, 3 singly-indirect entries, and 6 doubly-indirect entries. Assume the block size is 2^12 bytes and that the block number takes 2^3 bytes. Compute the maximum file size in bytes.
[blank_start]_________[blank_end]- A6448779264
155In a file system that uses 11-bit block numbers, what is the maximum partition size in bytes given that the block size is 13 KB.
[blank_start]__________[blank_end]- A27262976
156Multi-level queues scheduling with aging:
- Ais a fair scheduling policy
- Bfavors long jobs
- Cmay cause starvation of some processes
- Dis more general than multi-level queues with feeback
157
Consider the following set of processes, with the arrival time and length of
CPU burst in milliseconds. The context switching overhead is 1 ms.
Process Arrival Time Burst Time
P1 2 5
P2 0 1
P3 8 4
P4 4 2
P5 7 3
The CPU utilization is the percentage of time that the CPU is running process code (i.e., not idle and not in context switching). What is the average response time for multilevel feedback queues with three queues: from highest to lowest priority, q0 (quantum = 1 ms), q1 (quantum = 2 ms), and q2 (quantum = 4 ms)?- A12.4 ms
- B12 ms
- C13.3 ms
- D14 ms
158In the Not Frequently Used page-replacement algorithm, which of the following ordered pairs (Reference bit, Dirty bit) represents a page that would be the best choice for replacement?
- A(0,0)
- B(0,1)
- C(1,0)
- D(1,1)
159Given the following page reference string, count the number of page faults for a memory capacity of 5 frames using the OPT page replacement algorithm.
Reference string: 0, 1, 2*, 3, 0*, 1*, 4, 0, 1, 2, 3*, 4, 5, 6, 3*, 2*, 1, 0. The starred numbers represent write accesses.- A7
- B5
- C6
- D8
160Given the following page reference string, count the number of disk writes for a memory capacity of 5 frames using the OPT page replacement algorithm.
Reference string: 0, 1, 2*, 3, 0*, 1*, 4, 0, 1, 2, 3*, 4, 5, 6, 3*, 2*, 1, 0. The starred numbers represent write accesses.- A0
- B1
- C5
- D2
161Mark all correct statements about the optimal page replacement algorithm (OPT)
- Ais the page-replacement algorithm most often implemented
- Bis used for comparison with other page-replacement schemes
- Ccan suffer from Belady's anomaly
- Drequires that the system keep track of previously used pages
- Eis a stack page replacement algorithm
162How many page table entries (PTEs) does a conventional page table contain in a 53-bit machine (i.e., the logical address is 53 bits) and with 2^(2) KB page size?
[blank_start]______[blank_end]- A2199023255552
163A computer has 32-bit virtual addresses and the page size is 2^2 KB. Suppose the text, data, and stack segments of
a process need 5 page(s) each. If the computer uses one-level page tables, how many page table entries (PTEs) need to be in memory when the process starts running? (Hint: The entire page table needs to be in memory.)
[blank_start]_______[blank_end]- A1048576
164
A computer has 32-bit virtual addresses and the page size is 2^7 KB. Suppose the text, data, and stack segments of a process need 6 page(s) each.
If the computer uses two-level page tables, with 10 bits for the second-level index, how many page directory entries (PDEs) are in the first-level page table?
[blank_start]______[blank_end]- A32
165
A computer has 32-bit virtual addresses and the page size is 2^8 KB. Suppose the text, data, and stack segments of a process need 2 page(s) each.
If the computer uses two-level page tables, with 2 bits for the second-level index, how many page table entries (PTEs) are in each second-level page table?
[blank_start]_____[blank_end]- A4
166
A computer has 32-bit virtual addresses and the page size is 2^6 KB. Suppose the text, data, and stack segments of a process need 7 page(s) each.
If the computer uses two-level page tables, with 8 bits for the second-level index, how many second-level page tables are needed to cover the text, data, and stack segments of the process? Note that the text and data segments are contiguous in the process's address space, but the stack is at the other end of the address space.
[blank_start]_____[blank_end]- A2
167All addresses inside inverted page table entries are physical addresses.
- AVerdadeiro
- BFalso
168In memory paging systems, virtual pages and physical frames have the same size.
- AVerdadeiro
- BFalso
169Smaller page size leads to:
- Asmaller page tables
- Bmore TLB misses
- Cfewer page faults
- Dreduced paging I/O throughput
- Eless internal fragmentation
170(Mark all correct answers.) In Project 3, right after reading from the virtual address 0xFFFAABBB, which of the following need(s) to be true? (Assume the page size is 4 KB.)
- Avalid[0xFFFAA] = 1
- Bmodified[0xFFFAA] = 1
- Cmodified[0xFFFAABBB] = 1
- Dvalid[0xFFFAABBB] = 1
171How many entries does an inverted page table contain in a 35-bit machine (i.e., the logical address is 35 bits) and with 2^(5) KB page size? Assume that the system contains 2^(12) MB physical RAM.
[blank_start]______[blank_end]- A131072
172Imagine a virtual memory system with page size equal to 256 bytes. Only the first 5 entries in the conventional page table of a process are valid, and they contain the following frame numbers (in hexadecimal): 865, 712, 951, 469, 291. The numbering of virtual pages and physical frames both start at 0. What is the corresponding virtual address (in hexadecimal) to the physical address 0x95116? Write -1 if no virtual address corresponds to the given physical address.
[blank_start]_____[blank_end]- A216
173In modern magnetic disk drives, outer tracks have more sectors than inner tracks.
- AVerdadeiro
- BFalso
174In virtual memory paging systems, the virtual address space and the physical address space have to be the same size.
- AVerdadeiro
- BFalso
175The difference between the Not Recently Used (NRU) page-replacement algorithm and the Not Frequently Used (NFU) algorithm is that in NRU the counter inside each Page Table Entry is incremented every memory access, whereas in NFU it is incremented every clock interrupt.
- AVerdadeiro
- BFalso
176Virtual memory is not feasible to implement on 64-bit machines because the page table size is too large to fit in main memory.
- AVerdadeiro
- BFalso
177In a three-level page table architecture, the second-level and third-level page tables are paged in and out of main memory like normal pages.
- AVerdadeiro
- BFalso
178The i-nodes for directories are stored on the heap, whereas the i-nodes for files are stored in the file allocation table
- AVerdadeiro
- BFalso
179To get notified when a page is accessed, an operating system may set the valid bit of the Page Table Entry (PTE) to false even though the page is in memory.
- AVerdadeiro
- BFalso
180The optimal page replacement algorithm (OPT) is a stack page-replacement policy.
- AVerdadeiro
- BFalso
181In magnetic hard disks that use the IntelliSeek technology, the rotational delay and the transfer delay are overlapped; the sector rotates to the head, and at the same time, the head rotates to reach the sector.
- AVerdadeiro
- BFalso
182The read and write throughput of a Solid State Disk (SSD) degrades as the disk fills up with data.
- AVerdadeiro
- BFalso
183Two directories, dirA and dirB, link to a file named fileA. After the file is deleted from dirA, but not from dirB, the blocks of the file are returned to the free-block list
- AVerdadeiro
- BFalso
184A disk block is neither in the free-block list not used by an i-node. What are possible reasons for that situation?
- AThe block was allocated to two different i-nodes then a system crash occurred
- BA system crash occurred after the block was removed from the free-block list but before it was allocated to an i-node
- CA system crash occurred after the block was allocated to an i-node but before it was removed from the free-block list
- DA system crash occurred after the block was removed from an i-node but before it was returned back to the free-block list
185A computer system has 64 GB of physical memory (RAM), and the inverted page table has 220 entries. What is the page size in bytes in that system?
[blank_start]______[blank_end]- A64 KB
186In a virtual memory system that uses two-level page tables, which part of the virtual address is copied verbatim to the corresponding physical address?
- Apage offset
- Bfirst-level page number
- Cframe number
- Dsecond-level page number
187In the Working Set Clock (WS-CLOCK) page replacement algorithm, if the counter of a page is 10000000 right after clock tick X and the page has been referenced between clock ticks X and X+1, what is the value of the page’s age (global counter - local counter) right after clock tick X+1? Assume that the global counter has the value 1110001110
- A01000000
- B10000000
- C1110001110
- D0
188(Mark all that apply) In a virtual memory system with two-level page tables, when might a page fault occur?
- Aa requested page is not in memory
- Ba TLB hit occurs and the first-level page table is not in memory
- Ca TLB miss occurs and a second-level page table is not in memory
- Da TLB hit occurs and a second-level page table is not in memory
189Which of the following is a side effect of having a large disk block cache?
- AThe disk sees more reads than writes
- BThe disk sees more writes than reads
- CThe SCAN disk scheduling algorithm outperforms FIFO
- DThe average page fault rate decreases
190The page fault rate of a process increased after increasing the number of physical frames assigned to the process. Select all possible reasons for that behavior.
- AThe working set of the process increased
- BThe system used FIFO page-replacement and suffered from Belady’s anomaly
- CA global page replacement policy was used
- DThe system used an inverted page table
191The average disk read time of a process decreased when it was run concurrently with other processes. Select all possible reasons for that behavior.
- AMore dirty pages were written to disk
- BMore disk reads were served from the disk block cache
- CContext switching overhead decreased
- DPage locking happened more frequently
192The following code snippet represents logical to physical mapping in a file system. pos is the logical byte number and index block is an index block.
logical_block_no = pos / 4096;
offset_in_block = pos % 4096;
physical_block_no = index_block[logical_block_no];
What is the block size in the file system?- A1024 bytes
- B4096 bytes
- Cindex.block[logical_block_no]
- Dnot enough info
193The following code snippet represents logical to physical mapping in a file system. pos is the logical byte number and index block is an index block.
logical_block_no = pos / 4096;
offset_in_block = pos % 4096;
physical_block_no = index_block[logical_block_no];
How many levels of indexing are used for that file?- A0
- B1
- C2
- D3
194The following code snippet represents logical to physical mapping in a file system. pos is the logical byte number and index block is an index block.
logical_block_no = pos / 4096;
offset_in_block = pos % 4096;
physical_block_no = index_block[logical_block_no];
Assuming that a block number takes 32 bits, what is the maximum file size?- A1MB
- B2MB
- C4MB
- D16MB
195The two main approaches for keeping track of free disk blocks are:
- ABuffering and polling
- BBitmap and linked list of free blocks
- CParity and RAID
- Di-node and File Allocation Table
196The FAT-32 file system has 28-bit block numbers and 32-bit sector number. Given that the sector size is 512 bytes and the block size is 64 sectors, what is the maximum partition size?
- A1 TB
- B2 TB
- C4 TB
- D8 TB
197(Mark all that apply). Which of the following items is/are stored in the global open-file table?
- Ai-node number
- Bfile access mode (e.g. read-only)
- Ccurrent position in file
- Dquota pointer
198Consider a file system with 20-byte disk blocks. A linked list is used to keep track of the free blocks. How many blocks would the linked list take when there are 10 free blocks? Assume that the block number takes four bytes and that each node in the list is one disk block and contains a pointer to the next node.
Linked-list size = [blank_start]________[blank_end] blocks- A3
199Consider an i-node that contains nine direct entries, two single indirect entries, and four double indirect entries. Assume the block size is 512 bytes and that the block number takes four bytes. How many index blocks are needed when the file is at its maximum size?
Number of index blocks = [blank_start]______[blank_end] blocks- A518
Informações
- Descrição
- Questions from homework, tophat, and finals prep material to help study for Khattab's 1550 final.
- Autor
- Court Kowaluk
- Idioma
- English
- Visualizações
- 1
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz