Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Test Questions

Part - A

1. Write the common file types and their functions


2. Design an algorithm for a monitor that implements an alarm clock that enables a calling
program to delay itself for a specified number of time units (ticks). You may assume the
existence of a real hardware clock that invokes a function tick() in your monitor at
regular intervals.
3. Explain the Access Control Lists (ACLs) in file systems. How they enhance security.
4. Compare the sequential and direct access methods of file
5. Compare file and a directory in a file system
6. Explain the concepts of Shared memory using memory-mapped I/O.
7. Draw the File Control Block (FCB) and Explain its function

Part - B

1. What are the conditions for Deadlock to happen


2. Race conditions are possible in many computer systems. Consider a banking system
that maintains an account balance with two functions: deposit(amount) and
withdraw(amount). These two functions are passed the amount that is to be deposited
or withdrawn from the bank account balance. Assume that a husband and wife share a
bank account. Concurrently, the husband calls the withdraw() function, and the wife
calls deposit(). Describe how a race condition is possible and what might be done to
prevent the race condition from occurring.
3. Could you simulate a multilevel directory structure with a single-level directory
structure in which arbitrarily long names can be used? If your answer is yes, explain how
you can do so, and contrast this scheme with the multilevel directory scheme. If your
answer is no, explain what prevents your simulation’s success. How would your answer
change if file names were limited to seven characters?
4. Explain the role of I/O Controller
5. Explain the purpose of the open() and close() operations.
6. Compare mutex and semaphore
7. Consider a system that supports 5,000 users. Suppose that you want to allow 4,990 of
these users to be able to access one file.
a. How would you specify this protection scheme in UNIX?
b. Can you suggest another protection scheme that can be used more effectively
for this purpose than the scheme provided by UNIX?

You might also like