AMIETE – CS/IT (NEW SCHEME)   –   Code: AC59/AT59

 

Subject: OPERATING SYSTEMS & SYSTEMS SOFTWARE

Flowchart: Alternate Process: JUNE 2009Time: 3 Hours                                                                                                     Max. Marks: 100

 

NOTE: There are 9 Questions in all.

·      Question 1 is compulsory and carries 20 marks. Answer to Q. 1. must be written in the space provided for it in the answer book supplied and nowhere else.

·      Out of the remaining EIGHT Questions answer any FIVE Questions. Each question carries 16 marks.

·      Any required data not explicitly given, may be suitably assumed and stated.

 

 

Q.1       Choose the correct or the best alternative in the following:                                  (210)

                

             a.  The expansion of nested macro calls follow

 

                  (A) FIFO rule.                                      (B) LIFO rule.

                  (C) LILO rule.                                      (D) Priority rule.

 

             b. Type -0 grammars are 

 

                  (A) Context-sensitive grammars.           (B) Context-free grammars.

                  (C) Phrase-structured grammars.          (D) Linear grammars.

 

             c.  An imperative statement

 

                  (A) Reserves areas of memory and associates names with them.

            (B) Indicates an action to be performed during execution of assembled program.

                  (C) Indicates an action to be performed during optimization.                                              

                  (D) None of the above.

 

             d.  LRU policy stands for

 

                  (A) Least recently used.                        (B) Longest Run usage.

                  (C) Least response until.                       (D) Longest response until.

 

             e.  Poor response time is usually caused by 

 

                  (A) Process busy.                                 (B) High I/O rates.

                  (C) High paging rates.                           (D) Any of the above.

 

             f.   A parser which is a variant of top-down parsing without backtracking is

 

                  (A) Recursive Descend.                        (B) Operator precedence.

                  (C) LL(1) parser.                                 (D) LALR parser.

 

g. The “blocking factor” of a file is

 

                  (A) The number of blocks accessible to a file.                                                                    

                  (B) The number of blocks allocated to a file.

                  (C) The number of logical records in one physical record.                                                  

                  (D) None of the above.


             h.  Which of these is a component of a process precedence sequence?

 

(A)  Process name.                                (B) Sequence operator ‘;’

                  (C) Concurrency operator ‘,’                (D) All of the above.

 

             i.   Which amongst the following is valid syntax for the Fork and Join Primitive?

 

       (A) Fork <label>;

                                                                              Join < var>;                                                          

       (B) Fork <label>;

                                                                              Join < label>;

                                                                              (C) Fork <var>;

                                                                              Join < var>;                                                          

(D) Fork <var>;

                                                                              Join < label>;

 

             j.   RRAG (Resource Request and Allocation Graph) consists of 

 

                  (A) Request nodes and Allocation nodes.

                  (B) Process nodes and Resource nodes.                                                                                                                                                                                                                                                                                                                                                                                                                 (B) compile-time

                  (C) Request nodes and Process nodes.

                  (D) Request nodes and Release nodes.

 

 

Answer any FIVE Questions out of EIGHT Questions.

Each question carries 16 marks.

 

 

  Q.2     a.   What is a language processor? Name and explain the language processing

                   activities.                                                                                                                        (8)

                  

             b.   Differentiate between the following data structures:

(i)  Linear and Nonlinear.

                   (ii) Search and Allocation data structure.                                                                           (8)

 

  Q.3     a.   What is “parsing”?  Explain in brief the two approaches of parsing. Highlight the

                   problems that can arise due to backtracking.                                                                     (6)

            

             b.   How and where are macros defined in a program? Explain in brief the various components of a macro definition.                                                                                                                         (6)

 

             c.   With the help of diagram, outline the steps of program execution.                                      (4)

 

  Q.4     a.   What are assembler directives? Explain the function of following assembler directives:

                   i)   START

                   ii)  ORIGIN

                   iii) EQU

                   iv)  END                                                                                                                          (8)

       

             b.   With the help of examples, explain analytical and synthetic operators in assembly language of Intel 8088.                                                                (8)

 

  Q.5     a.   What do you understand by optimizing transformations?  Briefly explain the commonly used optimizing transformations in compilers.                (8)

 

             b.   Why are interpreters a popular choice for commands to an operating system or an editor? How does an interpreter differ from a compiler?        (8)                                                                                    

 

  Q.6     a.   Define the following terms:

 

                   (i)   Throughput                                    (ii)  Response time

                   (iii) System call                                    (iv) Race condition                                                (4)

 

             b.   Given memory partitions of 500 K, 200 K, 300 K, and 600 K (in order), How would each of the First-fit, Best-fit, and Worst-fit algorithms place processes of 212 K,   417 K, 112 K, and 426 K (in order)? Which algorithm makes the most efficient use of memory?                                                                         (6)

 

             c.   Define a process. Identify and explain the fundamental states of transitions for a process.                 (6)

       

  Q.7     a.   List out the tasks to be performed in process scheduling. Name and explain the components of process scheduling component.                         (8)

 

             b.   Consider the following system snapshot using the data structures in the Banker's algorithm, with resources A, B, C, and D, and processes P0 to P4:

 

                                      Max                         Allocation       Need    

                                      A B C D                  A B C D         A B C D                 

                   P0              6 0 1 2                     4 0 0 1

                   P1              1 7 5 0                     1 1 0 0

                   P2              2 3 5 6                     1 2 5 4

                   P3              1 6 5 3                     0 6 3 3

                   P4              1 6 5 6                     0 2 1 2

                                                                                                                        Available

                                                                                                                        A B C D                                                                                                                                                        

                                                                                                                        3 2 1 1

 

                   Using Banker's algorithm answer the following questions.

 

                   (i)  How many resources of type A, B, C, and D are there?                                              (1)        

                   (ii) What are the contents of the Need matrix?                                                                  (3)

                   (iii) If a request from process P4 arrives for additional resources of (1,2,0,0), can the Banker's algorithm grant the request immediately? Show the new system state and other criteria.                     (4)

            

  Q.8     a.   Discuss the “Dining Philosopher’s” problem. Outline a solution for this problem.      (8)

 

             b.   Explain, in detail, the steps taken by the file system when a program executes the call open (<filename> …);                                                                                                                                       (8)

            

  Q.9     a.   Consider the following page reference and reference time strings for a program:

                   Page reference string: 5,4,3,2,1,4,3,5,4,3,2,1,5 ……

                   Reference time string: t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, ….

                   Show how pages will be allocated using the FIFO page replacement policy. Also calculate the total number of page faults when allocated page blocks are 3 and 4 respectively.                                                (8)

 

             b.   Discuss the concept of Memory compaction v/s Garbage collection.                                  (8)