Quiznetik

Operating System Architecture | Set 3

1. The first set of the three permissions (rw) pertains to the owner of the file, indicating that the owner has

Correct : D. both read and write permissions

2. Which of the following commands is used to save the output of the who command in a file named user.lst, as well as display it?

Correct : A. who | tee user.lst

3. Which of the following shell's wildcards are used to match any number of characters including none?

Correct : D. *

4. Which symbol will be used with grep command to match the pattern pat at the end of a line?

Correct : C. pat$

5. Which command is used to display all the lines with the string 'sales' from the file empl.lst?

Correct : C. grep sales empl.lst

6. Which of the following commands is note the vi Input mode command?

Correct : D. j

7. Which of the following commands is used to remove files?

Correct : C. rm

8. Which command is used with vi editor to save file and remain in the editing mode?

Correct : B. :w

9. Which of the following commands is used to have a two-way communication with any person who is currently logged in?

Correct : C. write

10. Which command is used with vi editor to move the cursor to the left?

Correct : D. h

11. Which command is used to terminate all processes in your own system except the login shell?

Correct : B. kill 0

12. Which command is used to link the files?

Correct : B. in

13. Which of the following signs is used to back up over typing errors in vi?

Correct : B. #

14. Which of are following internal commands is used in mail to forward mail to user in user-list?

Correct : B. m user-list

15. Which of the following commands is used to display the filenames in multiple columns?

Correct : C. ls -x

16. Which of the following features of UNIX may be used for inter process communication?

Correct : D. all of these

17. The command echo welcome > /dev / tty

Correct : D. both (a) and ©

18. dev/null

Correct : D. all of these

19. The permission bits of a file noname. can be set to _rws_ _x_ _x by the command.

Correct : D. none of the above

20. /bin/passwd has the user execution permission set to 's' because

Correct : D. all of these

21. If one doesn't want anyone else to read or write to a file named datfile, except through a program in a file filex , then he may use

Correct : D. both (a) and (b)

22. Writing a C program that accepts input from keyboard, rather than from a file is advantageous because

Correct : C. both (a) and (b)

23. Consider the following command that invokes the executable file a.out, with the following command line arguments a .out God loves you argv( [1][2] )corresponds to the character

Correct : D. d

24. Which of the following string functions can be used to find the last occurrence of a given character in a given string?

Correct : D. none of the above

25. Consider the program main ( ) { printf("He arose a victor from\n"); system ("date") ; printf("the dark domain"); } If a.out is the executable code corresponding to the above source code, then the command a.out > out f

Correct : A. redirects the output of date to file out f

26. The default permission bits of a file when it is created for the first time, is controlled by

Correct : C. umask value

27. Let x.c be a C source code. The command cc x.c > y

Correct : C. serves no purpose

28. A file x is created with the following contents echo today is: date If you type x.then

Correct : D. both (b) and ©

29. Shell script is preferable to other forms of programming because it

Correct : D. all of these

30. Choose the incorrect statements.

Correct : D. shell scripts are compiled

31. Files that store data in the same format as used in program are called

Correct : A. binary files

32. To allow only one user to work with a particular file at a particular time, one has to use

Correct : C. locking

33. Which of the following remarks about realloc are true?

Correct : D. both (b) and ©

34. The differences between malloc( ) and calloc() are:

Correct : D. both (b) and ©

35. The file that stores an integer as a sequence of characters is a

Correct : A. text file

36. If cat x. prints garbage. then x is probably a

Correct : B. binary file

37. Which of the following file names can be found in more than one directoy?

Correct : D. both (a) and (b)

38. /bin

Correct : D. both (b) and ©

39. The main reasons for the success of pipes are

Correct : D. both (a) and (b)

40. Which of the following are not filter programs?

Correct : A. date

41. Redirection in pipes can be achieved by using

Correct : C. tee

42. Choose the correct statements.

Correct : D. all of above

43. The command who sort - file1 > file2

Correct : D. none of the above

44. The system identifies a file by its

Correct : D. mode number

45. The system identifies the end of a file by the

Correct : B. file size

46. The command line argument a.out x 'a b' "c d"

Correct : A. is acceptable

47. Which of the following metacharacters will be recognized by the shell. even if it comes within double quotes?

Correct : A. $

48. lint should be used

Correct : D. both (a) and (b)

49. Environment variables can be accessed by

Correct : D. all of these

50. Which of the following are character special files

Correct : D. all of these

51. If one exports a variable

Correct : D. all of these

52. Profilers are

Correct : A. tools that analyze the run time behaviour of a program

53. The shell command :

Correct : D. all of these

54. Which of the following tools can be used to keep track of evolving versions of a file

Correct : C. sccs

55. The .(dot) shell command

Correct : C. can be used to change the environment of the current shell

56. m4

Correct : C. can be used to preprocess assembly language program

57. If 7 terminals are currently logged on. then the command date ; who | wc -l, displays

Correct : A. date followed by 7

58. Choose the correct answers if the command ls -l /dev/mt0 display's brw_rw_ _ _ _ 1 root 3, 0 Apr18 1:05 mt0

Correct : D. all of these

59. cat/dev/tty

Correct : D. both (b) & ©

60. The header files used in C programs arc usually found in

Correct : D. iusr/include

61. A C program should be compiled with -g option (like cc -g x . c) to use

Correct : D. sdb

62. The difference between a pipe and a regular file is that

Correct : D. both (b) and ©

63. Context switch changes the process mode from………

Correct : D. both (a) and (b)

64. cc command sequentially invokes

Correct : C. preprocessor, compiler. assembler and link editor

65. The cc command

Correct : C. creates . o files by default when more than one argument with .,- extension is present

66. The mv command changes

Correct : A. only the directory entry

67. Which of the following programs are not interactive?

Correct : A. passwd

68. Choose the correct statements.

Correct : D. both (a) & (b)

69. No shell script can take input from

Correct : D. none of the above

70. The disadvantage of a pipe is that

Correct : D. all of these

71. The state of signals are

Correct : D. both (a) & (b)

72. Which of the following displays the exit status of the last executed command?

Correct : C. echo $?

73. Which of the following file names cannot be displayed if la ls* is run?

Correct : C. both (a) & (b)

74. Which of the following initiates the sequence of events that ultimately allows a user to login?

Correct : D. init

75. What is ‘ps’ command for?

Correct : B. prints the process status

76. Which command is used to terminate the process?

Correct : C. kill

77. Which commaand is use for the copy in unix?

Correct : B. cp

78. What is stand for IPC?

Correct : B. inter process communication

79. Which one is best in action between fork() and vfork()?

Correct : B. vfork()

80. fork system call…..

Correct : B. create a new process

81. exec system call……..

Correct : D. overlay image of a program onto the running process

82. wait system call…………

Correct : C. synchronize process execution with exit of previously forked process

83. brk system call…………

Correct : B. control the size of memory allocated to a process

84. signal system call…………

Correct : A. control process response to extraordinary events

85. Two policies for managing memory are……………

Correct : A. swaping and demand paging

86. Schedular module allocate …..

Correct : B. cpu to processes

87. The file subsystem accesses file data using a buffering mechanism that regulates ….

Correct : A. data flow between the kernel and secondary storage devices.

88. The internal representation of a file is given by ……..

Correct : A. an inode

89. Every file in unix has …..

Correct : B. one inode

90. inode name is also called……

Correct : B. link

91. When a process creates a new file, the kernel assigns it an ……...

Correct : B. unused inode

92. With inode, the kernel contains two data structures………….

Correct : A. file table and user file descriptor table

93. Which of the following is not A system calls?

Correct : D. getc

94. Mounting a file system results in the loading of

Correct : B. super block

95. If cat x ,prints garbage ,then x is probably a

Correct : B. binary file

96. An attempt to read from locked file,results in

Correct : D. none of the above

97. To allow only one user to work with a particular file at a particular time ,one has to …..

Correct : C. locking

98. Which of the following are character special files?

Correct : C. modem

99. Which of the following sections of an executable binary file has all uninitialized data items?

Correct : A. bss

100. Which of the following files contains information related to password aging?

Correct : C. password