CS代写 CS 111 Operating Systems Principles Final Exam

CS 111 Operating Systems Principles Final Exam
Started: Jun 9 at 8:59pm
Quiz Instructions
Answer all questions. All questions are equally weighted. Some questions are multiple choice, with one correct answer. Some questions are matching questions – you must provide a matching answer for each part of the question. Some questions may require you to choose multiple correct answers.

Copyright By PowCoder代写 加微信 powcoder

Question 1 2.5 pts
Which of the following technologies is required to perform post-copy live migration of a virtual machine in a cloud environment?
Demand paging across a network
Synchronization of simultaneously running virtual machines across the network
DMA across the network
Pre-migration reservation of sufficient memory space to hold the entire virtual machine on the destination node
Compression of migrating data
Question 2 2.5 pts
Which of the following is a requirement if one is to use paravirtualization to improve the performance of virtual machines?
The ability to change the code of the virtual machine’s application processes Multiple cores to run the VM and VMM simultaneously
MMU support for virtualization
CPU support for virtualization
The ability to change the code of the virtual machine’s operating system

Question 4 2.5 pts
Which of the following statements is true for journaling file systems but not for log structured file systems?
In case of system failure, the file system can be recovered by examining a small part of the persistent storage device and making limited changes.
All updates are performed to the data item’s permanent location
A memory segment may contain update information related to updates to different files.
Updates to file data are initially made to a special area, but later re-written in a general pool of persistent memory segments.
The file system relies heavily on redirect-on-write techniques.
Question 3 2.5 pts
Which of the following best describes the typical handling of a system call in a virtual machine environment?
The system call traps to the VM, which calls the VMM, which may return to the VM’s operating system to handle the system call.
The system call traps to the VMM, which entirely handles the system call itself.
The system call traps to the VMM, which invokes the VM’s OS, possibly trapping subsequently to the VMM for privileged operations.
The system call is initially handled by a VM library, which traps to the VMM if privileged operations are necessary.
The system call traps to the VM’s operating system, which may call the VMM to handle privileged operations.
Question 5 2.5 pts
Match the following techniques for preventing deadlock to the necessary deadlock condition they ensure will not happen.

Question 6 2.5 pts
Match each desired function with its public key implementation:
Authentication
Your-eyes-only privacy
Authenticated privacy from U1 to U2
[ Choose ]
[ Choose ]
[ Choose ]
Question 7 2.5 pts
For a biometric, what is meaning of the crossover error rate?
The minimum possible probability of a false negative
The frequency with which the biometric must be recalibrate to give accurate results
The minimum possible probability of a false positive
The biometric sensitivity at which the probability of a successful authentication drops below a chosen value
The intersection of the false positive and false negative curves
Requiring locks to be acquired in a fixed order
Giving each interpreter its own copy of a resource
Require all locks to be acquired at the start of a process
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]

Question 8 2.5 pts
Full disk encryption is well suited to defend against which of the following attacks?
Dishonest system administrators stealing sensitive data Application flaws that divulge data to attackers Compromise of the operating system
Theft of the storage device
Users who try to access files against the system¡¯s security policies
Question 9 2.5 pts
Which of the following statements would be true about access control in a virtual machine environment where several VMs controlled by a single VMM share the same hardware?
The VMM would take over access control duties for all of the VMs
Virtual machines would apply their own access control policy to resources they attempt to access that belong to other virtual machines
Each virtual machine would perform access control on operations within the virtual machine Virtual machines would share a common access control policy
Question 10 2.5 pts
What’s mandatory about mandatory access control, as opposed to discretionary access control?
It requires the system to implement user-specified access restrictions regardless of system policy A system-wide policy can override the access control decisions of the owner of a data item
It requires the use of access control lists
Users have no control over restrictions on their own data
It requires all access decisions to go through a reference monitor

Question 11 2.5 pts
Which of the following are the limits referred to in the “limited direct execution” model?
Only processes that have been granted special superuser privileges can use limited direct execution Processes cannot use all CPU instructions
Only certain system calls are available under limited direct execution
Processes can be interrupted without their consent
Processes running under limited direct execution cannot use shared libraries
Question 12 2.5 pts
Which of the following generally undesirable conditions might be acceptable in a real time scheduler?
Race conditions
Starvation
Failure to achieve atomic operations
Question 13 2.5 pts
Which of the following are differences between the caching strategies in AFSv2 and NFS?
AFS uses callbacks to improve consistency, NFS uses timeouts to improve consistency AFS uses timeouts to improve consistency, NFS uses callbacks to improve consistency AFS caches file blocks, NFS caches whole files

Question 14 2.5 pts
Cloud computing environments often offer quality-of-service contracts to their customers, where a customer pays a certain amount of money to be guaranteed a certain degree of service of different kinds, such as a guaranteed amount of CPU cycles or a guaranteed amount of persistent storage. One resource they can offer is outgoing bandwidth between the nodes in the cloud and the Internet. Which of the following is the most likely problem that the cloud provider will need to handle if they are offering guaranteed outgoing bandwidth?
Deadlock when bandwidth has been overcommitted Failure of distributed consensus algorithms Thrashing
Priority inversion
Brute force attacks
Question 15 2.5 pts
What fields must be in a Unix/Linux directory entry?
File inode number File length
Link count
Access control information
AFS caches on the local disk, NFS caches in the local RAM AFS caches whole files, NFS caches file blocks
Question 16 2.5 pts

Question 17 2.5 pts
Which of the following is indicated by the value of a semaphore when it is negative?
The number of threads that will be woken when the next post operation occurs
The number of threads permitted to invoke a wait operation on the semaphore
The number of threads waiting on the semaphore
The number of threads that must perform a post operation on the semaphore before any waiting thread will be woken
The number of threads that can return from a wait operation without blocking
Which of the following properties is NOT characteristic of a REST-ful interface?
Layering of services
Statelessness
Deadlock detection
Reliance on caching
Separation of responsibilities between client and server
Question 18 2.5 pts
Assume we have a large number of threads working on a single machine to perform a task. For a short period of time, each thread requires a significant amount of network bandwidth, as it sends out large quantities of data. Most of the time, threads require no network bandwidth. In most cases, the number of threads concurrently using the network is small enough that there is sufficient network capacity, but we will run into performance problems if too many threads simultaneously are performing the segment of their task requiring the network. Which of the following technologies might help us ensure that we avoid overloading the network?
Semaphores Resource reservations

Question 19 2.5 pts
What is meant by the term re-entrant synchronization?
A health monitoring mechanism to deal with deadlock conditions
Use of a wait-for graph
A thread that holds a lock can acquire the same lock again without blocking Use of a multiple reader/single writer synchronization mechanism
Use of semaphores to control access to a shared resource
Question 20 2.5 pts
Which of the following statements is true of a typical MLFQ scheduler?
A job that never uses up the time slice for its queue is never changed to another queue The highest priority queue has the longest time slice per job
It uses SJF scheduling within each queue
It uses round robin to decide which queue to schedule from next
A new job entering the system is put in the highest priority queue
Priority inheritance Access control Demand paging
Question 21 2.5 pts
Why might a lock dance be required?
Lock breaking is being used to avoid deadlock.

Question 22 2.5 pts
Which of the following kinds of memory systems is likely to require compaction?
A variable sized partition management system for RAM The FAT file system
A paged virtual memory system
Swap space
A log structured file system on a flash drive
Question 23 2.5 pts
Which of the following file accesses are likely to be benefited by read-ahead?
File backup
Small file access
Performing an ls -l on a Linux directory
Playing a video file to the screen
A compiler reading the source code files for the Apache web server
Interrupts have been disabled.
The system is trying to avoid thrashing.
Lock ordering is being used to avoid deadlock Semaphores are used to implement the locks.
Question 24 2.5 pts
Match each of the following to whether it is an example of an operating system interface or an implementation of operating system functionality.

Question 25 2.5 pts
What is the purpose of a present bit in an operating system?
It indicates if a particular page of a process’ address space is in RAM
It indicates if a particular page address of a process’ address space is in the TLB
It indicates if a particular page address issued by a process is in one of the process’ segments
It indicates if a particular page of a process’ address space present in RAM contains the most recent version of the page data
It indicates if a particular page of a process’ address space present in RAM has been written
FIFO scheduling
[ Choose ]
A federation framework
A particular CPU architecture’s system call conventions
A clock page replacement algorithm
A journaling file system
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
Question 26 2.5 pts
What is the cause of a segmentation fault?
A process attempts to access an address not currently in the TLB
A process attempts to access an address in another process’ address space

Question 27 2.5 pts
What is a compulsory miss?
A cache miss occurring during recovery of a partial transaction in a log structured file system. An attempt to access an address outside of the process’ allocated address space
An attempt to access a page that is on disk, but not in RAM
An attempt to access a non-existent item in a special purpose cache
A page fault occurring on one of the first few addresses issued by a new process
Question 28 2.5 pts
For which of the following actions is a certificate likely to be used?
Setting up a secure socket
Determining if password authentication is correct Full disk encryption
Accessing a web page on a popular site Checking the validity of an access control list
A process attempts to write to an address in read-only memory
A process attempts to access an address outside its assigned address space A process attempts to access an address in a page not currently in RAM
Question 29 2.5 pts
Which of the following are properties of leases, as used to handle locking problems? They can cause correctness problems

Question 30 2.5 pts
What is the purpose of XDR?
It allows RPCs to use global variables
It conceals the involvement of a remote site in an RPC call
It allows machines with different architectures in participate in RPC It allows run-time binding
It helps perform remote discovery of possible RPC servers
Question 31 2.5 pts
For the pthread package implementation of condition variables, which of the following statements is true?
You must consider pthread locking when performing a wait operation, but not a signal operation
Pthread condition variables have an internal lock defined that is properly set and released when using condition variable operations.
Proper use of pthread condition variables typically requires a separately defined lock
You must consider pthread locking when performing a signal operation, but not a wait operation Proper use of pthread condition variables typically does not involve any type of locking
They are helpful in providing mutual exclusion for read-only resources They are only useful when mandatory locking is required
They help avoid deadlock
They are useful in distributed systems
Question 32 2.5 pts

Question 33 2.5 pts
Which of the following statements are true of sloppy counters used in multithreaded programs?
They can be tuned to trade off accuracy vs. speed
Their benefit is to decrease the amount of locking the multithreaded program requires The number of counters required is equal to the number of threads being used
They typically run faster than precise counters even with a single thread using the counter They are simpler to implement than precise counters
Question 34 2.5 pts
Which of the following tend to be true of device drivers?
They are specific to a particular hardware device
Because they encapsulate control of hardware functionality, they can¡¯t crash the operating system They must be available at kernel configuration time
Device driver code represents a small fraction on total OS code
Applications can only use hardware features exposed by the device driver
What useful property does a test-and-set instruction have for implementing operating system functionality?
It runs in privileged mode, and can be used to implement system call functionality It properly updates the page table register
It provides atomicity of the examination and alteration of a memory location
It supports virtual machine operations
It implements a condition variable

Question 35 2.5 pts
A Map/Reduce application is running its map phase on several nodes. All nodes but one have completed their share of the map. The remaining map node has produced half its results, but then crashes. Which of the following will happen in a proper Map/Reduce system?
All map results would be discarded and the map phase re-performed on the remaining map nodes. The failed node’s partial results will be discarded and its data share assigned to another map node.
The failed node’s partial results will be delivered to the reduce nodes, and the remainder of its data share will be assigned to another map node.
The failed node’s partial results will be delivered to the reduce nodes and the reduce phase will be performed without results from the remainder of the failed node’s data share.
The reduce phase would be performed on the complete shares, then a second Map/Reduce run would be performed to incorporate the results from the share on the failed node.
Question 36 2.5 pts
Consider a Linux file system using inodes, with the following layout:

Question 37 2.5 pts
What is the end-to-end argument?
You can¡¯t determine anything useful about a network connection until you have obtained information from both end points
Functionality should only be provided at a layered system’s endpoints, not at points in the middle The end points in a layered system are frequently the only or best points to implement functionality Important functionality must be provided at every point from one end of the network to the other Only the end points of a network should be visible to applications using it
Question 38 2.5 pts
Which of the following is the best definition of transparency in a distributed system?
Allowing easy expansion of the system by adding new hardware
Maintaining an API across multiple different versions of the operating system Making a distributed system look like a single machine system
Preventing synchronization errors across machine boundaries
Making the library interface and the system call interface indistinguishable
What would the link count in inode 29 be?
2 3 -1 1 0

Question 40 2.5 pts
Which of the following statements are true of working set page replacement algorithms?
They quickly reach equilibrium and tend to stay there
They steal page frames from one process to give them to another
They are well suited to systems using round robin scheduling
They try to customize the number of page frames allocated to a process to its current needs They try to ensure a more or less equal division of page frames among running processes
Question 39 2.5 pts
Which of the following properties is useful in handling failures in distributed systems?
Write caching
Use of semaphores Statefulness Shared state Idempotency
Quiz saved at 8:59pm
Submit Quiz

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com