Operating Systems Final Flashcards

1
Q
  1. What advantage does RAID 4&5 have over RAID1?
  2. What disadvantage does RAID 4&5 have when compared to RAID1? Hint:
    How is data retrieved when a drive is lost?
A

The advantage of RAID 4&5 is that redundancy is obtained with only a single
additional drive that maintains the stripe’s parity information. (unlike RAID1 which
requires 2x the drives).
When RAID 4&5 loses a data drive the raid operates in reduced mode. To
reconstruct the data on the lost drive, each block retrieved from the RAID must
be reconstructed dynamically by reading from each of the remaining data blocks
in the missing block’s strip plus the parity block. That is, N-1 block reads are
needed to reconstruct blocks from the missing drive. This is significantly slower
than the Raid 1 where both drives maintain the same blocks and no
reconstruction is needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. What are three advantages of RAID1 (mirroring) given in the book? (Assume
    a two drive RAID)
  2. What is the primary disadvantage of RAID1?
A

Raid 1 is also known as “disk mirroring” where data is duplicated across (written
to and read from) two drives.
1. Data on the logical RAID drive is protected from a single-drive failure.
2. A read request can be serviced by either of two drives allowing two read
requests to be executed concurrently.
3. Even though both drives need to be updated for a write operation, the write
can be executed concurrently on both drives.
Disadvantage: Because blocks are mirrored on two drives, RAID1 provides only
half the storage capacity provided by two physical drives.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. Describe why we describe drives as block devices.
  2. Explain how data is addressed and retrieved from block devices.
  3. Describe the steps required to update the data (e.g. a record) stored on a
    block device.
A
  1. Block devices stores and manages its data in fixed sized blocks of 4096 bytes
    of data. Data is transferred to / from these devices as blocks of data rather
    than one word / byte at a time. Block devices are typically drives.
  2. The OS commands the block device to retrieve data or save data at specific
    block address. Blocks are addressed starting at block 1 (the first block)
    though block N where N is the number of blocks maintained by a drive
    partition.
  3. Block Data Update:
    a. The block containing the record must be read from the device into a region
    of memory. The block is identified by its block address.
    b. The record within the block is updated in memory.
    c. The modified block is written back to the drive. This includes the data
    surrounding the record which was not updated.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

As presented in lecture and slides, what are the five parameters used to create a
virtual machine?

A
  1. The Guest OS e.g. Windows or Linux.
  2. The number of Virtual CPU (vCPU) allocated to the VM.
  3. The amount of memory allocated to the VM.
  4. The file system that will be attached to the VM.
  5. The Virtual Private Network (VPN) the VM will run in.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the four generic functions provided by the Hypervisor?

A
  1. Construction and management of Virtual Machines.
  2. Allocation of host processor resources to virtual machines e.g., cores,
    memory, I/O bandwidth.
  3. Emulation of device controllers for the guest operating systems.
  4. Handling syscalls (traps) from the guest operating systems.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Consider a simple paging system with the following parameters:
* 232 bytes of physical memory address range.
* A page size of 210 bytes.
1. What is the size of a frame?
2. How many bits of a logical address are used to identify (index) a page table
entry?
3. How many entries are needed in the process’s page table?
4. How many bits are needed in each page table entry?

A
  1. A frame is the same size as a page, 210 bytes.
  2. 10 bits are used as the offset into the page / frame, so 22 (32-10) bits remain
    to index into the page table.
  3. There is one Page Table Entry for each page in the logical address space, so
    222 entries are needed.
  4. Ignoring the present and modified bits, 22 bits are needed in each PT Entry to
    specify the base address of the frame in physical memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe both the logical and physical views of a process image’s memory
addresses.
What is the system component that translates logical to physical addresses?

A

Logical View: The logical view of the process image is the illusion that the image
is installed in a contiguous range of memory addresses that starts at address
zero and extends to N (the image size). The process logical address space is
owned by the process and is separate from all other process images. That is,
that every process has its own private 0-N address space.
Physical View: The physical view of the process image is the reality that all
process images share common physical memory range of 0–M where M is the
amount of system memory. Each process is installed into a memory partition at
unique addresses in physical memory. Partitions can be relocated to new
addresses, and with paged memory management can be placed in non-
contiguous (non-adjacent) memory regions.
Translation from logical to physical addresses is primarily accomplished by the
system’s Memory Management Unit hardware.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. Describe a process’s Resident Set.
  2. What occurs when a process’s resident set size is too small?
  3. What occurs when a process’s resident set size is too large?
A

The resident set is the set of process pages that are resident in memory i.e. are
contained in a memory frame.
A resident set that is too small will cause an increase in the number of page
faults and can cause the process to begin thrashing.
A resident set that is too large wastes memory (frames) by maintaining process
pages in memory that are no longer being referenced by the process (no longer
in the process’s working set). This has the effect of reducing the overall number
of processes that can be maintained in memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. Describe a process’s Working Set.
  2. Describe the relationship between the size of a process’s working set and its
    resident set.
  3. Describe what happens when a process’s working set size exceeds its
    resident set.
A
  1. The Working Set is the set of pages that the process currently needs to
    execute i.e. the process’s locality. Any page in the working set that is not
    resident must be paged in.
  2. The working set size should smaller than the resident set size i.e. the resident
    set should include at least the working set.
  3. When a process’s working set size exceeds its resident set the condition
    triggers page faults needed to make the missing working set pages resident.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the problem with fairness with Preemptive Round-Robin scheduling
WRT I/O-bound processes vs. compute-bound processes.

A

RR scheduling allows a process to complete its quantum (time-slice) and then
schedules the next process at the head of the ready queue. A compute-bound
process will likely execute for its full quantum without blocking. However, an I/O-
bound process is more likely not to use its entire quantum before being blocked
(I/O) and rescheduled when the I/O operation completes. Thus, because an I/O-
bound process seldom finishes its quantum before blocking, it will receive
less processor time than a compute-bound process.

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

How does Virtual Round-Robin scheduling (as described in text) solve the
problem described in question 4?

A

Virtual RR scheduling maintains a second queue for “Returned From Blocked”
processes that have completed their I/O operation and have not completed their
current quantum. See Figure 9.7 in the text. When a process is placed in the
RFB queue, the dispatcher will preempt the currently executing process in favor
of the returned-from-blocked process which will be allowed to complete the
remainder of its previously interrupted quantum before being placed into the
ready queue.

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

Describe the purpose of the File Descriptor

A

File descriptors are a resource created and managed by the operating
system.
- File descriptors are a data structure created by system calls that create new
files or open existing files.
- The file descriptor is used by system calls that manipulate the contents of a
file i.e. read, write, seek, etc.
- The file descriptor maintains state information about the open file e.g. the
stream index (position) of the next read or write operation on the open file.
- A process’s open file descriptors are maintained in the process’s Process
Control Block (PCB).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. Describe the purpose of the File Allocation Table.
  2. Describe the purpose of the Unallocated Block List.
A
  1. File Allocation Table (FAT) is the data structure used to maintain the
    association between a file and the blocks allocated to storing the file’s
    contents including the ordering of the file’s blocks.
  2. Unallocated Block List (UBL) is the list (set) of blocks that are currently not
    allocated to any file. It is the file system’s free space.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly