Exam 2 assignment questions Flashcards

1
Q

Absolute code can be generated for ____.

  • compile time binding
  • load time binding
  • execution time binding
  • interrupt binding
A

compile time binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

_____ 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
A

execution time binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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
A

logical address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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
A

200

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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
A

memory management unit (MMU)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

a stub is included in the image for each library-routine reference

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The _____ binding scheme facilitates swapping.

  • interrupt time
  • load time
  • assembly time
  • execution time
A

execution time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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
A

for priority-based scheduling algorithms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

_____ 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
A

Best-fit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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.
A

It is possible only if relocation is dynamic and done at execution time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A(n) ____ page table has one page entry for each real page (or frame) of memory.

  • inverted
  • clustered
  • forward-mapped
  • virtual
A

inverted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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
A

13

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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
A

262144

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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
A

108.5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

_____ 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
A

Worst-fit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page number?

  • 0xAE
  • 0xF9
  • 0xA
  • 0x00F9
A

0xAE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page offset?

  • 0xAE
  • 0xF9
  • 0xA
  • 0xF900
A

0xF9

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

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
A

9

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

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
A

segment number and offset

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

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
A

all of the above

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

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
A

1200

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

A(n) ______ matches the process with each entry in the TLB.

  • address space identifier
  • process id
  • stack
  • page number
A

address space identifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

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.
A

They are a common approach for handling address spaces larger than 32 bits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

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.
A

The micro TLB must be flushed at each context switch.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

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
A

small size of mobile applications do not require use of swap space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

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)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

The ARM architecture uses both single-level and two-level paging.
(True/False)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Fragmentation does not occur in a paging system.

True/False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Hashed page tables are particularly useful for processes with sparse address spaces.
(True/False)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Inverted page tables require each process to have its own page table.
(True/False)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Without a mechanism such as an address space identifier, the TLB must be flushed during a context switch.
(True/False)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

A 32-bit logical address with an 8 KB page size will have 1,000,000 entries in a conventional page table.
(True/False)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Hashed page tables are commonly used when handling addresses larger than 32 bits.
(True/False)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

The x86-64 bit architecture only uses 48 of the 64 possible bits for representing virtual address space.
(True/False)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Mobile operating systems typically support swapping.

True/False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

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.
A

All of the above.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

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
A

physical memory is separated from logical memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

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
A

allows the child process to use the address space of the parent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

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
A

8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

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
A

3, 4, 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

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
A

8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

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
A

3, 1, 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

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
A

for some page replacement algorithms, the page fault rate may increase as the number of allocated frames increases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

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
A

is used mostly for comparison with other page replacement schemes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

The _____ allocation algorithm allocates available memory to each process according to its size.

  • equal
  • global
  • proportional
  • slab
A

proportional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

The ____ is the number of entries in the TLB multiplied by the page size.

  • TLB cache
  • page resolution
  • TLB reach
  • hit ratio
A

TLB reach

47
Q

________ allows the parent and child processes to initially share the same pages, but when either process modifies a page, a copy of the shared page is created.

  • Copy-on-write
  • Zero-fill-on-demand
  • Memory-mapped
  • Virtual memory fork
A

-Copy-on-write

48
Q

_____ is the algorithm implemented on most systems.

  • FIFO
  • Least frequently used
  • Most frequently used
  • LRU
A

LRU

49
Q

_____ occurs when a process spends more time paging than executing.

  • Thrashing
  • Memory mapping
  • Demand paging
  • Swapping
A

-Thrashing

50
Q

Windows uses a local page replacement policy _____.

  • when a process exceeds its working set minimum
  • when a process exceeds its working set maximum
  • when the system undergoes automatic working set trimming
  • under all circumstances
A

when a process exceeds its working set minimum

51
Q

The _____ is an approximation of a program’s locality.

  • locality model
  • working set
  • page fault frequency
  • page replacement algorithm
A

working set

52
Q

______ allows a portion of a virtual address space to be logically associated with a file.

  • Memory mapping
  • Shared memory
  • Slab allocation
  • Locality of reference
A

Memory mapping

53
Q

In general, virtual memory decreases the degree of multiprogramming in a system.
(True/False)

A

False

54
Q

Stack algorithms can never exhibit Belady’s anomaly.

True/False

A

True

55
Q

If the page-fault rate is too high, the process may have too many frames.
(True/False)

A

False

56
Q

On a system with demand paging, a process will experience a high page fault rate when the process begins execution.
(True/False)

A

True

57
Q

On systems that provide it, vfork() should always be used instead of fork().
(True/False)

A

False

58
Q

The SSTF scheduling algorithm ____.

  • services the request with the maximum seek time
  • services the request with the minimum seek time
  • chooses to service the request furthest from the current head position
  • none of the above
A

services the request with the minimum seek time

59
Q

Low-level formatting ____.

  • does not usually provide an error-correcting code
  • is usually performed by the purchaser of the disk device
  • is different from physical formatting
  • divides a disk into sections that the disk controller can read and write
A

divides a disk into sections that the disk controller can read and write

60
Q

Host-attached storage is ____.

  • a special purpose storage system that is accessed remotely over a data network
  • not suitable for hard disks
  • accessed via local I/O ports
  • not suitable for use in raid arrays
A

accessed via local I/O ports

61
Q

Swap space management ____.

  • is a high-level operating system task
  • tries to provide the best throughput for the virtual memory system
  • is primarily used to increase the reliability of data in a system
  • none of the above
A

tries to provide the best throughput for the virtual memory system

62
Q

A RAID structure ____.

  • is primarily used for security reasons
  • is primarily used to ensure higher data reliability
  • stands for redundant arrays of inexpensive disks
  • is primarily used to decrease the dependence on disk drives
A

is primarily used to ensure higher data reliability

63
Q

RAID level ____ is the most common parity RAID system.

  • 0
  • 0+1
  • 4
  • 5
A

5

64
Q
Which of the following disk head scheduling algorithms does not take into account the current position of the disk head?
FCFS
SSTF
SCAN
LOOK
A

FCFS

65
Q

The location where Windows places its boot code is the _____.

  • boot block
  • master boot record (MBR)
  • boot partition
  • boot disk
A

-master boot record (MBR)

66
Q

What are the two components of positioning time?

  • seek time + rotational latency
  • transfer time + transfer rate
  • effective transfer rate - transfer rate
  • cylinder positioning time + disk arm positioning time
A

seek time + rotational latency

67
Q

Which of the following statements is false?

  • Swapping works in conjunction with virtual memory techniques.
  • Some systems allow for multiple swap spaces (disks).
  • Solaris only swaps pages of anonymous memory.
  • Typically, entire processes are swapped into memory.
A

Typically, entire processes are swapped into memory.

68
Q

Which RAID level is best for storing large volumes of data?

  • RAID levels 0 + 1 and 1 + 0
  • RAID level 3
  • RAID level 4
  • RAID level 5
A

-RAID level 5

69
Q

A _____ is a private network connecting servers and storage units.

  • host-attached storage
  • network-attached storage
  • storage area network
  • private area network
A

storage area network

70
Q

Which of the following statements regarding solid state disks (SSDs) is false?

  • They generally consume more power than traditional hard disks.
  • They have the same characteristics as magnetic hard disks, but can be more reliable.
  • They are generally more expensive per megabyte than traditional hard disks.
  • They have no seek time or latency.
A

They generally consume more power than traditional hard disks.

71
Q

Solid state disks (SSDs) commonly use the ___________ disk scheduling policy.

  • SSTF
  • SCAN
  • FCFS
  • LOOK
A

-FCFS

72
Q

A(n) ____ file is a sequence of bytes organized into blocks that can be understood by the system’s linker.

  • text
  • source
  • object
  • executable
A

-object

73
Q

A(n) ____ file is a series of code sections that the loader can bring into memory and execute.

  • text
  • source
  • object
  • executable
A

executable

74
Q

In an environment where several processes may open the same file at the same time, ____.

  • the operating system typically uses only one internal table to keep track of open files
  • the operating system typically uses two internal tables called the system-wide and per-disk tables to keep track of open files
  • the operating system typically uses three internal tables called the system-wide, per-disk, and per-partition tables to keep track of open files
  • the operating system typically uses two internal tables called the system-wide and per-process tables to keep track of open files
A

the operating system typically uses two internal tables called the system-wide and per-process tables to keep track of open files

75
Q

Suppose that the operating system uses two internal tables to keep track of open files. Process A has two files open and process B has three files open. Two files are shared between the two processes. How many entries are in the per-process table of process A, the per-process table of process B, and the system-wide tables, respectively?

  • 5, 5, 5
  • 2, 3, 3
  • 2, 3, 5
  • 2, 3, 1
A

2, 3, 3

76
Q

The simplest file access method is ____.

  • sequential access
  • logical access
  • relative access
  • direct access
A

-sequential access

77
Q

A _____ is used on UNIX systems at the beginning of some files to roughly indicate the type of the file.

  • file extension
  • creator name
  • hint
  • magic number
A

-magic number

78
Q

The path name /home/people/os-student/chap11.txt is an example of

  • a relative path name
  • an absolute path name
  • a relative path name to the current directory of /home
  • an invalid path name
A

-an absolute path name

79
Q

app. exe is an example of a(n) _____.
- batch file
- object file
- executable file
- text file

A

-executable file

80
Q

A mount point is _____.

  • a root of the file system
  • a location of a shared file system
  • only appropriate for shared file systems
  • the location within the file structure where the file system is to be attached
A

the location within the file structure where the file system is to be attached

81
Q

Which of the following is not considered a file attribute?

  • name
  • size
  • resolution
  • protection
A

resolution

82
Q

The path name os-student/src/vm.c is an example of ____.

  • a relative path name
  • an absolute path name
  • a relative path name to the current directory of /os-student
  • an invalid path name
A

a relative path name

83
Q

Transfers between memory and disk are performed a ____.

  • byte at a time
  • file at a time
  • block at a time
  • sector at a time
A

block at a time

84
Q

Order the following file system layers in order of lowest level to highest level. [1] I/O control, [2] logical file system, [3] basic file system, [4] file organization module, [5] devices.

  • 1, 3, 5, 4, 2
  • 5, 1, 3, 2, 4
  • 1, 5, 3, 4, 2
  • 5, 1, 3, 4, 2
A

5, 1, 3, 4, 2

85
Q

A volume control block ____.

  • can contain information needed by the system to boot an operating system from that partition
  • is a directory structure used to organize the files
  • contains many of the file’s details, including file permissions, ownership, size, and location of the data blocks
  • contains information such as the number of blocks in a partition, size of the blocks, and free-block and FCB count and pointers
A

contains information such as the number of blocks in a partition, size of the blocks, and free-block and FCB count and pointers

86
Q

Which of the following is the simplest method for implementing a directory?

  • tree data structure
  • linear list
  • hash table
  • nonlinear list
A

linear list

87
Q

In the Linux VFS architecture, a(n) ____ object represents an individual file.

  • inode
  • file
  • superblock
  • dentry
A

-inode

88
Q

The free-space list can be implemented using a bit vector approach. Which of the following is a drawback of this technique?

  • To traverse the list, each block must be read on the disk.
  • It is not feasible to keep the entire list in main memory for large disks.
  • The technique is more complicated than most other techniques.
  • This technique is not feasible for small disks.
A

It is not feasible to keep the entire list in main memory for large disks.

89
Q

The NFS mount protocol ____.

  • does not allow a remote directory to be accessible in a transparent manner
  • exhibits a transitivity property in terms of client access to other file systems
  • establishes the initial logical connection between a server and a client
  • provides a set of RFCs for remote file operations
A

establishes the initial logical connection between a server and a client

90
Q

The file-allocation table (FAT) used in MS-DOS is an example of _____.

  • contiguous allocation
  • indexed allocation
  • linked allocation
  • multilevel index
A

linked allocation

91
Q

A disk with free blocks 0,1,5,9,15 would be represented with what bit map?

  • 0011101110111110
  • 1100010001000001
  • 0100010001000001
  • 1100010001000000
A

1100010001000001

92
Q

On UNIX systems, the data structure for maintaining information about a file is a(n) _____.

  • superblock
  • inode
  • file control block (FCB)
  • master file table
A

inode

93
Q

Consider a system crash on a log-structured file system. Which one of the following events must occur?

  • Only aborted transactions must be completed.
  • All transactions in the log must be completed.
  • All transactions in the log must be marked as invalid.
  • File consistency checking must be performed.
A

All transactions in the log must be completed.

94
Q

Disk controllers do not usually have a built-in cache.

True/False

A

False

95
Q

In Solaris, swap space is only used as a backing store for pages of anonymous memory.
(True/False)

A

True

96
Q

Solid state disks (SSDs) commonly use the FCFS disk-scheduling algorithm.
(True/False)

A

True

97
Q

In most RAID implementations, a hot spare disk is not used for data, but is configured for replacement should any other disk fail.
(True/False)

A

True

98
Q

LOOK disk head scheduling offers no practical benefit over SCAN disk head scheduling.
(True/False)

A

False

99
Q

Windows allows a hard disk to be divided into one or more partitions
(True/False)

A

True

100
Q

RAID level 0 provides no redundancy.

True/False

A

True

101
Q

Data striping provides reliability for RAID systems.

True/False

A

False

102
Q

In general, LOOK disk head scheduling will involve less movement of the disk heads than SCAN disk head scheduling.
(True/False)

A

True

103
Q

All files in a single-level directory must have unique names.
(True/False)

A

True

104
Q

A relative path name begins at the root.

True/False

A

False

105
Q

An absolute path name must always begin at the root.

True/False

A

True

106
Q

Typically, a mount point is an empty directory.

True/False

A

True

107
Q

Windows does not provide access-control lists.

True/False

A

False

108
Q

A file on a Solaris system with permissions -rwx–x–x is an example of both access-control lists as well as owner/group/universe protection.
(True/False)

A

True

109
Q

File system links may be to either absolute or relative path names.
(True/False)

A

True

110
Q

A relative block number is an index relative to the beginning of a file.
(True/False)

A

True

111
Q

Metadata includes all of the file-system structure, including the actual data (or contents of the file).
(True/False)

A

False

112
Q

In NTFS, the volume control block (per volume) and the directory structure (per file system) is stored in the master file table.
(True/False)

A

True

113
Q

Indexed allocation may require substantial overhead for its index block.
(True/False)

A

True