Thursday, November 20, 2008

Operating Systems (MC251) : January 2008

Section A : Basic Concepts (30 Marks)
1. Which of the following is the single user and single task operating system?
(a) Windows NT (b) Unix (c) PC Dos (d) Windows 2000 (e) H line MTS.
2. Which of the following is not one of the User Services provided by the operating system?
(a) Program Execution (b) I/O Operations (c) Accounting (d) File Manipulation (e) Error Detection.
3. A job requires 10 seconds of execution time, and let’s assume the time quantum is 3 seconds. Into how many phases the job is executed?
(a) 0 (b) 1 (c) 2 (d) 3 (e) 4.
4. Which system call is used to run a new program in the process?
(a) Load (b) Execv (c) Fork (d) Request Device (e) Exit.
5. What is the portion of the operating system that must remain in memory at all times called?
(a) Instructions (b) Heap (c) BIOS (d) Monitor (e) Kernel.
6. Which of the following allows different parts of a single program to run concurrently?
(a) Multi programming (b) Multi Processing (c) Multi user (d) Multi threading
(e) Multi tasking.
7. Which problem is considered as a classic synchronization problem?
(a) Reader writers (b) Bound buffer (c) Dining philosopher (d) Producers consumer (e) All of the above.
8. Which among the following is not the minimal set of instructions that must be protected?
(a) Change to monitor mode
(b) Read from monitor memory
(c) Write into monitor memory
(d) Turn off timer interrupt
(e) Change to user mode.
9. Process is otherwise known as
I. Task.
II. Job.
III. Program.
(a) Only (I) above
(b) Only (II) above
(c) Both (I) and (II) above
(d) Both (II) and (III) above
(e) Both (I) and (III) above.
10. Which of the following becomes an important characteristic in the RR scheduling?
(a) CPU burst time (b) Time Quantum (c) Priority (d) Number of Processors (e) Number of Jobs.
11. What does FAT stand for?
(a) Fixed Allocation Table
(b) Fat Allocation Table
(c) File Allocation Table
(d) File Allocation Terminator
(e) File Arranged Table.
12. Which program swaps out the active process from the ready queue?
(a) PCB (b) Dispatcher (c) Device driver (d) Monitor (e) I/O device.
13. Which factor tells the amount of time a process has been waiting in the ready queue?
(a) Turnaround time (b) Waiting time (c) Response time (d) Throughput
(e) CPU utilization.
14. In a paging scheme the physical memory will be divided into
(a) Pages (b) Frames (c) Blocks (d) Cells (e) Segments.
15. The place where OS programs stored in the main memory is called
(a) User memory area (b) Monitor memory area (c) Heap area (d)Stack area (e) Data area.
16. Moving a program disk to main memory is called
(a) Swap In (b) Swap Out (c) Relocation (d) Paging (e) Enter In.
17. The wastage of memory in a fixed partition is called
(a) External Fragmentation (b) Internal Fragmentation (c) Complete Memory Wastage (d) Job Pool (e) Segmentation.
18. The technique of combining several small tiny holes into a big hole is called
(a) Paging (b) Aging (c) Compaction (d) Starvation (e) Reduction.
19. --------Memory management scheme transfers the required pages into main memory, but not entire program.
(a) Paging (b) Segmentation (c) Demand paging (d) Thrashing (e) Segmentation with paging.
20. If the required page is not present in the main memory, then it is called
(a) Page break (b) Page default (c) Frame fault (d) Page finish (e) Page fault.
21. Resource allocation graph is used for
(a) Detecting the deadlock
(b) Preventing the deadlock
(c) Recovering from the deadlock
(d) To cause a dead lock
(e) All of the above.
22. Which of the following symbol is used to represent the resource vertex in a RAG?
(a) (b) (c) (d) (e)
23. Which of the following causes the deadlock in the system?
(a) Process (b) Hold &Wait (c) No-Preemption (d) Pre-emption (e) Both (b) and (c) above.
24. If a process is made to wait for a long time without starting execution in the ready queue, then it is called
(a) Deadlock (b) Halted (c) Starvation (d) Both (a) and (c) above
(e) Both (a) and (b) above.
25. The technique used to avoid the starvation in the system is called
(a) Paging (b) Removing (c) Aging (d) Compaction (e) Segmentation.
26. Once a process has been given a CPU, the CPU cannot be taken away from that process until it completes the execution. This technique is called
(a) Pre-emption (b) Non pre-emption (c) Real-time (d) Response time (e) Blocking.
27. The Round Robin CPU scheduling algorithm uses
(a) FIFO circular queue (b) FIFO linear queue (c) FIFO linked queue
(d) LIFO circular queue (e) FILO circular queue.
28. Which CPU scheduling algorithm is used in Windows NT operating system
(a) Pre-emptive Priority (b) SJF (c) Round Robin (d) FCFS (e) Pre-emptive SJF.
29. ______ Algorithm is used to verify whether the system state results safe or unsafe
(a) Safety (b) Bankers (c) Test (d) Check (e) Find.
30. Which is the advantage of segmentation?
(a) Supports user view of main memory
(b) Eliminates fragmentation
(c) Provide large virtual memory
(d) Allows dynamic segment growth
(e) All of the above.
Section B : Problems (50 Marks) 1.
Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. In answering the questions, use nonpreemptive scheduling and base all decisions on the information you have at the time the decision must be made.
Process
Arrival Time
Burst Time
P1
0.0
8
P2
0.4
4
P3
1.0
1
a. What is the average turnaround time for these processes with the FCFS scheduling algorithm? ( 3 marks)
b. What is the average turnaround time for these processes with the SJF scheduling algorithm?
( 3 marks)
c. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 1 unit and then SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase. This algorithm could be known as future-knowledge scheduling. ( 4 marks)
2. List five services provided by an operating system. Explain how each provides convenience to the users. Explain also in which cases it would be impossible for user-level programs to provide these services. ( 10 marks)
3. Suppose you type the following in a UNIX command window:
rm xyz (This is a request for the operating system to delete the file xyz.)
Describe the actions the operating takes to complete this command. Discuss this at the level of process creation, memory management, searching for files, PCB’s, ready queues, and blocked queues. ( 10 marks)
4. Consider a file system on a disk that has both logical and physical block sizes of 512 bytes. Assume that the information about each file is already in memory. For each of the three allocation strategies (contiguous, linked, and indexed), answer these questions: a. How is the logical-to-physical address mapping accomplished in this system? (For the indexed allocation, assume that a file is always less than 512 blocks long.) ( 5 marks)
b. If we are currently at logical block 10 (the last block accessed was block 10) and want to access logical block 4, how many physical blocks must be read from the disk? ( 5 marks)
5.
a. Is disk scheduling, other than FCFS scheduling, useful in a single-user environment? Explain.
( 5 marks)
b. Consider a logical address space of 16 pages of 4096 words each, mapped onto a physical memory of 128 frames.
i. How many bits are there in the logical address?
ii. How many bits are there in the physical address? ( 5 marks) Section C : Applied Theory ( =SUM(D3:D50) 20 Marks)
6. Define the essential properties of the following types of operating systems:
a. Batch.
b. Interactive.
c. Time sharing.
d. Real time.
e. Distributed. ( 10 marks)
7.
a. Fragmentation on a storage device could be eliminated by recompaction of the information. Typical disk devices do not have relocation or base registers (such as are used when memory is to be compacted), so how can we relocate files? Give three reasons why recompacting and relocation of files often are avoided. ( 5 marks)
b. What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem? ( 5 marks)
Suggested Answers
1.
C
PC Dos is the single user and single task operating system.
2.
C
Accounting falls into the category of System Services.
3.
E
The job is executed in 4 phases.The order is 3 3 3 1.therefore the number of phases are 4.
4.
B
Execv system call is used to run a new program in the process.
5.
E
Kernel is the portion of the operating system that must remain in memory at all times
6.
D
Multithreading allows different parts of single program to run concurrently.
7.
C
Dining philosopher problem is considered as classic Synchronization problem.
8.
E
Change to user mode is not the minimal set of instructions that must be protected.
9.
c
10.
C
11.
C
FAT stands for File Allocation Table. It is an important variation of linked allocation method.
12.
B
Dispatcher program swaps out the active process from the ready queue.
13.
B
Waiting time tells the amount of time a process has been waiting in the ready queue.
14.
B
In a paging scheme the physical memory will be divided into Frames
15.
B
The place where O.S programs stored in the main memory is called monitor area.
16.
A
Moving a program disk to main memory is called Swap In
17.
B
The wastage of memory in a fixed partition is called Internal Fragmentation.
18.
C
The technique of combining of several small tiny holes into a big hole is called Compaction
19.
C
Demand Paging Memory management scheme transfers the required pages into main memory, but not entire program
20.
E
If the required page is not present in the main memory, then it is called Page fault
21.
A
Resource allocation graph is used for Detecting the Dead lock
22.
A
Rectangle represents resource vertex
23.
E
Hold and wait and no preemption causes deadlock.
24.
C
If a process is made to wait for a long time with out starting execution in the ready queue, then it is called -------
25.
C
Aging is the technique used to avoid the satarvation.
26.
B
Non Preemption is Once a process has been given a CPU, the CPU cannot be taken away from that process until it completes the execution
27.
A
The Round Robin CPU scheduling algorithm uses FIFO Circular Queue
28.
A
CPU scheduling algorithm is used in Windows NT operating system is Pre-emptive Priority
29.
A
Reason:Safety Algorithm is used to verify whether the system state results safe or unsafe.
30.
E
the advantages of segmentation are:
i. Supports user view of main memory.
ii. Eliminates fragmentation.
iii. Provide large virtual memory.
iv. Allows dynamic segment growth.
v. Facilitates shared segments.





No comments: