Multiple Choice Section Flashcards

(33 cards)

1
Q

The cursor that indicates the position in a file being read/written to by a process is
stored in:
a).-the PCB
b).-The inode
c).-the file descriptor
d).-TCB

A

c).-the file descriptor

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

An OS knows the type of file system stored on a disk partition by looking at the
following section on the partition:
a).-master boot record
b).-superblock
c).-free space management
d).-i-nodes

A

b).-superblock

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

The data block free list for a file system can usually be found in:
a).-The inode free list
b).-the superblock
c).-the boot block
d).-the metadata block

A

b).-the superblock

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

The following is a process synchronization solution that does not require hardware
support:
a).-Peterson’s solution
b).-Test-And-Set instruction
c).-Swap instruction
d).-None of the above

A

a).-Peterson’s solution

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

The following process synchronization solutions involve busy wait:
a).-Swap instruction;
b).-Peterson’s solution;
c).-Test-And-Set instruction;
d).-All of the above;

A

d).-All of the above;

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

In local page replacement schemes, when a process needs a frame it can page out:
a).-any other page that process may have in memory;
b).-any page that belongs to any other process currently in memory;
c).-both ‘a’ and ‘b’;
d).-none of the above;

A

a).-any other page that process may have in memory;

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

If you are using a single-processor CPU system and want to protect a short critical
section, the best and most efficient choice will be:
a).-disabling interrupts;
b).-A mutex implemented using the Swap instruction;
c).-A semaphore implemented in the OS kernel;
d).-None of the above

A

a).-disabling interrupts;

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

The optimal page replacement algorithm chooses the page to be replaced as follows:
a).-The page that has been in memory for the longest time;
b).-The page that has been referenced the least in recent time;
c).-The page that will be referenced the farthest in the future (or not referred at all);
d).-The page that has the most recent timestamp;

A

c).-The page that will be referenced the farthest in the future (or not referred at all);

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

The best technique for file block allocation when we intend to use random access is:
a).-Contiguous allocation;
b).-Linked allocation;
c).-Index allocation;
d).-None of the above;

A

Index allocation;

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

What page would be the worst candidate to replace out of the following ones during
the execution of page replacement algorithm:
a).-A page that has the referenced bit set to 0 and the dirty bit set to 0;
b).-A page that has the referenced bit set to 1 and the dirty bit set to 0;
c).-A page that has the referenced bit set to 0 and the dirty bit set to 1;
d).-A page that has the referenced bit set to 1 and the dirty bit set to 1;

A

d).-A page that has the referenced bit set to 1 and the dirty bit set to 1;

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

Which of the following page-replacement algorithms would be the best from the
point of view of page-fault rate (i.e. the one that minimizes page faults)?
a).-LRU
b).-FIFO
c).-Optimal Replacement
d).-Second chance

A

c) Optimal Replacement ?

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

In the optimal page replacement algorithm, the page to be replaced is chosen as
follows:
-The page that has been in memory for the longest time;
-The page that has been referenced the least in recent time;
-The page that will be referenced the farthest in the future or not referenced;
-The page that has the most recent timestamp

A
  • The page that will be referenced the farthest in the future or not referenced. ?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In the clock page replacement algorithm, the following is true when a page needs to
be replaced:
-If the next page has the referenced bit set to 1, the bit is set to 0 and the page is
spared;
-If the next page has the referenced bit set to 0, the page is replaced and the pointer
is advanced;
-Both ‘a’ and ‘b’ hold true;
-Neither ‘a’ nor ‘b’ hold true

A
  • Both ‘a’ and ‘b’ hold true ?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In Global page replacement schemes, when a process needs a frame it can page out:
-any other page that the process may have in memory;
-any page that belongs to any other process currently in memory;
-both ‘a’ and ‘b’;
-none of the above;

A
  • any page that belongs to any other process currently in memory. ?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When using kernel-level threads, a thread context switch within the same address
space is equivalent/close to:
a).-A function call;
b).-A system call;
c).-A Process context switch;
d).-None of the previous;

A

b).-A system call; ?

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

Unix-native file systems employ the following for file protection/sharing:
a).-Uids and group ids and rwx permissions for each;
b).-ACLs;
c).-Both a and b;
d).-Neither a nor b;

A

a) Uids and group ids and rwx permissions for each ?

might be c).-Both a and b;

17
Q

A pointer to the root directory i-node of a given file system stored in a disk partition
can be found in:
a).-Kernel memory;
b).-the superblock;
c).-each data block;
d).-none of the previous;

A

b) the superblock ?

18
Q

The following is a software-based solution to the process synchronization problem:
a).-Peterson’s solution
b).-TestAndSet instruction
c).-Swap instruction
d).-none of the previous

A

a) Peterson’s solution ?

19
Q

If you are using a multiprocessor system and want to protect a short critical section,
the best and most efficient choice which is free of a busy-wait will be:
a).-disabling interrupts;
b).-a mutex implemented using TestAndSet instruction;
c).-a semaphore implemented in the OS kernel;
d).-a monitor;

A

a) disabling interrupts ?

c).-a semaphore implemented in the OS kernel; ?

20
Q

Windows file systems employ the following for file protection/sharing:
a).-Uids and group ids and rwx permissions for each
b).-ACLs
c).-Mandatory file locks
d).-Advisory file locks

A

b) ACLs ?

(Access Control Lists)

21
Q

The i-node free list for a file system can usually be found in:
a).-The inode data block
b).-The superblock
c).-The boot block
d).-The master data block

A

b).-The superblock ?

22
Q

A process synchronization solution that does require hardware support is:
a).-Peterson’s solution
b).-Test-And-Set instruction
c).-Blocking semaphores
d).-None of the above

A

b) Test-And-Set instruction ?

23
Q

The best technique for file block allocation when we intend to use random file access
is:
-contiguous allocation;
-linked allocation;
-index allocation;
-none of the above;

A

-index allocation; ?

24
Q

The LRU page replacement algorithm chooses the page to be replaced as follows:
-The page that has been in memory for the longest time;
-The page that has been referenced the least in recent time;
-The page that will be referenced the farthest in the future (or not referred at all);
-The page that has the oldest timestamp;

A
  • The page that has been referenced the least in recent time. ?
25
The cursor that indicates the position in a file being read by a process is stored in: a).-the PCB b).-The i-node c).-The file descriptor d).-FCB
c) The file descriptor ?
26
The “elevator algorithm” is used in the context of: -memory allocation -data block allocation -virtual memory -disk scheduling
d) disk scheduling ?
27
The type of a given file system stored in a disk partition can be found in: -the root i-node -the superblock -each data block -none of the previous
- the superblock ?
28
The main advantage of in-kernel semaphores versus TestAndSet instruction is: -semaphores can count -prevent busy wait -efficiency and speed -none of the previous
- semaphores can count ? might be -prevent busy wait
29
When using kernel level threads, a thread context switch within the same address space is equivalent or close to: -a function call -a system call -a process context switch -a user-level context switch
- a function call ?
30
If you are using a uniprocessor system and want to protect a short critical section in kernel code, the best and most efficient choice will be: –a blocking semaphore –disabling/enabling interrupts -a mutex implemented using TestAndSet instruction -a semaphore implemented in the kernel
– disabling/enabling interrupts ?
31
When using user level threads, a thread context switch within the same address space is equivalent or close to (in efficiency): -a kernel-level thread context switch -a function call -a system call -a process context switch
- a function call ?
32
The best technique for file block allocation when we intend to use mostly random access to the file is: -Contiguous allocation -Linked allocation -Index allocation -FAT
- Index allocation ?
33
What page would be the best candidate to replace out of the following ones during the execution of page replacement algorithm: -A page that has the referenced/accessed bit set to 0 and the dirty bit set to 0 -A page that has the referenced/accessed bit set to 1 and the dirty bit set to 0 -A page that has the referenced/accessed bit set to 0 and the dirty bit set to 1; -A page that has the referenced/accessed bit set to 1 and the dirty bit set to 1;
- A page that has the referenced/accessed bit set to 0 and the dirty bit set to 0 ?