Review Quiz Attempt Review2 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Suleman Ismaila

Home  My courses  CS 3307 - AY2020-T5  Final Exam (Days 1 - 4)  Review Quiz

Started on Friday, 7 August 2020, 7:22 AM


State Finished
Completed on Friday, 7 August 2020, 7:44 AM
Time taken 22 mins 22 secs
Marks 49.00/50.00
Grade 98.00 out of 100.00

Question 1 Correct Mark 1.00 out of 1.00

Fast File System (FFS) does all of the following except?

Select one:

a. Create Files and Directories

b. Allow for long le names

c. Disk defragmentation

d. Disk layout optimized for performance

The correct answer is: Disk defragmentation

Question 2 Correct Mark 1.00 out of 1.00

True or False: All Linux systems support system logging.

Select one:

True

False

The correct answer is 'True'.


/
Question 3 Correct Mark 1.00 out of 1.00

True or False: opening, reading, or writing a le incur I/O operations.

Select one:

True

False

The correct answer is 'True'.

Question 4 Correct Mark 1.00 out of 1.00

True or False: UDP is more reliable than TCP because it is connection oriented
communications.

Select one:

True

False

The correct answer is 'False'.

Question 5 Correct Mark 1.00 out of 1.00

True or False: Garbage in the le system is created when LFS leaves older versions
of le structures all over the disk, scattered throughout the disk.

Select one:

True

False

The correct answer is 'True'.

/
Question 6 Correct Mark 1.00 out of 1.00

The protocol design of AFS is particularly important in:

Select one:

a. Workstation caching

b. minimizing server interactions

c. single namespace

d. access control lists

Your answer is correct.

The correct answer is: minimizing server interactions

Question 7 Correct Mark 1.00 out of 1.00

Top 20 Critical Security Controls for Linux includes all the following except:

Select one:

a. Bzip2

b. tar

c. gzip

d. rsynch

Your answer is correct.

The correct answer is: rsynch

/
Question 8 Correct Mark 1.00 out of 1.00

True or False: A DMA engine is essentially a very speci c device within a system
that can orchestrate transfers between devices and main memory without much
CPU intervention.

Select one:

True

False

The correct answer is 'True'.

Question 9 Correct Mark 1.00 out of 1.00

True or False: Lookups simply read the data structure; as long as we can guarantee
that no insert is on-going, we can allow many lookups to proceed concurrently.

Select one:

True

False

The correct answer is 'True'.

Question 10 Correct Mark 1.00 out of 1.00

True or False: The entity-relationship (E-R) data model perceives the real world as
consisting of basic objects, called entities, NOT the relationships among these
objects.

Select one:

True

False

The correct answer is 'False'.

/
Question 11 Correct Mark 1.00 out of 1.00

How many times will this event loop execute?

e
while (1) {
events = getEvents();
for (x in events)
processEvent(x);
}:

Select one:

a. e

b. 1

c. x

d. Null

Your answer is correct.

The correct answer is: x

Question 12 Correct Mark 1.00 out of 1.00

What capability allows multiple people to use one system at the same time?

Select one:

a. Multi-thread

b. Multi-user

c. Distributed Processing

d. Multitasking

The correct answer is: Multi-user

/
Question 13 Correct Mark 1.00 out of 1.00

In terms of computer system architecture buses which of the following is not?

Select one:

a. Peripheral

b. Memory

c. CPU

d. Input/output

Your answer is correct.

The correct answer is: CPU

Question 14 Correct Mark 1.00 out of 1.00

RAID technology can take 3 essential designs; which is not:

Select one:

a. RAID Level 0(striping)

b. RAID Level 1 (Parity)

c. RAID Levels 4/5 (parity based redundancy)

d. RAID Level 1 (mirroring)

Your answer is correct.

The correct answer is: RAID Level 1 (Parity)

/
Question 15 Correct Mark 1.00 out of 1.00

True or False: Enabling more concurrency always increases performance.

Select one:

True

False

The correct answer is 'False'.

Question 16 Correct Mark 1.00 out of 1.00

True or False: Locks work through mutual exclusion which preventing multiple
threads from entering a critical section.

Select one:

True

False

The correct answer is 'True'.

Question 17 Correct Mark 1.00 out of 1.00

True or False: Concurrent data structures can be queues lists and counters only.

Select one:

True

False

The correct answer is 'False'.

/
Question 18 Correct Mark 1.00 out of 1.00

RAID technology can take 3 essential designs; which is not:

Select one:

a. RAID Level 0(striping)

b. RAID Level 1 (Parity)

c. RAID Levels 4/5 (parity based redundancy)

d. RAID Level 1 (mirroring)

The correct answer is: RAID Level 1 (Parity)

Question 19 Correct Mark 1.00 out of 1.00

When does the deadlock occur in this code?

Thread 1: Thread 2:
lock(L1); lock(L2);
lock(L2); lock(L1);

Select one:

a. Thread 1 grabs lock L1

b. Thread 2 grabs L2 and tries to acquire L1

c. Thread 1 grabs lock L1 and then a context switch occurs to Thread 2, then Thread 2
grabs L2 and tries to acquire L1

d. Deadlock does not necessarily occur

Your answer is correct.

The correct answer is: Thread 1 grabs lock L1 and then a context switch occurs to Thread 2,
then Thread 2 grabs L2 and tries to acquire L1

/
Question 20 Correct Mark 1.00 out of 1.00

When checking for a condition in a multi-threaded program, using a while loop is


always correct; using an if statement only might be, depending on the semantics of
signaling. Thus, always use while and your code will behave as expected. Which
condition statement will unlock after the nal condition is met?

1 // how many bytes of the heap are free?


2 int bytesLeft = MAX_HEAP_SIZE;
3
4 // need lock and condition too
5 cond_t c;
6 mutex_t m;
7
8 void *
9 allocate(int size) {
10 lock(&m);
11 while (bytesLeft < size)
12 cond_wait(&c, &m);
13 void *ptr = ...; // get mem from heap
14 bytesLeft -= size;
15 unlock(&m);
16 return ptr;
17 }
18
19 void free(void *ptr, int size) {
20 lock(&m);
21 bytesLeft += size;
22 cond_signal(&c); // whom to signal??
23 unlock(&m);
24 }

Select one:

a. 10 lock(&m);

b. 20 lock(&m);

c. 15 unlock(&m)

d. 23 unlock(&m);

Your answer is correct.

The correct answer is: 23 unlock(&m);

/
Question 21 Correct Mark 1.00 out of 1.00

POSIX threads library are those for providing mutual exclusion to a critical section
via:

Select one:

a. API’s

b. Multi-threaded

c. locks

d. Keys

Your answer is correct.

The correct answer is: locks

Question 22 Correct Mark 1.00 out of 1.00

Which two notions were introduced by AFSv2 (pick 2):

Select one or more:

a. Call back

b. state

c. AFSv2

d. File handle

Your answer is correct.

The correct answers are: Call back, File handle

/
Question 23 Correct Mark 1.00 out of 1.00

The test-and-set instruction, is also known as:

Select one:

a. Lock mechanism

b. Interrupt

c. atomic exchange

d. Stack

Your answer is correct.

The correct answer is: atomic exchange

Question 24 Correct Mark 1.00 out of 1.00

In this method when updating the disk, before over writing the structures in place,
rst write down a little note (somewhere else on the disk, in a well-known location)
describing what you are about to do. Writing this note is the "write ahead" part,
and we write it to a structure that we organize as a "log"; hence, write.

Select one:

a. Journaling

b. File system checker

c. FSCK

d. Super block

The correct answer is: Journaling

/
Question 25 Correct Mark 1.00 out of 1.00

FFS uses APIs which include all EXCEPT:

Select one:

a. read()

b. move()

c. write()

d. open()

Your answer is correct.

The correct answer is: move()

Question 26 Correct Mark 1.00 out of 1.00

True or False: A power loss or system crash both present major challenges to a le
system attempting to update persistent data structures.

Select one:

True

False

The correct answer is 'True'.

/
Question 27 Correct Mark 1.00 out of 1.00

When the le is opened for the rst time, the client-side le system sends a The
LOOKUP request message from the client side for the pathname (
/home/remzi/foo.txt), the client would send three LOOKUPs which will not include:

Select one:

a. home in the directory

b. remzi in home

c. foo.txt

d. foo.txt in remzi

Your answer is correct.

The correct answer is: foo.txt

Question 28 Correct Mark 1.00 out of 1.00

True or False: SANS SCORE checklist recommends Telnet is for remote access.

Select one:

True

False

The correct answer is 'False'.

Question 29 Correct Mark 1.00 out of 1.00

True or False: Lookups simply read the data structure; as long as we can guarantee
that no insert is on-going, we can allow many lookups to proceed concurrently.

Select one:

True

False

The correct answer is 'True'.

/
Question 30 Correct Mark 1.00 out of 1.00

Which of the following le systems is based on linked lists?

Select one:

a. vsfs

b. NTFS

c. FAT

d. NTFS

Your answer is correct.

The correct answer is: FAT

Question 31 Correct Mark 1.00 out of 1.00

The checkpoint region (CR) is de ned as:

Select one:

a. Unknown location to begin le lookups

b. Region used to store checkpoints

c. Fixed and known location on disk to begin a le lookup

d. Checkpoints for time hacks

The correct answer is: Fixed and known location on disk to begin a le lookup

/
Question 32 Correct Mark 1.00 out of 1.00

This method is run before the le system is mounted and made available (assumes
that no other le-system activity is on-going while it runs); once nished, the on
disk le system should be consistent and thus can be made accessible to users.

Select one:

a. Journaling

b. Backpointer-based consistency

c. FSCK

d. Super block

The correct answer is: FSCK

Question 33 Correct Mark 1.00 out of 1.00

True or False: The entity-relationship (E-R) data model perceives the real world as
consisting of basic objects, called entities, NOT the relationships among these
objects.

Select one:

True

False

The correct answer is 'False'.

/
Question 34 Correct Mark 1.00 out of 1.00

True or False: Server recovery after a crash is more complicated. The problem that
arises is that callbacks are kept in-memory; thus, when a server reboots, it has no
idea which client machine has which les. Thus, upon server restart, each client of
the server must realize that the server has crashed and treat all of their cache
contents as validated, and (as above) reestablish the validity of a le before using it.

Select one:

True

False

The correct answer is 'False'.

Question 35 Correct Mark 1.00 out of 1.00

True or False: In a multi-threaded application, the developer has full control over
what is scheduled at a given moment in time; rather, the programmer simply
creates threads and then hopes that the underlying OS schedules them in a
reasonable manner across available CPUs.

Select one:

True

False

The correct answer is 'False'.

/
Question 36 Correct Mark 1.00 out of 1.00

True or False: The track depicted in gure 36.1 has 12 sectors, each of which is 512
bytes in size (our typical sector size, recall) and addressed therefore by the
numbers 1 through 12.

Select one:

True

False

The correct answer is 'False'.

Question 37 Correct Mark 1.00 out of 1.00

True or False: To use a condition variable, one has to in addition have a lock that is
not associated with this condition.

Select one:

True

False

The correct answer is 'False'.

/
Question 38 Correct Mark 1.00 out of 1.00

Linux command used to create Boot and Rescue Disk which creates a boot disk
manually.

Select one:

a. Makedisk

b. TCPwrappers

c. Xinedtd

d. Mkbootdisk

Your answer is correct.

The correct answer is: Mkbootdisk

Question 39 Correct Mark 1.00 out of 1.00

NIST Publication 800-53 (Appendix F SECURITY CONTROL CATALOG); Least privilege


can refer to operating systems.

Select one:

True

False

The correct answer is 'True'.

/
Question 40 Correct Mark 1.00 out of 1.00

In this example there are producer and consumer threads the code for a producer
puts an integer in the shared bu er loops number of times, and a consumer gets
the data out of that shared bu er each time printing it. Which line prints out the
shared bu er?

1 void *producer(void *arg) {


2 int i;
3 int loops = (int) arg;
4 for (i = 0; i < loops; i++) {
5 put(i);
6}
7}
8
9 void *consumer(void *arg) {
10 int i;
11 while (1) {
12 int tmp = get();
13 printf("%d\n", tmp);
14 }
15 }

Select one:

a. 4 for (i = 0; i < loops; i++) {

b. void *producer(void *arg) {

c. 13 printf("%d\n", tmp);

d. 1 void *producer(void *arg) {

Your answer is correct.

The correct answer is: 13 printf("%d\n", tmp);

/
Question 41 Correct Mark 1.00 out of 1.00

See Table 37.6. Which disk will get the parity bit P5 to remove the parity bit bottle-
nick of RAID 4:

Select one:

a. Disk 0

b. Disk 1

c. Disk 2

d. Disk 3

e. Disk 4

Your answer is correct.

The correct answer is: Disk 4

Question 42 Incorrect Mark 0.00 out of 1.00

In this method an additional back pointer is added to every block in the system; for
example, each data block has a reference to the inode to which it belongs. When
accessing a le, the le system can determine if the le is consistent by checking if
the forward pointer (e.g., the address in the inode or direct block) points to a block
that refers back to it.

Select one:

a. Journaling

b. Backpointer-based consistency

c. FSCK

d. Super block

The correct answer is: Backpointer-based consistency

/
Question 43 Correct Mark 1.00 out of 1.00

RAID technology is evaluated along 3 axis; which is not:

Select one:

a. Capacity

b. N Disks

c. Performance

d. Reliability

The correct answer is: N Disks

/
Question 44 Correct Mark 1.00 out of 1.00

To see what is mounted on your system, and at which points, simply run the mount
program. What distributed le systems are mounted?

/dev/sda1 on / type ext3 (rw)


proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda8 on /scratch type ext3 (rw)
/dev/sdb1 on /scratch.1 type xfs (rw)
/dev/sda6 on /tmp type ext3 (rw)
/dev/sda3 on /var type ext3 (rw)
/dev/sda7 on /var/vice/cache type ext3 (rw)
/dev/sda2 on /usr type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
AFS on /afs type afs (rw)

Select one:

a. tmpfs

b. ext3

c. sysfs

d. AFS

Your answer is correct.

The correct answer is: AFS

/
Question 45 Correct Mark 1.00 out of 1.00

This code is an example of receiving events via?

int select(int nfds,


fd_set *restrict readfds,
fd_set *restrict writefds,
fd_set *restrict errorfds,
struct timeval *restrict timeout);

Select one:

a. API poll ()

b. API select ()

c. Select

d. Poll

Your answer is correct.

The correct answer is: API select ()

Question 46 Correct Mark 1.00 out of 1.00

True or False: Two key abstractions of virtual storage are les and directories.

Select one:

True

False

The correct answer is 'True'.

/
Question 47 Correct Mark 1.00 out of 1.00

Free space management in modern le systems can be accomplished using each of


these methods EXCEPT?

Select one:

a. free lists

b. bitmaps

c. pre-allocation policy

d. binary tree

Your answer is correct.

The correct answer is: free lists

Question 48 Correct Mark 1.00 out of 1.00

Multi-Threaded Address Space is composed of all EXCEPT:

Select one:

a. Stack (1)

b. Stack (3)

c. Program code

d. Free

The correct answer is: Stack (3)

/
Question 49 Correct Mark 1.00 out of 1.00

What capability allows multiple people to use one system at the same time?

Select one:

a. Multi-thread

b. Multi-user

c. Distributed Processing

d. Multitasking

Your answer is correct.

The correct answer is: Multi-user

Question 50 Correct Mark 1.00 out of 1.00

The following are all key concurrency terms EXCEPT:

Select one:

a. Mutual Exclusion

b. Non-Critical Section

c. Race Condition

d. Intermediate

Your answer is correct.

The correct answer is: Non-Critical Section

◄ Learning Guide Unit 9

Jump to...

Final Exam (Proctored) ►

You might also like