Trending ▼   ResFinder  

Pune University - Sem - II : Unix Internals, April 2010

4 pages, 30 questions, 0 questions with responses, 0 total responses,    0    0
pune_sci
  
+Fave Message
 Home > pune_sci >

Instantly get Model Answers to questions on this ResPaper. Try now!
NEW ResPaper Exclusive!

Formatting page ...

Total No. of Questions :5] [Total No. of Pages : 4 P1062 [3733]-202 M.Sc. - I COMPUTER SCIENCE CS - 202 : Unix Internals (2005 Pattern (Old) & 2008 Pattern (New)) (Sem. - II) Time :3Hours] [Max. Marks : 80 Instructions to the candidates: 1) All questions are compulsory. 2) All questions carry equal marks. 3) Neat diagrams must be drawn wherever necessary. 4) Figures to the right indicate full marks. 5) Assume suitable data, if necessary. Q1) Attempt all of the following : [ 8 2 = 16] a) What is callout table? What is its usage? b) What is inode reference count? What do you mean by inode reference count = 0 and inode reference count > 0? c) Define context of a process. d) Which system calls can be used in following situations? Give and explain its syntax. i) When a user wants to change a current directory of a process. ii) If a user wants to simulate the usual file system hierarchy and run processes there. e) What is signal? What do you mean by following? Signal (SIGINT, sigcatcher). f) Discuss the cases in which a process can incur protection fault. g) Give any four functions of line discipline. h) Justify. A buffer cannot be on both hash queue and on free list at the same time. P.T.O. Q2) State whether the following statements are true or false. Justify your answer (any four). [ 4 4 = 16] a) b) A process can unlink a file while another process has the file open. A successful exec system call never returns. c) A disk block may belong to more than one inode or to the list of free blocks and an inode. d) Text and data of a process occupy same region of a process. e) A process sleeping and waiting for completion of disk I/O has a higher priority than a process waiting for a free buffer. Q3) Attempt any four of the following : a) [ 4 4 = 16] In algorithm iput for releasing in _core inode, consider. i) reference count = 0 and link _count > 0 ii) reference count = 0 and link _count = 0 What would happen in each case? b) How does wait algorithm respond to the death of child signal? c) Discuss the swap out function of a swapper process. d) What are block and character device switch tables? Which system call is used to create the device file? e) Describe the actions taken by kernel for detaching a region from a process. Q4) Attempt any four of the following : a) What is the output of the following program? What are the contents of file test.txt ? # include < stdio.h > # include < fcntl.h > Main ( ) { int fd1, fd2, fd3 ; fd1 = open ( test.txt , O RDWR | O TRUNC); printf ( fd1 = %.d\n , fd1); write ( fd1, Rose is , 7); [3733]-202 2 [ 4 4 = 16] fd2 = dup (fd1); Printf ( fd2 = %d \n , fd2); Write (fd2, beautiful ,10) ; Close (0); fd3 = dup (fd1) ; Printf ( fd3 = %d\n , fd3) ; Write ( 0, flower , 7) ; dup2 (3,2) ; write (2, !\n ), 2) ; } b) Write a program in C in which parent process will write into unnamed pipe and child will read from it. c) What does the following program demonstrate? Explain its working. # include < signal.h > main (int argc, char * argv [ ] ) ; { Char buf [256] ; if (argc ! = 1) signal (SIGCLD, SIGIGN) While ( read (0, buf, 256)) if ( fork ( ) = = 0) { exit (0) ; } } d) Write a program in C to print the inode number of every file of a directory.(Accept directory name from user.) e) Explain the behaviour and output of the following program. Main ( ) { int i ; char * cp ; extern char *sbrk ( ); cp = sbrk (10) ; [3733]-202 3 for ( i = 0 ; i < 10 ; i + + ) *cp ++ = a + i ; sbrk ( 10 ) ; cp = sbrk ( 10 ) ; for ( i = 0; i < 10 ; i ++) Printf ( char % d = % c \n , i, * cp ++) ; } Q5) Attempt any four of the following : a) Explain fork swap and expansion swap. b) [ 4 4 = 16] Answer in brief : i) ii) A delayed write is different from asynchronous write. Comment. Convert logical byte offset 1,25,000 into actual physical byte offset using bmap algorithm. Assume block size 1024 bytes. c) List and explain the syntax of time related system calls. d) Which are the actions taken by kernel while unmounting a file system? e) Consider block size = 512 bytes. Determine the offset, no. of bytes read in each of the following read statement. Consider the statements are executed in the same process. read (fd, buffer, 250) ; read (fd, buffer, 400) ; read (fd, buffer, 700) ; #### [3733]-202 4

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

Additional Info : M.Sc. COMPUTER SCIENCE, CS - 202: Unix Internals ( 2008 Pattern (New) & 2005 Pattern (Old) Course)) (Semister - II), Pune University
Tags : msc computer science pune university, msc computer science pune exam papers, Unix Internals, pune university exam papers, university of pune question papers, pune university science, pune university courses, bsc pune university, msc pune university, pune university solved question papers, pune university model question paper, pune university paper pattern, pune university syllabus, old question papers pune university  

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

pune_sci chat