unix system programming jan 2014

1
USN " "Time: 3 hrs. " """"""' :i I' I a.' b. 06cs62 ,tt,t Max. Marks:100 ,, (06 Marks) 2 Marks) Marks) ? (07 Marks) (07 Marks) (06 Marks) Sixth Semester B.E. Degree Examination, Dec.2013 lJan.20l4 Unix System Programming 6 , "'".. t."t', , 8 d) o o L a 0) () Eq co- 69 -.o uo ll coo .= c.l Y(J o< FO o> o2 gs oc) (n-o 50i .9(! -o 6r -? c.r or= a. 6, o_, a= to a lr= !o .= >,h co0 o= o, ;i tr> o- U< -N () o Z P o Note: Answer FIVEfull questions, selecting at lesst TWO questions from each part. PART _ A Eyplain the major difference between ANSI C and K and R C? (04 Marks) ili t.pnd explain all the POSX.1 defined constants for limits checking at compile time and Rufltirne. :,, ,- (08 Marks) c. Write a,,C/C++ program to print the POSIX-defined configuration options supported on any given systefh. (08 Marks) 2 a. With a neat diagram explain the Unix kernel support for files. (08 Marks) b. What are inodes in Unix? What are its significances? Explain'with examples. (06 Marks) c. Describe Hard links and symbolic links in Unix. Differentiato between them with examples. 3 a. Explain the following general file APIs: (i) fcnt( ) tii) lseek( ) , (iii):stat( ) b. Explain the device file APIs and FIFO file APls with examples 4 a. With a neat diagram, describe how a C-program is started and . il l1r,, b. c. With a neat sketch, explain the memory layoul of a C-program. Write aCIC++ program to illustrate the use ofseljmp( ) and longjmp( ) functions? ' .:.. PART _ B 5a,WriteaClC++progrilto...uffirocess?Alsoexplainthesimilaritiesand dissimilarities betweer the parent and child process? (07 Marks) b. Explain in detail the family of exec functions. (07 Marks) c. What is process accounting? Write aClC++ program to generate iiccounting data. a. b. a. What are' signals? Write a CIC++ program to catch, ignore and accep[ the default actions of the si$nal? , ,,:: (06 Marks) b. V/,,,hat is a signal mask of a process? Write a CIC++ program to check whether the SIGINT , signal is present in a signal mask and adds if it is not there? (06 Marks) " c, Describe the Daemon characteristics and coding rules for the Daemon process? AlSo write a C/C++ program to initialize the daemon process. (08 Marks) What are pipes? Write a CIC++ program to send data from parent to child over a pipe? , (10 Mark$) :: What are FIFOs? With a neat diagram, explain the client server communicating FIFOs. : ,,, (10 Marks) Explain the socket system calls for both in the comection-oriented and connectionless protocols with neat diagrams for both the cases. (10 Marks) Write short notes on the following : (i) Terminal login (ii) Job control (iii) wait( ) and waitpid( ) APIs (iv) Resource limit functions/APls (10 Marks) *r,<16{<* fot :E /tr /3i -,'*se For More Question Papers Visit - www.pediawikiblog.com For More Question Papers Visit - www.pediawikiblog.com www.pediawikiblog.com

Upload: prasad-c-m

Post on 14-May-2017

225 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Unix System Programming Jan 2014

USN

" "Time: 3 hrs.

" """"""'

:i I'

I a.'b.

06cs62

,tt,t

Max. Marks:100 ,,

(06 Marks)

2 Marks)Marks)

?(07 Marks)(07 Marks)

(06 Marks)

Sixth Semester B.E. Degree Examination, Dec.2013 lJan.20l4Unix System Programming

6

, "'"..

t."t', ,

8

d)ooLa

0)

()

Eqco-

69-.ouo ll

coo.= c.l

Y(Jo<FO

o>o2

gsoc)(n-o

50i.9(!-o6r

-? c.r

or=

a. 6,

o_,

a=toa lr=

!o .=>,hco0o=o, ;itr>o-U<-N()oZ

Po

Note: Answer FIVEfull questions, selectingat lesst TWO questions from each part.

PART _ AEyplain the major difference between ANSI C and K and R C? (04 Marks)

ili t.pnd explain all the POSX.1 defined constants for limits checking at compile time and

Rufltirne. :,, ,- (08 Marks)

c. Write a,,C/C++ program to print the POSIX-defined configuration options supported on anygiven systefh. (08 Marks)

2 a. With a neat diagram explain the Unix kernel support for files. (08 Marks)b. What are inodes in Unix? What are its significances? Explain'with examples. (06 Marks)c. Describe Hard links and symbolic links in Unix. Differentiato between them with examples.

3 a. Explain the following general file APIs:(i) fcnt( ) tii) lseek( ) , (iii):stat( )

b. Explain the device file APIs and FIFO file APls with examples

4 a. With a neat diagram, describe how a C-program is started and.

il l1r,,

b.

c.

With a neat sketch, explain the memory layoul of a C-program.Write aCIC++ program to illustrate the use ofseljmp( ) and longjmp( ) functions?

' .:.. PART _ B5a,WriteaClC++progrilto...uffirocess?Alsoexplainthesimilaritiesand

dissimilarities betweer the parent and child process? (07 Marks)b. Explain in detail the family of exec functions. (07 Marks)c. What is process accounting? Write aClC++ program to generate iiccounting data.

a.

b.

a. What are' signals? Write a CIC++ program to catch, ignore and accep[ the default actions ofthe si$nal? , ,,:: (06 Marks)

b. V/,,,hat is a signal mask of a process? Write a CIC++ program to check whether the SIGINT, signal is present in a signal mask and adds if it is not there? (06 Marks)

" c, Describe the Daemon characteristics and coding rules for the Daemon process? AlSo write aC/C++ program to initialize the daemon process. (08 Marks)

What are pipes? Write a CIC++ program to send data from parent to child over a pipe? ,

(10 Mark$) ::

What are FIFOs? With a neat diagram, explain the client server communicating FIFOs. : ,,,

(10 Marks)

Explain the socket system calls for both in the comection-oriented and connectionlessprotocols with neat diagrams for both the cases. (10 Marks)Write short notes on the following :

(i) Terminal login (ii) Job control(iii) wait( ) and waitpid( ) APIs (iv) Resource limit functions/APls (10 Marks)

*r,<16{<*

fot :E/tr/3i -,'*se

For More Question Papers Visit - www.pediawikiblog.com

For More Question Papers Visit - www.pediawikiblog.com

www.pediawikiblog.com