ALCCS

 

Code: CS31                                                                              Subject: OPERATING SYSTEMS

Flowchart: Alternate Process: MARCH 2010Time: 3 Hours                                                                                                     Max. Marks: 100

 

NOTE:

·      Question 1 is compulsory and carries 28 marks. Answer any FOUR questions from the rest.  Marks are indicated against each question.

·      Parts of a question should be answered at the same place.

 

 


Q.1                                                                                                                                         (7  4)

            a. Which of the following instructions are privileged?

            (i)      Set value of timer.

            (ii)     Read the clock.

            (iii)    Clear memory.

            (iv)    Issue a trap instruction.

            (v)     Turn off interrupts.

            (vi)    Modify entries in device-status table.

            (vii)   Switch from user to kernel mode.

            (viii)  Access I/O device.

 

             b.  What are the system calls that are executed by a command interpreter or shell in order to start a new process?

 

 c.  Comment on the practicability of deadline scheduling.  What are practical problems governing its performance?

 

             d.  List three examples of deadlocks that are not related to a computer system environment.

 

             e.  What will happen if page size is changed from power of 2 to power of 4?

 

             f.   What type of operating system is Windows XP? Describe two of its major features.

 

 g.  Describe briefly the Master-Slave, Symmetric and Floating Supervisor types of the Multiprocessor OS.                                                                                    

 

Q.2     a.  Consider a logical address space of eight pages of 1024 words each, mapped onto a     physical memory of 32 frames.  How many bits are there in the logical and physical   addresses?

 

             b.  Some systems automatically delete all user files when a user logs off or a job terminates, unless the user explicitly requests to keep them; other systems keep all files unless the user explicitly deletes them. Discuss the relative merits of each approach.                                                                                        (2  9)

 

Q.3      a.   For three processes following parameter values are given below:

                        Process            Arrival Time                 Burst Time

                        P1                                0.0                               8

                        P2                                0.4                               4

                        P3                                1.0                               1

Using non preemptive scheduling, find average turnaround time for each process using (i)  FCFS  (ii)   SJF  (iii)  If CPU is left idle for the first 1 unit and then SJF scheduling is used.  

 

            b.   Calculate the number of disk accesses needed to read 20 consecutive logical                                          blocks of a file in a system with (i) contiguous allocation (ii) linked allocation                   (iii) indexed allocation.                                                                                     (2  9)

 

  Q.4     a.  Describe the differences between logical and physical addresses.                                       

 

             b.  What are the differences between user-level threads and kernel-level threads? Under what circumstances is one type better than the other?                                                                                      (2  9)

 

  Q.5     a.  Suppose that a system is in an unsafe state. Show that it is possible for the processes to complete their execution without entering a deadlock state.

 

             b.  Using a diagram, carry out an indexed allocation of a file for a disk based system that has a disk of 30 blocks each of 1024 bytes (take as a 6×5 matrix), File f1 of 11 logical records of 112 bytes, File f2 of 890 logical records of 13 bytes, File f3 of 510 bytes of binary data stream and File f4 of 4 logical records of 95 bytes.  (2  9)

           

  Q.6     a.  What is the effect of allowing two entries in a page table to point to the same page frame in memory? How this effect could be used to decrease the amount of time needed to copy a large of memory from one place to another? What would be the effect on one page if some bytes of other page are updated?

 

 b.  An operating system supports paged virtual memory, using a central processor with a cycle time of 1 ms. It costs an additional 1 ms to access a page other than the current one. Pages have 1000 words, and the paging device is a drum that rotates at 3000 revolutions per minute and transfers 1 million words/s. The following statistical measurements were obtained from the system:

• 1% of all instructions executed accessed a page other than the current page.

• Of the instructions that accessed another page, 80% accessed a page already that was in memory.

• When a new page was required, the replaced page was modified 50%  of the time.

                            

Calculate the effective instruction time on this system, assuming that the system is running one process only and that the processor is idle during drum transfers.        (2  9)

 

  Q.7     a.   To build a robust distributed system, Discuss its three possible types of failure. Which of failures are also applicable to a centralized system.

 

             b.   Assume that there is a page-reference string of length P for a process with m frames (initially all empty). n distinct page numbers occur in it. What are the lower and upper bounds number on the number of page faults.  You may use any page replacement Algorithm.                                                       (2  9)