CS 446 Quiz Questions

97 flashcardsby Nolan
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
[Select all that apply] Which of the following requires the operating system to involve itself with paging?

Process creation
Process termination
Process blocking
Process execution
Process creation
Process termination
Process execution
2
[Select all that apply]Which of the following are benefits of using global page allocation over local page allocation

Less thrashing
Page frame consistency
Differentiates number of pages per process based on criteria
Less memory wasted
Less thrashing
Differentiates number of pages per process based on criteria
Less memory wasted
3
[Select all that apply]Which of the following best describes the effect of using a large page size?

Internal fragmentation is more likely than if the page were smaller
Page table entry number is increased
Shorter page table load times
Less space is used in the TLB
Internal fragmentation is more likely than if the page were smaller
Shorter page table load times
Less space is used in the TLB
4
[T/F] The paging daemon is responsible for ensuring that some number (or more) free page frames exist
True
5
[T/F]Larger sized pages result in a larger number of page table entries.
False
6
[T/F]Segmentation causes internal fragmentation more often than external fragmentation
False
7
[T/F]The MMU is responsible for setting the policy that decides which pages to swap on and off RAM
False
8
[T/F]The modified bit is also known as the dirty bit.
True
9
[T/F]The optimal page replacement algorithm is not implementable in practice because the OS does not know how many instructions will be executed by a process before running it.
True
10
A benefit of a VM is that it is portable. T/F
True
11
A container is a VM T/F
False
12
A hypervisor is a type of microkernel T/F
False
13
A keyboard is an output device T/F
False
14
A page fault occurs. Order the series of events that takes place

OS loads the page provided by the page handler
CPU traps to kernel
MMU Sends signal to CPU
Page fault handler checks where fault occurred
OS re-executes faulting instruction
Page fault handler gathers data structures and necessary pages
first: MMU Sends signal to CPU
second: CPU traps to kernel
third: Page fault handler checks where fault occurred
fourth: Page fault handler gathers data structures and necessary pages
fifth: OS loads the page provided by the page handler
sixth: OS re-executes faulting instruction
15
All memory reserved for a process must be contiguous, regardless of memory allocation method. T/F
False
16
Atomic operations ensure that resources/data do not end up in an incorrect intermediate state
True
17
By design, which of the following operating systems are designed to handle many requests from many different users at one time? [select all that apply]

server
mainframe
pc
sensor node system
server
mainframe
18
Character devices store IO device input as fixed-size, consecutive blocks. T/F
False
19
Cloud services help ensure data redundancy. T/F
True
20
Coalescing waits until a device sends a significant number of requests, which are sent all at once to the driver. T/F
True
21
Each file in a unix OS is associated with a read, write, and execute bit for the creator, their access group, and others. T/F
True
22
Every file, including directories, has an associated, unique inode. T/F
True
23
Files that begin with . are hidden from users unless explicitly searched for. T/F
True
24
For each of the following, match the synchronization model with its description
Producer Consumer Model - Threads/process obtain (for reference) and modify the resources in a shared buffer
Reader Writer Model - Multiple 1+ threads/process obtain (for reference) a resource while another/thread/process is allowed to ...
Dining Philosophers Model - N threads synchronize access to N resources, where each thread/process needs access to 2+ resource
25
For each of the locker operations below, match them with the associated step number (first, second, third)
Create Lock - 1st
Initialize Lock - 2nd
Thread Gains Lock - 3rd
Thread Releases Lock - 4th
Lock is Destroyed - 5th
26
For each type of lock, select the most appropriate description
Spin Block - If mutex is available, the thread will take it. If not, the thread is placed in the waiting queue
Spin Wait - If mutex is available, the thread will take it. If not, the thread will stay on the CUP until the lock is released
Monitor - An object that encapsulates the critical region, its lock (mutex or CV), and any operations to coordinate the lock
Condition Variable (CV) - Signals when the lock has been freed so that a thread/process can acquire it more quickly
Semaphore - Acts as a lock to many threads across many processes
27
Fork launches a new command in the generated child process. T/F
False
28
HDDs are faster to write to than SSDs. T/F
False
29
If I introduce a new file to an operating system, it must be mounted either manually or by the OS itself. T/F
True
30
If process A is using a critical region, process B should be able to read from the critical region at the same time.
False
31
if we're more concerned with performance than with security, TCP remote protocols are best. T/F
False
32
In linux, directories are just specialized files. T/F
True
33
Linux backended systems use one to one thread mappings from user space to kernel space threads. T/F
True
34
main is the entry point for C programs, and this is where the OS will begin execution. T/F
True
35
Page faults occur when an entire process cannot be brought into memory at once. T/F
False
36
Paging requires less memory than directly allocating a memory space. T/F
False
37
Parallelism is preferred over multithreading when there is a shared data dependency among threads.
False
38
Processes usually share all of their information with other processes T/F
False
39
SSDs are slower to read from than HDD. T/F
False
40
SSDs do not use pages T/F
False
41
Synchronization is concerned with which of the following?
sharing data
coordinating CPU cores
efficiency
fairness
42
The chmod command will allow a file's protections to be changed. T/F
True
43
The clock algorithm is the most efficient algorithm of the algorithms discussed in class. T/F
False
44
The device controller consists of an electronic and a mechanical component T/F
True
45
The operating system should be able to interrupt any thread at any time. T/F
False
46
The process with PID 1 in most unix backed operating systems is init T/F
True
47
The process with PID 1 in most unix backed operating systems is init. T/F
True
48
The purpose of a container is to package an app and its library dependencies for shipment/safety. T/F
True
49
The root of unix file systems is denoted with C: T/F
False
50
The size of the physical address space and a process' virtual address space must be the same. T/F
False
51
The smallest OS that uses the fewest resources is a sensor node OS. T/F
False
52
The thread API calls (create, join, exit) used by a program are dependent on lock type chosen
True
53
Threads have their own copy of each child process. T/F
False
54
Threads share address space, global variables, and lists of open files. T/F
True
55
Time sharing implies that a single process is given the entire CPU. T/F
True
56
Trapping to kernel is expensive and should usually be minimized. T/F
True
57
Ubuntu prioritizes ease of use over security. T/F
False
58
Using a base register to allocate memory ensures that processes are isolated from each other. T/F
True
59
Using a base register to translate virtual memory to physical memory prevents one process from accidentally overwriting another process' address space. T/F
False
60
Using chroot to create a container segregates the file system and memory space of the container from the host OS T/F
False
61
What is the purpose of the translation lookaside buffer?

To map all addresses from virtual to physical memory
To store the address of all of the pages that have been created for a process
To cache frequently used pages so that they can be found faster
To modify the memory space and its partitions
To cache frequently used pages so that they can be found faster
62
What is the role of the operating system in networking?

It manages access permissions
It allows the hardware to directly interact with the user space when a request is sent
It provides the software necessary for networking communications
It allows the user to directly manipulate the communication channel
It manages access permissions
It provides the software necessary for networking communications
63
When a process is created, the operating system automatically adds which of the following to the address space [select all that apply]

Empty memory space
Threads
Heap
Code
Empty memory space
Heap
Code
64
When a thread table is created in kernel space, a process table is unnecessary
False
65
When allocating memory to a new object in the heap, the most efficient algorithm that ensures the least amount of memory is wasted is the first fit algorithm. T/F
False
66
When is a container preferred over a VM [select all that apply]

When we don't want to instantiate and maintain an entire guest OS
When space is a concern
When hardware needs to be accessed and emulated
When the app developer doesn't want to directly monitor and include the contents
When we don't want to instantiate and maintain an entire guest OS
When space is a concern
67
When sharing physical memory across processes, each process' physical memory should start at 0. T/F
False
68
Which of the following algorithms are dependent on tracking the system time that a page was last referenced? [select all that apply]

Working Set
LRU
WSClock
NRU
Working Set
LRU
WSClock
69
Which of the following algorithms are used by the OS to schedule hard drive reading? [select all that apply]

Shortest Seek
FIFO
Elevator
Longest Seek
Shortest Seek
FIFO
Elevator
70
Which of the following allows data to be transferred between IO devices?

HDD
bus
IO ports
memory Mapped IO
HDD
IO ports
memory Mapped IO
71
Which of the following always describe a microkernel

Software
Minimalistic
emulates the entire os
separates applications and libraries from OS
Software
Minimalistic
separates applications and libraries from OS
72
Which of the following are benefits of using threads? [select all that apply]

Additional abstraction
Spread a process across multiple CPU/CPU cores
Less waiting when there's a lot of input/output involved
Allows additional computation
Additional abstraction
Spread a process across multiple CPU/CPU cores
Less waiting when there's a lot of input/output involved
73
Which of the following are common categories of authentication?

Something the user needs
Something the user knows
Something the user is
Something the user has
Something the user knows
Something the user is
Something the user has
74
Which of the following are common cloud service types?

Hardware as a service
infrastructure as a service
Platform as a service
Software as a service
infrastructure as a service
Platform as a service
Software as a service
75
Which of the following are contained within a process [select all that apply]

a memory space
registers
alarms
associated files
a memory space
registers
alarms
associated files
76
Which of the following are kernel space components that are necessary to successfully handle a page fault? [select all that apply]

Fault handler
MMU handler
External pager
Page table
Fault handler
MMU handler
Page table
77
Which of the following are methods of mapping user space threads to kernel space threads? [select all that apply]

many to one
one to many
many to many
one to one
many to one
many to many
one to one
78
Which of the following are reasons that you might choose to use a distributed system

distributed systems are simpler to set up than a single system with many resources
Fault tolerance
physical distance between machines
data sharing
Fault tolerance
physical distance between machines
data sharing
79
Which of the following are reasons to perform a context switch? [select all that apply]

A running processes terminates
A process of higher priority than the one currently on the CPU needs the CPU
A process is too large to fit in memory and must be loaded in chunks
A running processes needs IO
A running processes terminates
A process of higher priority than the one currently on the CPU needs the CPU
A running processes needs IO
80
Which of the following are rudimentary file sharing procedures discussed in class?

AFS
NFS
NFL
MFS
AFS
NFS
81
Which of the following are used by modern OS to protect itself?[select all that apply]

authorization
Digital signatures
authentication
Cryptography
Digital signatures
authentication
Cryptography
82
Which of the following aspects of NFS does AFS improve?

cache checking
block writing
redundancy
client timeouts
cache checking
client timeouts
83
Which of the following can be randomized to improve OS security?
[select all that apply]

heap
stack
code entry points
program counters
heap
stack
code entry points
84
Which of the following conditions imply that creating threads in user space is a better choice than creating them in kernel space? [select all that apply]

The programmer wants to avoid trapping
System calls need to be blocked
The system will need to be scaled up
The OS needs scheduling flexibility
The programmer wants to avoid trapping
System calls need to be blocked
The system will need to be scaled up
85
Which of the following describes an untyped file system? [select all that apply]

Used in most modern OS
Does not care about file extension
files are treated like a persistent array of bytes
Overwrites all data on the backend for that extension
Used in most modern OS
Does not care about file extension
files are treated like a persistent array of bytes
86
Which of the following entries would be present in a newly created directory? [select all that apply]

.
..
/
~
.
..
87
Which of the following is the OS responsible for handling when IO occurs? [select all that apply]

Creates a uniform interface between apps and hardware
Device management and access
Waiting for a device signal, and acting appropriately
Constructing a device driver
Creates a uniform interface between apps and hardware
Device management and access
Waiting for a device signal, and acting appropriately
88
Which of the following is true of a Type 1 Hypervisor [select all that apply]

Runs on bare metal
Adds a software layer between hardware and OS
Acts like an OS on the hardware
Uses a host OS
Runs on bare metal
Adds a software layer between hardware and OS
Acts like an OS on the hardware
89
Which of the following layers of the OSI model are overseen by the operating system when a virtual machine is *not* used?

physical
presentation
data link
session
network
application
transport
transport
network
90
Which of the following layers of the OSI model are overseen by the operating system when a virtual machine is used?

physical
presentation
data link
session
network
application
transport
physical
data link
network
transport
91
Which of the following must be true for a race condition to occur?
threads are waiting for the shared resource at the same time
a resource is shared between 2+ threads
there is no lock surrounding the shared resource
threads never release the lock
92
Which of the following must be true to avoid race conditions? [select all that apply]

Processes should not have to wait forever to enter the critical region
Processes outside of the critical region should block other processes
There should only ever be 1 process in any critical region at any given time
The OS cannot assume the speed of each process' execution, nor can it assume access to more than one CPU
Processes should not have to wait forever to enter the critical region
There should only ever be 1 process in any critical region at any given time
The OS cannot assume the speed of each process' execution, nor can it assume access to more than one CPU
93
Which of the following need to be emulated by a virtual machine [select all that apply]

IO
CPU virtualization
Host OS
MMU
IO
CPU virtualization
MMU
94
Which of the following operations must be completed by the SSD to be written to?

All dirty pages in temp area must be written to the block
Pages within the selected block must all be erased, and their status must be updated to reflect that
Garbage must be removed from all pages in the system
Pages we do not want to overwrite must be saved somewhere temporary
All dirty pages in temp area must be written to the block
Pages within the selected block must all be erased, and their status must be updated to reflect that
Pages we do not want to overwrite must be saved somewhere temporary
95
Which of the following would be directories expected to be housed in root (/) in a brand new ubuntu system?

etc
bin
Users
Documents
etc
bin
Users
96
Which of the following would cause a process to be created [select all that apply]

The operating system is initialized
A running process initiates a system call
The user requests that a process is created
The process is blocked
The operating system is initialized
A running process initiates a system call
The user requests that a process is created
97
You are provided with the following parameters:

1. The OS uses a page frame size of 5
2. Pages are requested in the order [1, 2, 3, 4, 5, 2, 1, 3, 4]
3. The FIFO algorithm is used

Starting from time ____, page will be faulted on first. At time ___ the first page to be requested without an immediate page fault occurs.
Starting from time 0, page will be faulted on first. At time 5 the first page to be requested without an immediate page fault occurs.
Study all 97 cards for free