VTU 6th Sem, USP – Questions Repeated every semester

These are the repeatedly asked questions from first three units in USP (1st , 2nd , and 3rd Unit)

Note – There is no guarantee that these questions will be asked in the examinations and VTU HUB is not responsible for the same.
All the best !!

Unix Systems Programming
Subject Code – 06CS62
Sixth Semester B.E. Degree Examination
[have reffered 4-5 question papers]

———————————————–
———————————————–
1 st U N I T
———————————————–
———————————————–

  • * What do you understand by the term feature test macros? List all the five feature test macros along with their meanings.
    (06 Marks) [July 2009] [June/July 2011]
  • * What do you mean by term feature test macros? List all the test macros along with their meaning.
                                                                                                                                       (06 Marks)    [December 2010]

———————————————–

  • * Write a C++ program to list the actual values of the following system configuration limits on to’ a given unix OS.
    i) Number of clock ticks
    ii) Maximum number of child processes
    iii) Maximum path length
    iv) Maximum number of characters in a file name
    v) Maximum number of open files per process.                                                          (08 Marks) [May/June 2010] [Dec.09/Jan.10]

 

  • * Write a C++ program to list the actual values of the following system configuration limits on a given Unix OS.
    i) Maximum no. of child processes that can be created.
    ii) Maximum no. of files that can be opened simultaneously.
    iii) Maximum no. of message queues that can be accessed.                                         (06 Marks) [July 2009]

 

  • * Write a C++ program to list the actual values of the following system configuration limits on to’ a given unix OS.
    i) Maximum number of files which can be opened simultaneously.
    ii) Maximum number of real time signals.
    iii) Maximum value assignable to a semaphore.                                                          (06 Marks) [December 2010]

 

  • * Write a C++ program to list the actual values of the following system configuration limits on to’ a given unix OS.
    i) Maximum number of child process that can be created.
    ii) Minimum number of files that can be opened simultaneously.
    iii) Number of clock ticks.                                                                                     (06 Marks) [June/July 2011]

————————————————————–

  • * What are the major differences between ANSI “C” and K and R “C”? Explain with examples. (08 Marks) [June/July 2011]
  • * Write the difference between K & R C and ANSI C.                                                          (03 Marks) [December 2010]

 

  • * Bring out the importance of standardizing the Unix operating systems. What aspects of C programming language have been standardized in ANSIC? With suitable examples, bring out the two important differences between K and R C and ANSIC with respect to function prototyping and pointers to functions.                                                                               (08 Marks) [July 2009]

————————————————————–

  • * What is an inode? Why are inode unique only within a file system? How does OS maps inode to its file name?
    (05 Marks) [December 2010]

———————————————–
———————————————–
2 nd U N I T
———————————————–
———————————————–

  • * Discuss the various file types in UNIX or POSIX system.                                             (05 Marks) [December 2010]
  • * Explain the different file types available in UNIX or posix system.                                  (08 Marks) [Dec.09/Jan.10] [May/June 2010]
  • * List and explain the different file types available in unix.                                                (08 Marks) [June/July 2011]

———————————————–

  • * What are the API common characteristics? List any five values of global variables errno along with their meaning whenever API fails.
    (06 Marks) [December 2010] [June/July 2011] [ 5 Marks in June-July 2009]

  • * What is an API? How it is different from C library functions? Why calling an API in more time consuming than calling on user function?
    (06 Marks) [Dec.09/Jan.10]

  • * What are APIs? When do you use them? Why are the APIs more time consuming than the library functions?
                                                                                      (03 Marks) [June-July 2009]

———————————————–

  • * List the difference between hard link and symbolic link.                                                 (04 Marks) [December 2010]
  • * Bring out the differences between hard link and symbolic link.                                        (04 Marks) [May/June 2010]

———————————————–

  • * Explain the unix Kernel support for files, with a neat diagram.                                         (05 Marks) [December 2010]
  • * Describe the UNIX Kernel support for files.                                                                  (06 Marks) [Dec.09/Jan.10] [June/July 2011]

———————————————–

  • * List all the file attributes along with their meaning. Which of these attributes can’t be changed and why?
    List the commands needed to change the following file attributes.
    i) File size; ii) User ID; iii) Last access and modification time; iv) Hard link count.               (05 Marks)

 

  • What is an mode? Why are the modes unique only within a file system? How does OS map the anode to its filename?  Bring out the four important differences between soft and hard links.                                                           (07 Marks) [June-July 2009]

 

  • * Discuss with a neat diagram the different data structures supported by UNIX Kernel for file manipulation.
    (08 Marks) [May/June 2010]

———————————————–
———————————————–
3 rd U N I T
———————————————–
———————————————–

  • * With the help of prototype, explain the following API’s:
    i) creat ii) lseek iii) access iv) link                                                                                (5 Marks) [December 2010]
  • * Explain the following APIs along with their prototype definitions :
    i) Open , ii) Write • iii) Fcntl , iv) Fstat.                                                                        (08 Marks) [May/June 2010]
  • * Explain the following API’s with prototypes :
    i) Open ; ii) Lseek ; iii) Stat ; iv) Read.                                                                          (08 Marks) [June/July 2011]

———————————————–

  • * What is the importance of locking files? What are the mandatory and advisory locks? Why is advisory lock considered safe? What are the draw-backs of advisory lock? Explain.                                                                         (07 Marks) [December 2010]
  • * Explain how fcnti API is used for file and record locking .                                           (08 Marks) [Dec.09/Jan.10]

———————————————–
Programs asked in this unit
———————————————–

  • * Write the code segment in C that records utmost 100 bytes into a variable but from standard input.      (08 Marks) [Dec.09/Jan.10]

 

  • * What are symbolic link file APIs? Write a C/C++ program to emulate the UNIX Ln command.            (08 Marks) [May/June 2010]

 

  • * Write a C++ program to implement following unix commands i) /n ; ii) mv                                       (08 Marks) [June/July 2011]

 

  • * List the structure used to query the file attributes in Unix.
    Write a program in C++ to list the following file attributes of a given regular file passed as command line argument.
    i) File type ii) Hard link count iii) File size iv) File name.                                                                    (08 Marks) [June-July 2009]

 

  • * List the important uses of fend API. Give its prototype description.
    Write a C++ program to check whether the close — on — exec flag is set for a given file. If it is not set, use fcnt to set this flag. Also show the implementation of dupz macro using this API.                                                                   (06 Marks) [June-July 2009]

 

  • * List the structures used to quarry the file attribute in UNIX.
    Write C++ program to list the following file attributes of given regular file passed as command line argument.
    i) File type ii) user ID iii) file name iv) File size.                                                                               (08 Marks) [December 2010]

———————————————–

  • * List and explain the access mode floss and access modifier floss. Also explain how the permission value specified in an ‘open’ call is modified by its calling process `Umask’ value.                                                                                  (04 Marks) [Dec.09/Jan.10]

 

  • * Give the hierarchy structure of the file classes.                                                                              (04 Marks) [May/June 2010]

 

  • * Describe the open API, clearly indicating its prototype declaration, the values the arguments take along with their meaning. Give two instances, when open API can fail. List all the access modifier flags and explain their meanings.           (06 Marks) [June-July 2009]

 

  • * Bring out the differences between hardlink and symbolic link.                                                        (04 Marks) [June/July 2011]

2 Responses

Leave a reply