CS代考 CS 111 Sample final exam

CS 111 Sample final exam
Started: Jun 5 at 9:18am
Quiz Instructions
The following is a sample final exam for CS 111, intended to help you study for the actual final. It is shorter than the real final, but contains similar kinds of questions. You are not required to take this practice exam, and doing so will not affect your grade.

Copyright By PowCoder代写 加微信 powcoder

Question 1 1 pts
Match the following problems in providing correct behavior in NFSv2 with the solutions used in that system.
Update visibility
Stale cache contents
Non-idempotent mkdir semantics
[ Choose ]
[ Choose ]
[ Choose ]
Question 2 1 pts
Match the following elements of the FAT file system with their role in that system.
BIOS block
Directory entries
[ Choose ]
[ Choose ]
[ Choose ]

Question 4 1 pts
Match the following security design principles to an example of their use.
Economy of mechanism
Complete Mediation
Least privilege
Open design
Fail-safe defaults
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
Question 3 1 pts
Match each REST constraint with a reason why it is required in RESTful systems.
Client-server
Statelessness
Cacheability
Uniform interface
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]

Question 6 1 pts
Which of the following are advantages of a kernel-supported thread approach vs. user-mode threads?
Thread blocking on system calls does not reduce parallelism for kernel threads Kernel threads provide better support for intra-process parallelism
Kernel supported threads can make use of a single shared stack per process
Kernel threads can protect against infinite loops in threads, while user threads cannot Kernel threads are always cheaper to schedule
Question 5 1 pts
Which of the following general synchronization solutions is most suitable for dealing with the following kinds of synchronization bugs?
Atomicity-violation bugs
Order-violation bugs
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
Question 7 1 pts
What are the benefits of lazy writes (write buffering)?
More efficient scheduling of writes.
Avoid performing some writes to the storage devices entirely.

Question 8 1 pts
Which of the following are effective means of reducing resource contention?
identify the conflicting computations, and avoid running them at the same time
Divide resources into sub-pools, each with its own lock
reduce the number of updates to a shared data structure
use a smaller number of more global locks to reduce the number of locking operations Reduce the size of the critical section
increase the number of threads (and processors to run them)
Question 9 1 pts
Which of the following statements are true of cryptographic hashes?
They are a form of public key cryptography
It should be hard to deduce characteristics of the plaintext based on the hash The algorithm used is typically secret
Two similar plaintexts should hash to entirely different values
They must be collision-free
They require a shared secret key between sender and receiver
It should be hard to find two plaintexts that hash to the same thing
Better reliability in the face of system crashes
Better performance for very small writes
Eliminate writes that are identical to the data on the disk
Question 10 1 pts

Question 11 1 pts
The best definition of “livelock” is:
The necessary lock is available
Continuing to execute while holding a locked resource Failing to achieve a safe resource allocation state Deadlock has been avoided, but not prevented
not blocked, but unable to make progress
Question 12 1 pts
Which of the following problems are likely to be encountered if one uses direct page mapping to implement an FTL?
High performance penalties for garbage collection Severe write amplification
Severe read amplification
High performance cost on writes
Poor wear leveling
Which of the following are valid observations about Deadlock Detection and Health Monitoring?
Heart Beat detection cannot determine if a component is working correctly.
Health monitoring cannot detect formal deadlocks.
Deadlock detection demands that we be able to identify all participating resources. Either can be done from outside of the involved applications.
Both are invoked only when we have reason to believe the system may be in trouble.

Question 13 1 pts
Which of the following statements are true of DMA?
It can only be performed when the CPU is not using the memory bus
It permits devices to obtain data in RAM without going through the CPU
Devices can always seize the bus to perform DMA
It is controlled by a scheduler that determines who uses the bus at any given moment It is most efficient for small data transfers
It can only be used when the CPU is idle
Question 14 1 pts
Which of the following are benefits of dynamic allocation of a resource to multiple parties, as opposed to static allocation of pieces of the resource among the parties?
Dynamic allocation better ensures that no party is starved of any share of the resource Dynamic allocation is less likely to lead to deadlock than static allocation
Dynamic allocation is simpler and cheaper than static allocation
Dynamic allocation is likely to achieve better utilization of the resource
Dynamic allocation can better adjust to different needs among the parties Dynamic allocation provides more predictable performance
Question 15 1 pts
Which of the following actions typically occur when you create a file?
The file’s existence is reliably written to persistent media The initial data is written into the file

Question 16 1 pts
Which of the following significant performance issues in prior Unix file systems were identified and fixed by the Berkeley Fast File System team?
The difficulty of allocating contiguous or nearly contiguous blocks.
Evolving disk technology that made it impossible to identify cylinder boundaries.
Improving the interface to the file system
Time spent seeking between I-nodes, directories and files.
High disk/head motion overhead due to a small block size.
The difficulty of optimizing file head motion for processes that operate in multiple directories.
Question 17 1 pts
Which is the best description of Java synchronized methods?
Java synchronized methods enforce mutual exclusion, but not before-or-after semantics.
while a thread executes an object’s synchronized method, no other thread can execute a synchronized method for that object.
the object is locked against other invocations of the same synchronized method Java synchronized methods provide full semaphore semantics.
the class is locked for the duration of any of its synchronized methods
The caller doesn¡¯t block, but receives a signal from the OS when the creation is complete A file descriptor is chosen and filled in
A name is written into a directory
Question 18 1 pts

Question 19 1 pts
Which of the following statements are true of the cloud model of computing?
It exposes virtual resources to its users
Cloud services are designed to handle flexible degrees of load gracefully All data access in a cloud environment is remote
They do not fit in well with horizontally scalable systems
Public cloud services are typically co-located with their clients
Question 20 1 pts
What problem do condition variables solve?
coordinating cooperating parallel processes
defining the conditions under which a computation should continue awaiting the completion of asynchronous events
Shared resource allocation
Which of the following are true observations about spinning?
it may delay the availability of the required resource
it is usually a bad choice on a single core processor
it is usually a bad choice on a multi-core processor
waiting lists can eliminate spinning, and they can be implemented without locks
if many processes contend for the resource, yielding is the correct choice, rather than spinning it ensures prompt response when the resource becomes available

Quiz saved at 9:19am
Submit Quiz

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