Total Pageviews

Thursday, November 18, 2010

OPERATING SYSTEM QUESTION BANK

click here to download this file
QUESTION BANK SUBJECT- OPERATING SYSTEM SUBJECT CODE –ECS 501
UNIT 1
Q1.What are the three main purposes of an operating system? Name five operating systems.
Q2. Describe the differences between symmetric and asymmetric multiprocessing. What are three advantages and one disadvantage of multiprocessor systems?(pn8,1.5)
Q3. What is the purpose of interrupts? What are the differences between a trap and an interrupt? Can traps be generated intentionally by a user program? If so, for what purpose?(pn10,1.10)
Q4. Define the essential properties of the following types of operating systems: (pn12,1.17)
a. Batch
b. Interactive
c. Time sharing
d. Real time
e. Network
f. Parallel
g. Distributed
h. Clustered
i. Handheld
Q5. List five services provided by an operating system that are designed to make it more convenient for users to use the computer system. In what cases it would be impossible for user-level programs to provide these services? Explain.(pn15,2.2)
Q6. What is the main advantage of the microkernel approach to system design? How do user programs and system services interact in a microkernel architecture? What are the disadvantages of using the microkernel approach? (pn18,2.12)
Q7. In what ways is the modular kernel approach similar to the layered approach? In what ways does it differ from the layered approach? (pn19,2.13)
UNIT 2
Q1. Can a multithreaded solution using multiple user-level threads achieve better performance on a multiprocessor system than on a single-processor system?(pn30,4.5)
Q2. The first known correct software solution to the critical-section problem for two processes was developed by Dekker. Prove that the algorithm satisfies all three requirements for the critical-section problem.(pn39,6.1)
Q3. What is the meaning of the term busy waiting? What other kinds of waiting are there in an operating system? Can busy waiting be avoided altogether? (Explain your answer.pn41,6.3)
Q4. .Difference between use mode and kernel mode.
Q5.Explain semaphore. How semaphore can be used to implement mutual exclusion?

UNIT 3
Q1. Describe the differences among short-term, medium-term, and long term scheduling. (pn21,3.1)
Q2. Consider the exponential average formula used to predict the length of the next CPU burst. What are the implications of assigning the following values to the parameters used by the algorithm?(pn34,5.3)
a. α = 0 and τ0 = 100milliseconds
b. α = 0.99 and τ0= 10milliseconds
Q3. Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: (pn34,5.4)
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 the order P1, P2, P3, P4, P5,all at time 0.
a. Draw four Gantt charts 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.
b. What is the turnaround time of each process for each of the scheduling algorithms in part a?
c. What is the waiting time of each process for each of the scheduling
algorithms in part a?
d. Which of the schedules in part a results in the minimal average waiting time (over all processes)?
Q4. Which of the following scheduling algorithms could result in starvation? (pn35,5.5)
a. First-come, first-served
b. Shortest job first
c. Round
d.Priority
Q5. Consider the following snapshot of a system: (pn59,7.12)
Allocation Max Available
A B C D    A B C D     A B C D
P0       0 0 1 2       0 0 1 2        1 5 2 0
P1       1 0 0 0       1 7 5 0
P2       1 3 5 4       2 3 5 6
P3       0 6 3 2       0 6 5 2
P4       0 0 1 4       0 6 5 6
Answer the following questions using the banker’s algorithm:
a. What is the content of the matrix Need?
b. Is the system in a safe state?
c. If a request from process P1 arrives for (0,4,2,0), can the request
be granted immediately?

UNIT 4
Q1. Explain the difference between internal and external fragmentation.Which one occur in paging and which one occur in segmentation?(pn61,8.1)
Q2. Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (in order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in order)?Which algorithm makes the most efficient use of memory?(pn62,8.3)
Q3. Compare the mainmemoryorganization schemes of contiguous-memory allocation, pure segmentation, and pure paging with respect to the following issues:
a. external fragmentation
b. internal fragmentation
c. ability to share code across processes (pn63,8.5)
Q4.Compare pagingwith segmentationwith respect to the amount of memory required by the address translation structures in order to convert virtual addresses to physical addresses.(pn63,8.7)
Q5. Consider a paging system with the page table stored in memory.
a. If a memory reference takes 200 nanoseconds, how long does a paged memory reference take?
b. If we add associative registers, and 75 percent of all page-table references are found in the associative registers, what is the effective memory reference time? (Assume that finding a page-table entry in the associative registers takes zero time, if the entry is
there.) (pn64,8.9)
Q6. Why are segmentation andpaging sometimes combined into one scheme? (pn64,8.10)
Q7. Consider the following segment table: (pn65,8.12)
Segment Base Length
0            219      600
1            2300    14
2            90        100
3            1327    580
4            1952    96
What are the physical addresses for the following logical addresses?
a. 0,430
b. 1,10
c. 2,500
d. 3,400
e. 4,112
Q8. What is the purpose of paging the page tables? : (pn65,8.13)
Q9. A certain computer provides its users with a virtual-memory space of 232 bytes. The computer has 218 bytes of physical memory. The virtual memory is implemented by paging, and the page size is 4096 bytes. A user process generates the virtual address 11123456. Explain how the system establishes the corresponding physical location. Distinguish between software and hardware operations.(pn68,9.4)
Q10. Assume we have a demand-paged memory. The page table is held in registers. It takes 8 milliseconds to service a page fault if an empty page is available or the replaced page is not modified, and 20 milliseconds if the replaced page is modified. Memory access time is 100 nanoseconds .Assume that the page to be replaced is modified 70 percent of the time. What is the maximum acceptable page-fault rate for an effective access time of no more than 200 nanoseconds? .(pn68,9.5)
Q11. Discuss situations under which the least frequently used page-replacement algorithm generates fewer page faults than the least recently used page replacement algorithm. Also discuss under what circumstance does the opposite holds. (pn69,9.7)
Q12. Discuss situations under which the most frequently used page-replacement algorithm generates fewer page faults than the least recently used page replacement algorithm. Also discuss under what circumstance does the opposite holds . . (pn69,9.8)
Q13. Consider a demand-paging system with a paging disk that has an average access and transfer time of 20milliseconds.Addresses are translated through a page table in main memory, with an access time of 1microsecond
per memory access. Thus, each memory reference through the page table takes two accesses. To improve this time, we have added an associative memory that reduces access time to one memory reference, if the page-table entry is in the associative memory.
Assume that 80 percent of the accesses are in the associative memory and that, of the remaining, 10 percent (or 2 percent of the total) cause page faults. What is the effective memory access time? (pn72,9.14)
Q14. 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? (pn73,9.15)
Q15.In a paged segmented system , a virtual address consists of 32 bits of which 12 bits are displacement,11 bits are segment number and 9 bits are page number. Calculate the following:
  1. Page size.
  2. Max segment size.
  3. Max number of pages.
  4. Max number of segments.
Q16.On a system using paging nad segmentation, the virtual address space consists of up to 8 segments where each segments can be upto 229 bytes long. The hardware pages each segment into 256 bytes pages. Determine the bits needed in the virtual address to specify the:
  1. Segment number
  2. Page number
  3. Offset within page
  4. Entire virtual address.

UNIT 5
Q1. Suppose that 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? (pn88,12.2)
a. FCFS
b. SSTF
c. SCAN
d. LOOK
e. C-SCAN
Q2.Comment about blocking and non blocking I/O?
Q3.Define Seek time , Rotational latency and File sharing.
Q4.What is DMA?
Q5.Explain allocation methods of disk allocation.
Q6.Differentiate between:
  1. Block and character devices
  2. Link list and bit map approach for free space management.
  3. Double buffering and single buffering.
Q7.Why SSTF scheduling tends to favour middle cylinders over the inner most and outer most cylinders?  

2 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Hello There. I found your blog using msn. This is a really well written article.

    I will make sure to bookmark it and come back to read more of your useful info.
    Thanks for the post. I will certainly return.

    My page: bmi calculator

    ReplyDelete