Skip to content

Instantly share code, notes, and snippets.

@595456852
Forked from 6TELOIV/.README.md
Last active April 18, 2020 20:52
Show Gist options
  • Save 595456852/0b674f78bc219d6590086cd1b109e779 to your computer and use it in GitHub Desktop.
Save 595456852/0b674f78bc219d6590086cd1b109e779 to your computer and use it in GitHub Desktop.
OS Quiz Questions and answers

Understanding the file format

Each file contains the questions and answers for one quiz. Unanswered questions are bolded. Questions have the following format:

- What is the color of the sky?
  - Blue

Don't include wrong answers, except for choose all that apply, in that case, incorrect and correct answers should be listed, with [ ] for incorrect answers and [X] for correct ones. The question should be followed by (Check all). Example:

- Which classes at UF make me want to die? (Check all)
  - [X] OS
  - [ ] All other classes
  - [ ] Like, literally all of them

Also, lines should be broken approximately every 64 characters, so that they can be read in non-line wrapping text editors/viewers.

Quiz 9 Files

  • When is the refference count in an i-node increase? (Check all)

    • When a process with the file open forks
    • When a process writes to the file
    • When a process reads from the file
    • When a directory entry is linked to the file
  • Which of the following types of file is most likely to exhibit strong locality of access? (Check all)

    • Database
    • Digital Movie
    • Audio File
    • Electronic Novel
    • Spanish-English Dictionary
  • How many disk accesses are needed to bring byte i of a file into memory when the file is stored using contiguous allocation Assume only the file's FCB is in memory, block pointers require 32 bits, and that blocks hold 4096 bytes each.

    • 1 access
  • How many disk accesses are needed to bring byte i of a file into memory when the file is stored using double indirect indexed allocation? Assume only the file's FCB is in memory, block pointers require 32 bits, and that blocks hold 4096 bytes each.

    • 3 accesses
  • How many disk accesses are needed to bring byte i of a file into memory when the file is stored using indexed allocation? Assume only the file's FCB is in memory, block pointers require 32 bits, and that blocks hold 4096 bytes each.

    • 2 accesses
  • What is the largest file size that can be allocated if blocks hold 4096 bytes, block pointers are 32 bits, and files are stored using indexed allocation?

    • 4MB
  • What is the largest file size that can be allocated if blocks hold 4096 bytes, block pointers are 32 bits, and files are stored using double indexed allocation?

    • 4GB
  • What is the largest file size that can be allocated if blocks hold 4096 bytes, block pointers are 32 bits, and files are stored using linked allocation?

    • 16TB

Quiz 10 Disk

  • A disk takes 1ms per track seek time, and the head is currently on track 70. Assume it takes 5ms to service a request once the head is at the right track. The following set of requests are pending, given as (ID, track) in order of arrival. How much time does it take to service all the requests if the elevator algorithm is used an the current direction is down? Requests: (A,80)(B,75)(C,82)(D,90)(E,45)

    • 95 ms
  • A disk takes 1ms per track seek time, and the head is currently on track 70. Assume it takes 5ms to service a request once the head is at the right track. The following set of requests are pending, given as (ID, track) in order of arrival. What is the order in which requests are serviced if the policy is SSF (aka SSTF)? Requests: (A,55)(B,53)(C,40)(D,48)(E,45)

    • DECBA
  • A disk takes 1ms per track seek time, and the head is currently on track 70. Assume it takes 5ms to service a request once the head is at the right track. The following set of requests are pending, given as (ID, track) in order of arrival. How much time does it take to service all the requests if the policy is SSF (aka SSTF)? Requests: (A,55)(B,53)(C,40)(D,48)(E,45)

    • 50ms
  • A disk takes 1ms per track seek time, and the head is currently on track 70. Assume it takes 5ms to service a request once the head is at the right track. The following set of requests are pending, given as (ID, track) in order of arrival. What is the order in which the requests are serviced if the Elevator algorithm is used and the current direction is down? Requests: (A,80)(B,75)(C,82)(D,90)(E,45)

    • EBACD
  • A disk takes 1ms per track seek time, and the head is currently on track 50. Assume it takes 5ms to service a request once the head is at the right track. The following set of requests are pending, given as (ID, arrival time in ms, track). When is the last request finished if the policy is SSF (aka SSTF)? Requests: (A,3,55)(B,4,53)(C,8,40)(D,10,48)(E,32,45)

    • 53
  • A disk takes 1ms per track seek time, and the head is currently on track 50. Assume it takes 5ms to service a request once the head is at the right track. The following set of requests are pending, given as (ID, arrival time in ms, track). What is the order in which the requests are serviced if the policy is SSF (aka SSTF)? Requests: (A,3,55)(B,4,53)(C,8,40)(D,10,48)(E,32,45)

    • ABDCE
  • A disk takes 1ms per track seek time, and the head is currently on track 50. Assume it takes 5ms to service a request once the head is at the right track. The following set of requests are pending, given as (ID, arrival time in ms, track). What is the order in which the requests are serviced if the Elevator algorithm is used an the current direction is down? Requests: (A,0,80)(B,4,75)(C,12,82)(D,20,90)(E,32,45)

    • ACDBE

Quiz 11 IO

  • Suppose you have a harddrive that spins at 9000 RPM, and has 80 sectors of 512 bytes each on a particular track. If the head is already in position when a request for a single sector of that track is serviced, what is the expected effective data rate to get the data into the controller's buffer? Give the answer in BPS with 3 significant digits.

  • The IBM 1402 Card Reader could read 800 cards per minute. Each card had 80 columns, each of which could hold one byte in EBCDIC. What was the approximate data rate of this machine in bytes/second (round to the nearest integer)

    • 1,067
  • A typical US Keyboard has a total of 104 keys. If CTL, ALT, ALT2, and SHIFT may be used in any combination to modify any of the remaining keys, how many character codes can be generated, asssuming there is no distinction between left and right bersions of these four modifier keys (they all habe two versions) but there is a distinction between all other keys (e.g., the key labeled 1 above the Q key and the 1 key on the numeric keypad are not different)?

    • 1536
  • In Linux and Unix, the type of disk is determined by the _____ device number, while the particular volume is identified by the _____ device number.

    • major, minor
  • The _____ codes passed from the keyboard to the driver are converted to character codes using a _____.

    • scan, keymap
  • The IBM nine-track tapes that became the industry standard for storage for three decades had several sizes , the most common being 2400 feet. The high density version stored data at 1600 bits/inch/track. If the whole tape (not including the parity track) could be used for data storage , how much raw data could one of these tapes hold?(Round to the nearest MB using decimal MB not binary MB)

    • 46

Quiz 14 Security2

  • With a good symmetric cyptosystem (mark all that apply):

    • given only ciphertext C=E(K,P) it is difficult to obtain the corresponding plaintext P
    • given only ciphertext C=E(K,P) it is difficult to obtain the key K
    • given only plaintext P it is difficult to obtain the ciphertext C=E(K,P)
    • given the encryption key K it is difficult to obtain the plaintext P from ciphertext C=E(K,P)
  • With a good asymmetric cryptosystem used in the normal way, for a member of the public (mark all that apply):

    • given ciphertext C it is difficult to obtain the corresponding plaintext P
    • given plaintext P it is difficult to obtain the ciphertext C
    • given the encryption key K it is difficult to obtain the plaintext P from ciphertext C
    • given only ciphertext C it is difficult to obtain the decryption key K'
  • If you are using biometric authentication to restrict access to extremely dangerous pathogens in a biomedical research facility, what modification to the default settings of the authentication system would be wise?

    • Modify the acceptance threshold to make the FRR as near to zero as possible
  • The key difference between a virus and a worm is:

    • a virus must be attached to another file
  • Which of the following are drawbacks to password-based authentication? Check all that apply.

    • Not all users may be able to enroll.
    • Passwords may change with physical condition.
    • Passwords may be misplaced or lost
    • Passwords may be forgotten.
    • Passwords may be guessed.
    • Passwords may be observed.
    • Users may be reluctant to use a password.
    • Passwords may be used for purposes other than authentication.
  • Which of the following are drawbacks to biometric authentication (under normal circumstances)? Check all that apply.

    • Not all users may be able to enroll.
    • Biometrics may change with physical condition.
    • Biometric keys may be lost.
    • Biometrics may be forgotten.
    • Users may not want to submit to biometric evaluation.
    • Biometrics may be used for purposes other than authentication.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment