SONA COLLEGE OF TECHNOLOGY
B.TECH. IT II YEAR / IV SEMESTER – SECTION 'B'
SUB: CS 2254 OPERATING SYSTEMS
Date: 15/02/10
Time: 1 hour
Part – A
(6 x 2 = 12)
Answer any SIX questions:
What are the three main purposes of an Operating System?
List the four steps needed to run a program on a completely dedicated machine.
What is the main advantage of multiprogramming?
What are the differences between a trap and an interrupt?
For what types of operations is DMA useful?
What are the five major activities of an Operating System in regard to process management?
Define – Asynchronous I/O.
Processes call the operating system with system call interrupt instructions. Why can't processes make ordinary procedure calls to the operating systems?
Part – B
Answer all the questions:
Differentiate Symmetric and Asymmetric multiprocessing architecture. (6)
List all the types of system calls. (7)
---ALL THE BEST---
SONA COLLEGE OF TECHNOLOGY
B.TECH. IT II YEAR / IV SEMESTER – SECTION 'B'
II WEEKLY TEST SUB: CS 2254 OPERATING SYSTEMS
Date: 08/03/10
Time: 1 hour
Part – A
(10 x 2 = 20)
Answer all the questions:
What is the difference between system call and system program?
Define latency, transfer and seek time with respect to disk I/O.
Write down the two common models of communication.
________________ system program is the interface between the user and the operating system.
What are the two common system structures available for the operating system?
Define – Kernel.
What is the major difficulty present with the Layered approach?
List down the contemporary operating systems that use the Microkernel approach.
If the process is waiting for a processor, then the state is ___________.
Define the task – Context switch.
Part – B
(1 x 5 = 5)
Explain the different system calls that are used while writing a simple program to read data from one file and to copy them to another file.
---ALL THE BEST---
SONA COLLEGE OF TECHNOLOGY
B.TECH. IT II YEAR / IV SEMESTER – SECTION 'B'
II WEEKLY TEST SUB: CS 2254 OPERATING SYSTEMS
Date: 29/03/10
Time: 1 hour
Part – A
(15 x 1 = 15)
Answer all the questions:
The FCFS scheduling algorithm is preemptive (True / False)
The real difficulty with the SJF algorithm is to know the length of the _____________.
What is the technique to gradually increase the priority of processes that wait in the system for a long time?
The performance of the RR algorithm depends heavily on the size of the ____________.
In a multilevel queue-scheduling algorithm, the foreground queue is scheduled by an ________ algorithm, while the background queue is scheduled by an _______ algorithm.
Consider the FCFS, SJF, and RR (quantum = 10 ms) scheduling algorithms for this set of processes. Which algorithm would give the minimum average waiting time?
List the four conditions that prevent the occurrence of a deadlock.
Mutex stands for ____________
The situation where processes wait indefinitely within the semaphore is called ______________.
The simplest way to break a deadlock is to
Preempt a resource (b) rollback (c) kill one of the processes (d) lock one of the processes.
If Round Robin is used with a time quantum of 1 second, the turnaround time for Job 2 will be
Job Number
CPU Time
1
1 hour
2
1 second
3
1 second
(a) 1 second (b) 2 seconds (c)1 hour (d)1 hour, 1 second
Process cooperation in a Readers-and-Writers problem requires that the
(a) Writers always call two procedures (b) Writers perform a Test-and-Set
(c) Readers always call two procedures (d) Readers perform a Test-and-Set
Which of the following is true in the context of Inter-process communication:
(a) It is like a user defined procedure call. (b) It is like user defined a function call. (c) It is a system call.
Which of the following is not true about the message passing model of IPC:
Cooperating processes communicate by exchanging messages
It is useful for exchanging smaller amounts of data (c) compared to the shared memory model, it is
easier to implement (d) compared to the shared memory model, it allows maximum speed and convenience of communication.
Monitors make processes free from deadlock. (True / False)
Part – B
(5 x 2 = 10)
Mention the methods for deadlock recovery in a system.
List the three requirements that must be satisfied by critical-section problem.
Why CPU scheduling is required?
What is busy waiting with respect to process synchronization?
Define the use of monitor.
---ALL THE BEST---
SONA COLLEGE OF TECHNOLOGY
B.TECH. IT II YEAR / IV SEMESTER – SECTION 'B'
MODEL EXAMINATION SUB: CS 2254 OPERATING SYSTEMS
Date: 22/04/10
Time: 3 hours Max Marks: 100
Part – A (20 x 2 = 40 marks)
Answer all the questions:
Define Real Time Operating System.
List the challengers in designing a distributed operating system.
Define SYSTEM CALLS.
Distinguish Preemption and No-preemption.
What do you mean by a critical section problem?
Define the use of monitor.
Is it possible to have a deadlock involving only one process? Explain your answer.
Describe the four necessary conditions for deadlocks.
Why should paging be used by operating systems?
Why are page sizes always powers of 2?
Define virtual memory.
What is the cause of thrashing?
What is the Kernel of an operating system?
What is semaphore? Mention its importance in operating systems.
Under what circumstances would one use the deferred Procedure Calls facility in Windows XP?
Mention the advantage of using Translation Lookaside Buffer.
Why rotational latency is usually not considered in disk scheduling?
What are the different ways to achieve mutual exclusion?
How does the CPU scheduler prevent the higher priority processes from indefinite running?
Mention the importance of swap-space management.
Part – A (5 x 12 = 60 marks)
Consider the following set of processes, with the length of CPU-burst time given in millisecond:
Process
Burst time
Priority
P1
10
3
P2
1
1
P3
2
3
P4
1
4
P5
5
2
The processes are assumed to have arrived in order P1, P2, P3, P4, P5 all at time 0. (i) Draw Gantt chats illustrating the execution of these processes using FCFS, SJF, a non-preemptive priority ( a smaller priority number implies a higher priority) and RR (quantum=1) scheduling (ii) What is the turnaround time of each process for each of the scheduling algorithms in part (i)? [12]
Process
Allocated Resources
Maximum Requirement
R1
R2
R3
R1
R2
R3
P1
2
2
3
3
6
8
P2
2
0
3
4
3
3
P3
1
2
4
3
4
4
An operating system contains three resource classes, namely R1, R2 and R3. The number of resource units in these classes is 7, 7 and 10 respectively. The current resource allocation state is as shown below :
(i) Is the current allocation state safe? [3]
(ii)Would the following requests be granted in the current state?
(1) Process P1 requests (1, 1, 0) [3]
(2) Process P3 requests (0, 1, 0) [3]
(3) Process P2 requests (0, 1, 0) [3]
Consider the following page reference string : 1,2,7,8,3,4,2,1,4,2,5,6. How many page faults would occur for the following page replacement algorithms, assuming an allocation of 3 frames?
(i) LRU [4]
(ii)FIFO [4]
(iii)Optimal [4]
A disk drive has 5000 cylinders numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order is 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130.
Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for each of the following disk-scheduling algorithms?
FCFS, SSTF, LOOK, C-SCAN. [12]
Show how to implement the wait () and signal () semaphore operations in multiprocessor environments using the Test () and Set () instruction. The solution should exhibit minimal busy waiting. Develop Pseudocode for implementing the operations. [12]
---ALL THE BEST---
CS 2254 – OPERATING SYSTEMS
QUESTION BANK
UNIT – I (2 marks)
What are the three main purposes of an operating system?
What are the main differences between operating systems for mainframe computers and personal computers?
Under what circumstances would a user be better off using a timesharing system rather than a PC or single-user workstation?
Why is the Operating System viewed as a resource allocator & control program?
List the responsibilities of the operating system in connection with disk management.
What is spooling?
What is the advantage of Multiprogramming?
What are the different types of multiprocessing?
Describe the differences between symmetric and asymmetric multiprocessing.
What is graceful degradation?
What is Dual-Mode Operation?
What are privileged instructions?
How can a user program disrupt the normal operations of a system?
How is the protection for memory provided?
Define Real-time operating systems.
What is the main difficulty that a programmer must overcome in writing an operating system for a real-time environment?
What is an Interactive computer system?
What do you mean by Time-sharing systems?
What are the various OS components?
Define system calls.
List the challenges in designing a distributed operating system.
Define Task Control Block.
List the four steps that are necessary to run a program on a completely dedicated machine.
Define process. What is the information maintained in a PCB?
List the components present in PCB.
State the assumption behind the bounded buffer producer consumer problem.
What is cooperating process?
Define thread. Specify the benefits of multithread programming.
What is a process state and mention the various states of a process?
What are the use of job queues, ready queues & device queues?
When a process creates a new process, what are the two possibilities in terms of the address space of the new process?
Under which of the following circumstances, children processes may be terminated.
What are the main advantages of the microkernel approach to the system design?
What is meant by context switch?
Compare user threads and kernel threads.
State what a thread shares with peer threads.
What is the use of fork and exec system calls?
Can system call fork () fail? If it cannot, explain. If it can, explain under what situation it can fail.
Define thread cancellation & target thread.
Threads are more efficient than processes, justify?
What are the differences between a trap and an interrupt?
For what types of operations is DMA useful?
What are the five major activities of an Operating System in regard to process management?
Processes call the operating system with system call interrupt instructions. Why can't processes make ordinary procedure calls to the operating systems?
Define latency, transfer and seek time with respect to disk I/O.
Write down the two common models of communication.
What are the three major activities of an operating system in regard to memory management?
What is the purpose of the command interpreter? Why is it usually separate from the kernel?
List five services provided by an operating system.
What resources are used when a thread is created? How do they differ from those used when a process is created?
UNIT – II (2 marks)
Define CPU scheduling.
What is preemptive and non-preemptive scheduling?
What is a Dispatcher?
What are the various scheduling criteria for CPU scheduling?
What is semaphore? Mention its importance in operating systems.
What is memory compaction? Why it is not preferred generally?
Mention the advantages of using Translation Lookaside Buffer.
What are the classical problems of process synchronization?
What do you mean by a critical section problem?
Define the use of monitor.
What is the significance of Test and Set instruction?
Is it possible to have a deadlock involving only one process? Explain your answer.
What is deadlock? What are the four necessary conditions for deadlock?
What is dispatch latency?
Define throughput.
What is turnaround time?
Define race condition.
Define starvation.
What is rendezvous?
Write notes on resource allocation with monitors.
Explain how you will overcome the race condition.
Explain critical region.
What is meant by Mutual Exclusion?
Mention the methods for deadlock recovery in a system.
List the three requirements that must be satisfied by critical-section problem.
Why CPU scheduling is required?
How does the CPU scheduler prevent the higher priority processes from indefinite running?
What is busy waiting with respect to process synchronization?
What are the requirements that a solution to the critical section problem must satisfy?
Define entry section and exit section.
Define busy waiting and spinlock.
What is the sequence in which resources may be utilized?
What is a resource-allocation graph?
Define request edge and assignment edge.
What are the methods for handling deadlocks?
Define deadlock prevention.
Define deadlock avoidance.
What are non resource deadlocks?
What are a safe state and an unsafe state?
What advantage is there in having different time-quantum sizes on different levels of a multilevel queuing system?
List three examples of deadlocks that are not related to a computer system environment.
Mention the methods for deadlock recovery in a system.
Name the queues that are associated with multilevel queue scheduling algorithm.
Discuss why implementing synchronization primitives by disabling interrupts is not appropriate in a single-processor system if the synchronization primitives are to be used in user-level programs.
What are the constraints in Dining-Philosopher's algorithm?
Define Response time and throughput.
Briefly state one method for a system administrator to list all processes in the Linux operating system.
List three aims of the scheduler in any operating system.
When are two processes said to be concurrent? Explain.
Briefly explain process creation.
Define Rollback.
What is bounded buffer monitor?
UNIT – III (2 marks)
Differentiate segmentation from paging.
Under what circumstances do page fault occur?
Define thrashing. How does the system detect thrashing and eliminates it?
What is required to support dynamic memory allocation in contiguous memory allocation?
Write short notes on pre-paging.
Why are page sizes always powers of 2?
State few scenarios for the occurrence of page faults.
Why should paging be used by operating systems?
Define virtual memory.
What is the cause of thrashing?
Compare and contrast logical address space and physical address space.
What is External Fragmentation? How will you reduce it?
What is the role of valid and invalid bit of a page table?
Define Internal Fragmentation.
Discuss the terms: Logical Address, Physical Address.
What are the advantages of having an inverted page table?
Why are segmentation and paging sometimes combined into one scheme?
What is the purpose of paging the page tables?
Suppose we have a computer system with a 44-bit virtual address, page size of 16K, and 4 bytes per page table entry. How many pages are in the virtual address space?
What is meant by swapping?
What is the difference between cache and virtual memory?
Explain the concept of overlays.
What are the functions of memory management module?
How does the system detect thrashing and eliminate the same?
Define dynamic loading.
Define dynamic linking.
What are the common strategies to select a free hole from a set of available holes?
Define lazy swapper.
What is demand paging?
What is a pure demand paging?
Define effective access time.
What is the basic approach of page replacement?
What is the various page replacement algorithms used for page replacement?
What are the major problems to implement demand paging?
What is a reference string?
Define block mapping.
What are the attributes of files?
What is the role of presence bit and modifier bit in Virtual memory management scheme?
Define Denning's working set principle.
What is meant by anticipatory paging?
What is meant by locality of reference?
Define Belady's anomaly.
What do you mean by best fit?
What do you mean by first fit?
Explain the term dirty page in a paging system.
List two important functions of a paging system in an operating system.
Give one simple example for the use of a read-only memory page.
How the external fragmentation can be solved?
Give the basic idea behind dynamic memory allocation.
What is a downfall of memory compaction?
UNIT – IV (2 marks)
What are the different types of file access modes?
What are the various file operations?
What are the informations associated with an open file?
What are the different accessing methods of a file?
Define – directory.
What are the operations that can be performed on a directory?
What are the most common schemes for defining the logical structure of a directory?
Define UFD and MFD.
What is a path name?
What are the various layers of a file system?
What are the structures used in file-system implementation?
What are the functions of virtual file system?
Define seek time and latency time.
What are the allocation methods of a disk space?
What are the advantages of contiguous allocation?
What are the drawbacks of contiguous allocation of disk space?
What are the advantages of Linked allocation?
What are the disadvantages of Linked allocation?
What are the advantages of indexed allocation?
How can the index blocks be implemented in the indexed allocation scheme?
How free-space is managed using bit vector implementation?
Explain different types of file access methods.
Define file sharing.
Define file system.
Mention the services of file system.
Mention various file allocation techniques.
Explain the consistency checking in recovery.
Write the backup schedule in recovery.
Explain the purpose of the open () and close () operations.
What problems could occur if a system allowed a file system to be mounted simultaneously at more than one location?
Why must the bitmap for file allocation be kept on mass storage, rather than in main memory?
How do caches help improve performance? Why do systems not use more or larger caches if they are so useful?
Why is it advantageous for the user for an operating system to dynamically allocate its internal tables?
Why do some systems keep track of the type of a file, while others leave it to the user or simply do not implement multiple file types?
Why is protection needed in file sharing systems?
What is FAT?
What are the advantages and disadvantages of recording the name of the creating program with the file's attributes?
Define – Access-Control List (ACL).
Define – mount point.
Define – acyclic graph.
Define – Single-level directory.
Define – File Control Block.
List the structure of On-disk.
Define page cache.
What is the functionality of the consistency checker?
UNIT – V (2 marks)
What are the allocation methods of a disk space?
Define rotational latency and disk bandwidth.
Define buffering.
Define spooling.
What are the various disk-scheduling algorithms?
What is low-level formatting?
What is the use of boot block?
What is sector sparing?
What are the advantages of using disks over main memory for storage?
What is the need for disk scheduling?
Briefly discuss the relative advantages and disadvantages of sector sparing and sector slipping.
Why rotational latency is usually not considered in disk scheduling?
Define swap space.
How free space is managed using bit vector implementation?
Mention the importance of swap-space management.
Define device drivers.
Explain the essential goals of disk scheduling.
Define disk access time and seek time.
Mention the components of module which support under linux.
List out the components of linux system.
List some of the common access control mechanism you use.
Define the disk formatting and its types.
What is meant by boot or system disk?
Mention the list of transactions done in when a system finds a bad sector in disk.
Define constant angular velocity.
Define constant linear velocity.
Explain the security modes in linux.
In the context of disk reliability define mirroring.
Differentiate RAID level 0 and RAID level 1.
List the features of linux system.
Why is it important to balance file system I/O among the disks and controllers on a system in a multitasking environment?
What are the tradeoffs involved in rereading code pages from the file system, versus using swap space to store them?
Is there any way to implement truly stable storage? Justify your answer.
In a disk jukebox, what would be the effect if the number of open files was greater than the number of drives in the jukebox?
What would be the effects on cost and performance if tape storage had the same areal density as disk storage?
If magnetic hard disks eventually have the same cost per gigabyte as do tapes, will tapes become obsolete, or will they still be needed?
State three advantages of placing functionality in a device controller, rather than in the kernel.
State three disadvantages for the above condition.
How does DMA increase system concurrency? How does it complicate the hardware design?
Define streams.
Distinguish between a streams driver and a streams module.
Define Polling.
Define the concept of a daisy chain.
Define the role of interrupt-handler in I/O hardware.
List the two types of interrupts.
What is interrupt vector?
What is the role of DMA in I/O systems?
Differentiate Blocking and Non-blocking I/O.
What is the role of sense key in error handling?
Define – I/O Channel.