Thursday, November 20, 2008

Operating Systems (MC251) : July 2007

Section A : Basic Concepts (30 Marks)
1. Which of the following controls the access of programs, processes or users to the resources defined by the system?
(a) Prevention (b) Security (c) Protection (d) Access stop (e) Access right.
2. A distributed system is a collection of processors that
(a) Do not share memory (b) Has no memory (c) Share memory
(d) Has less memory (e) Has more memory.
3. Which of the following is true related to the CPU utilization?
I. Throughput should be less.
II. Response time should be less.
III. Waiting time should be less.
IV. Turnaround time should be less.
(a) Only (I) above
(b) Both (I) and (II) above
(c) Both (I) and (IV) above
(d) Both (II) and (III) above
(e) Both (III) and (IV) above.
4. Which of the following must be satisfied by a Critical Section?
I. Progress.
II. Mutual Exclusion.
III.Bounded Waiting.
(a) Only (I) above
(b) Only (II) above
(c) Only (III) above
(d) Both (I) and (II) above
(e) All (I), (II) and (III) above.
5. ACL stands for
(a) Attribute Control List
(b) Access Connection List
(c) Access Control Line
(d) Access Connection Line
(e) Access Control List.
6. The following diagram identifies:
(a) Directory graph (b) Tree structured directory (c) Acyclic graph directory
(d) General graph directory (e) Cyclic graph directory.
7. Identify the synonym for physical formatting.
(a) Logical Formatting (b) Low Level Formatting (c) High Level Formatting
(d) Medium Level Formatting (e) Reformatting.
8. When a CPU scheduling algorithm determines an order for the execution of its scheduled processes. Given n processes to be scheduled on one processor. What is the number of possible different schedules?
(a) n (b) n+1 (c) n-1 (d) n! (e) n*n.
9. The two valid semaphore operations are
(a) Signal and die (b) Wait and signal (c) Wait and interrupt
(d) Wait and terminate (e) Wait and die.
10. Access-right is equal to
(a) (b) (c) (d) (e)
11. Which of the following graph describes the deadlocks more precisely?
(a) Pie graph (b) Bar graph (c) Gantt graph (d) Resource Allocation graph (e) XY graph.
12.PTLR stands for
(a) Page Table Load Register
(b) Page Tree Length Register
(c) Program Table Length Register
(d) Page Table Length Ready
(e) Page Table Length Register.
13. Which of the following is a non-self modifying code?
I. Machine code.
II. Critical section code.
III. Reentrant code.
IV. Pure code.
(a) Only (I) above
(b) Only (II) above
(c) Only (III) above
(d) Only (IV) above
(e) Both (III) and (IV) above.
14. specifies:
I. Pi requests instance of Rj.
II. Pi releases instance of Rj.
III. Pi holds instance of Rj.
(a) Only (I) above
(b) Only (II) above
(c) Only (III) above
(d) Both (I) and (II) above
(e) All (I), (II) and (III) above.
15. What is the formula for Effective Access Time?
(a) EAT= (1-p) + ma*p+pft
(b) EAT= (1+p) * ma+p*pft
(c) EAT= (1*p) * ma+p*pft
(d) EAT= (1-p) * ma+p*pft
(e) EAT= (1/p) + ma+p*pft.
16. Which of the following specifies (1, 0) in enhanced second chance algorithm?
(a) Referred and modified
(b) Modified and not Referred
(c) Referred but not modified
(d) Neither referred nor modified
(e) Meaning less.
17. Identify the synonym for Direct Access
(a) Sequential Access (b) Indexed Access (c) Relative Access (d) Linked Access
(e) Multilevel Access.
18. What is the portion of the operating system that must remain in memory at all times?
(a) Kernel (b) Bios (c) Monitor (d) Stack (e) Instructions.
19. What is the process of moving a process' code and data around in main memory without having to recompile?
(a) Deallocation (b) Reallocation (c) Compilation (d) Exécution (e) Interprétation.
20. The figure below illustrates
(a) SCAN (b) SSTF (c) C-SCAN (d) C-LOOK (e) LOOK.
21. Consider that a process arrives into the system at time 20 and needs 50 time units in the CPU. Because of other processes, it doesn’t start to execute until time 130, and doesn’t complete till time 300, then how long is its waiting time?
(a) 220 (b) 230 (c) 240 (d) 250 (e) 260.
22. A process P consists of five pages P1, P2, P3, P4, and P5, but the operating system allows only THREE page-frames. During its lifetime the process references its pages in the order P1, P2, P3, P2, P1, P4, P1, and P5. If the memory management policy is LFU (Least Frequently Used, with FIFO used to decide ties), which page will be replaced to make room for P5?
(a) P1 (b) P2 (c) P3 (d) P4 (e) P5.
23. What is the effective access time for a page default with a probability of 40%, page fault service time of 8 milliseconds and a memory access time of 200 nanoseconds?
(a) 248.1 nanoseconds (b) 200.3 nanoseconds (c) 128.4 nanoseconds
(d) 123.2 nanoseconds (e) 124.3 nanoseconds.
24. Which of the following operations of files allows the user to erase the content of a file keeping its attributes?
(a) Repositioning within the file (b) Truncating file (c) Deleting a file
(d) Renaming a file (e) Exiting from a file.
25. Which of the following is/are the technique(s) used for counting based page replacement?
I. Least Frequently Used (lfu).
II. Most Frequently Used (MFU).
III. Least Recently Used (LRU).
(a) Only (I) above
(b) Only (II) above
(c) Only (III) above
(d) Both (I) and (II) above
(e) All (I), (II) and (III) above.
26. Which of the following is the disc scheduling algorithm that selects the request with the minimum seek time from the current head position?
(a) FCFS Scheduling (b) SSTF Scheduling (c) SCAN Scheduling (d) LOOK Scheduling (e) C-LOOK Scheduling.
27. Which of the following is not a file attribute?
(a) Name (b) Protection (c) Security (d) Size (e) Location.
28. Which of the following is not a System Threat?
(a) WORM (b) Denial of Services (c) Internet WORM (d) Viruses (e) Trojan Horse.
29. A small piece of code used to locate the appropriate memory-resident library routine is called
(a) Skeleton (b) Server (c) Client (d) Stub (e) Program.
30. In which of the following one server runs the application or applications while other servers are standby?
(a) Asymmetric clustering (b) Symmetric Clustering (c) Fragmentation (d) Clustering
(e) Waited Computing.

Section B : Problems (50 Marks)
1
a. Explain the concept of transaction atomicity.
b. Is it possible to have a deadlock involving only one single process? Explain. (5 + 5 = 10 marks)
2 Consider a system that supports 5000 users. Suppose that you want to allow 4990 of these users to be able to access one file.
a. How would you specify this protection scheme in UNIX?
b. Could you suggest another protection scheme that can be used more effectively for this purpose than the scheme provided by UNIX? (4 + 6 = 10 marks)
3 Consider a file currently consisting of 100 blocks. Assume that the file control block and the index block, in the case of indexed allocation is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed- single level allocation strategies, if, for one block, the following conditions hold. In the contiguous-allocation case, assume that there is no room to grow in the beginning, but there is room to grow in the end. Assume that the block information to be added is stored in memory.
a. The block is added at the beginning.
b. The block is added in the middle.
c. The block is added at the end.
d. The block is removed from the beginning.
e. The block is removed from the end. (5 * 2 = 10 marks)
4
a. Mention the main differences between capability lists and access lists.
b. What are the three major activities of an operating system in regard to secondary-storage management?
c. Explain the differences, in terms of cost, among the three storage types volatile, nonvolatile, and stable. (3 + 3 + 4 = 10 marks)
5
a. What is PCB? Identify the information associated with a specific process.
b. Name the five major categories of system calls to give examples. (5 + 5 = 10 marks)
Section C : Applied Theory (20 Marks)
6 What is IPC? Explain the different ways to implement IPC. (10 marks)
7 Differentiate between the following terms
a. Long Time Scheduler and Short Time Scheduler
b. Preemptive Scheduling and Non-preemptive Scheduling
c. Process and Program
d. Multilevel Queue and Multilevel Feedback Queue
e. MS DOS and Windows Operating systems. (2 + 2 + 2 + 2 +2 = 10 marks)
Suggested Answers
1.
Answer : (e)
Reason : Access right controls the access of programs, processes or users to the resources defined by the system.
2.
Answer : (a)
Reason : A distributed system is a collection of processors that do not share memory.
3.
Answer : (a)
Reason : Throughput should be less related to the CPU utilization is true.
4.
Answer : (e)
Reason : Critical Section will have Progress, Mutual Exclusion and Bounded Waiting
5.
Answer : (e)
Reason : ACL stands for: Access Control List.
6.
Answer : (d)
Reason : It is general graph directory
7.
Answer : (b)
Reason : Physical Formatting is also Called as Low Level Formatting
8.
Answer : (d)
Reason : Given n processes to be scheduled on one processor. The numbers of possible different schedules are n!.
9.
Answer : (b)
Reason : The two valid semaphore operations are wait () and signal ().
10.
Answer : (a)
Reason : Access-right =
11.
Answer : (d)
Reason : The deadlocks more precisely described by RAG.
12.
Answer : (e)
Reason : PTLR stands for Page table length register
13.
Answer : (e)
Reason : Reentrant or pure code is non self modifying code.
14.
Answer : (a)
Reason : Pi requests instance of Rj.
15.
Answer : (d)
Reason : The formula for Effective access time is (1-p) * ma+p*pft
16.
Answer : (c)
Reason : (1, 0) in enhanced second chance algorithm specifies Referred but not modified.
17.
Answer : (c)
Reason : The synonym for Direct Access is Relative Access.
18.
Answer : (c)
Reason : The portion of the operating system that must remain in memory at all times called kernel.
19.
Answer : (b)
Reason : Reallocation is the process of moving a process' code and data around in main memory without having to recompile.
20.
Answer : (c)
Reason : The figure illustrates C-SCAN.
21.
Answer : (b)
Reason : Consider that a process arrives in to the system at time 20, and needs 50 time units in the CPU. Because of other processes, it doesn’t start to execute until time 130, and doesn’t complete till time 300, then its waiting time is 230.
22.
Answer : (d)
Reason : A process P consists of five pages P1, P2, P3, P4, and P5, but the operating system allows only THREE page-frames. During its lifetime the process references its pages in the order P1, P2, P3, P2, P1, P4, P1, and P5. If the memory management policy is LFU (Least Frequently Used, with FIFO used to decide ties), then P4 page will be replaced to make room for P5.
23.
Answer : (d)
Reason : The formula for effective access time =
= (1 –P) ma + P x Page fault time
= (1-.4) 200 + .4 x 8
= 123.2 nanoseconds
24.
Answer : (b)
Reason : Rather than forcing the user to delete the file and then recreate truncating, it allows all attributes remain unchanged
25.
Answer : (d)
Reason : The techniques used for counting based page replacement are Least frequently used (lfu) and Most frequently used (MFU).
26.
Answer : (a)
Reason : The disc scheduling selects the request with the minimum seek time from the current head position is FCFS Scheduling
27.
Answer : (c)
Reason : Security is not a file attribute.
28.
Answer : (e)
Reason : Trojan Horse is not a System Threat.
29.
Answer : (d)
Reason : small piece of code, stub is used to locate the appropriate memory-resident library routine.
30.
Answer : (a)
Reason : Consider that one server runs the application or applications while other servers are standby called Asymmetric clustering

No comments: