27
Model Question Paper Subject Code: BC0056 Subject Name: UNIX O.S. Credits: 4 Marks: 140 Part A (One mark questions) 1. Which of the following statement best explain the process? A. It is a Program. B. It is a program in execution. C. It is a system. D. it is a program that uses system calls. 2. Which is not a valid computer system component. A. The hardware B. The software C. The operating system D. The applications 3. Who co-created the UNIX operating system in 1969 with Dennis Ritchie? A. Bjarne Stroustrup B. Steve Wozniak C. Ken Thompson

BC0056 Model Question Paper UNIX O.S

Embed Size (px)

DESCRIPTION

BC0056 Model Question Paper UNIX O.S

Citation preview

Page 1: BC0056 Model Question Paper UNIX O.S

Model Question Paper

Subject Code: BC0056

Subject Name: UNIX O.S.

Credits: 4 Marks: 140

Part A (One mark questions)

1. Which of the following statement best explain the process?

A. It is a Program.

B. It is a program in execution.

C. It is a system.

D. it is a program that uses system calls.

2. Which is not a valid computer system component.

A. The hardware

B. The software

C. The operating system

D. The applications

3. Who co-created the UNIX operating system in 1969 with Dennis Ritchie?

A. Bjarne Stroustrup

B. Steve Wozniak

C. Ken Thompson

Page 2: BC0056 Model Question Paper UNIX O.S

D. Niklaus Wirth

4. ……………provides the essential services that make up the heart of UNIX systems; it

allocates memory, keeps track of the physical location of files etc.

A. The Hardware

B. The kernel

C. UNIX shell

D. UNIX compiler

5. Which field Inode doesn’t consist

A. File Mode

B. File access permission

C. File name

D. File size

6. Kernal involves

A. To manage computer memory

B. To maintain file system

C. To allocate the resources

D. All the above

7. Which is the process of starting up a computer from a halted or powered-down condition.

A. Bootstrapping

B. Start up process

C. Background Process

Page 3: BC0056 Model Question Paper UNIX O.S

D. Foreground Process

8. To take backup what we can use

A. tar

B. dump

C. cpio

D. All of above

9. Specify the attribute that process doen't include

A. PPID

B. EUID

C.PUID

D. EGID

10. Name the command we can use to change the priority of the process.

A. change Command

B. renice Command

C. ps command

D. All the above

11. Which is not a system call

A. Fork ()

B. Exit ()

C. msgget ()

D. All the above

Page 4: BC0056 Model Question Paper UNIX O.S

12. Which is not a UNIX shell

A. csh

B. bourne

C. korn shell

D. none of the above

13. Which gives the command information that it might need, or specify varying behavior of the

command.

A. Command arguments

B. Command interpreter

C. Command type

D. Command name

14. Name the command that we can use to create a file

A. echo

B. create

C. cat

D. make

15. Name the command to show all the files, even files that are hidden in the current directory.

A. ls

B. ls-a

C. ls-l

D. ls-a-l

Page 5: BC0056 Model Question Paper UNIX O.S

16. Which is a type of file in UNIX file system

A. Ordinary

B. directories

C.Device

D. All the above

17. In Unix directory structure the top-level directory is designated by

A. Root

B. Slash '/ ' Character

C. /bin

D. /etc

18. Which is not a type of permission in UNIX

A. read

B. write

C. execute

D. exit

19. Which command can be used to find a file

A. grep

B. find

C. catch

D. None of the above

Page 6: BC0056 Model Question Paper UNIX O.S

20. Name the operator that shows the preceding item will be matched one or more times.

A. '+'

B. '*'

C. ‘?'

D. ’{N}'

21. Which command provides a much faster way of finding all files whose names match a

particular search string

A. man find

B. Find command

C. Locate command

D. Info find

22. ______is the first process to be created when a UNIX system starts up and usually has a

PID of 1.

A. init process

B. Background process

C. Foreground process

D. Child process

23. Name the command that is used to get Information about all the processes.

Page 7: BC0056 Model Question Paper UNIX O.S

A. bg

B. ls

C.ps

D. None

24. Which special character can be used to background a process.

A.&

B.$

C./

D. %

25. In telnet all data including your username and password is passed in which format over the

network.

A. unencrypted

B. Encrypted

C. Decrypted

D. Coded

26. State the protocol that can be used to serve web pages

A. TCP

B.FTP

C.HTTP

D. SMTP

Page 8: BC0056 Model Question Paper UNIX O.S

27. Which Network routing utilities can be used to check whether a machine is still "alive".

A. traceroute

B. Ping

C. a & b both

D. None of the above

28. State the command that can be used directly to send and receive files

A. scp

B.ftp

C.uuto

D. UUCP

29. Which of the following are the types of vi editor mode

A. command mode

B. input mode

C. Last line mode

D. All the above

30. In command mode to delete the end of the line press-

A.x

B.dw

C.d$

D. d4w

Page 9: BC0056 Model Question Paper UNIX O.S

31. ___editor/s can be used for more complex jobs that require reference to more than one file

simultaneously

A. emacs

B, vi

C. a & b both

D. None of the above

32. Which command will cancel any emacs command in progress.

A. C-x C-f

B. C-g

C. C-x C-s

D. C-x C-k

33. Choose a correct command that allows a UNIX system to shut down gracefully and

securely.

A. /sbin/shutdown

B. /bin/shutdown

C. /shutdown

D. /sbin/bin/shutdown

34. useradd, adds the new user information to the ___________ file.

A. /etc

B. /usr/bin

C. /etc/passwd

D. /etc/user

Page 10: BC0056 Model Question Paper UNIX O.S

35. Which command creates a new user group and adds the new information to /etc/group.

A. groups

B. groupadd

C. usermod

D. grpadd

36. Which command is helpful to find out which groups a user belongs to.

A. groupadd

B. othergroups

C. groups

D. None of the above

37. Find the wrong statement about shell script

A. Needs no compilation

B. enhances portability

C. is not good in arithmetic operations.

D. is ideal for manipulating a file, character by character.

38. The number of the error in the following shell script is

echo How are you ?

Read $answer

A. 0

B. 1

C. 2

D. 3

Page 11: BC0056 Model Question Paper UNIX O.S

39. Which of the following metacharacters will be recognized by the shell, even if it comes within

double quotes?

A. $

B. *

C.?

D. None of these

40. Which of the following program/s is/are not interactive?

A. sh

B. date

C. passwd

D. None of these

Page 12: BC0056 Model Question Paper UNIX O.S

Part B (Two mark questions)

41. Pick the Incorrect statement/s

1. Shell is a command interpreter.

2. Shell is the interface between the user and the kernel.

3. system can't work without the shell.

A. Only 1

B. Only 2

C. Only 3

D. 1 & 2 both

42 . Which command can be used to count the lines, words, and characters in a file.

A. count

B. WordCount

C. wc

D. cc

43. Users name and passwords are stored in _____ file

A. /etc/passwd

B. /etc/password

C. /etc/pwd

D. None of the above

44. Creation of semaphore set is done by

A. semget()

B. shmget()

C. semctl()

Page 13: BC0056 Model Question Paper UNIX O.S

D. semop()

45. Specify the system call that is used to communicate with the process.

A. msgrcv()

B. msgget()

C. pipe()

D. mknod()

46.State whether the following statements are true or false

1. Control+D is the "eof" control character.

2. A pipe is a means of taking the output of one command and redirecting it as the input of

another command.

A.1-T , 2-T

B. 1-T , 2-F

C. 1-F , 2-F

D. 1-F , 2-T

47. State whether the following statements are true or false.

1. Start allows you to temporarily pause what is happening on your screen.

2. Stop allows you to resume activity following a stop.

A.1-T , 2-T

B. 1-T , 2-F

C. 1-F , 2-F

D. 1-F , 2-T

48. Name the command to create a new directory

A. mkdir

Page 14: BC0056 Model Question Paper UNIX O.S

B. cat

C. rmdir

D. cdir

49.

1. '$' matches any single character in that position in the filename.

2. '*' matches zero or more characters in the filename.

A.1-T , 2-T

B. 1-T , 2-F

C. 1-F , 2-F

D. 1-F, 2-T

50. Which command can be used to find text in files

A.find

B.grep

C.sed

D.awk

51. Name the command that can remove the duplicate adjacent lines from a file

A. cut Command

B. uniq Command

C. cat command

D. tar command

52. To run sleep in the background ______

Page 15: BC0056 Model Question Paper UNIX O.S

A. sleep

B. sleep 10

C. sleep &

D. None of the above

53. State the command that can be used to list the suspended and background processes.

A. ps

B. jobs

C. bg

D. fg

54.State whether the following statements are true or false-

1. A sophisticated interactive chat client finger can be used between remote machines.

2. mail command can be used to sends a message to a specified user.

A.1-T , 2-T

B. 1-T , 2-F

C. 1-F , 2-F

D. 1-F, 2-T

Page 16: BC0056 Model Question Paper UNIX O.S

55. State whether the following statements are true or false-

1. The ping utility is useful for checking round-trip response time between machines

2. traceroute particularly useful in tracking down the location of network problems.

A.1-T , 2-T

B. 1-T , 2-F

C. 1-F , 2-F

D. 1-F, 2-T

56. To search and replace all occurrences of pattern1 with pattern2 type

A.: s/pattern1/pattern2/g.

B.:%s/pattern1/pattern2

C.:%s/pattern1/pattern2/g.

D. None of the above

57. The schedule and corresponding commands are stored in ___________ file,for the jobs that can run regularly according to some schedule. A. /etc/crontab.

B. cron

C. crond

D. None of the above

Page 17: BC0056 Model Question Paper UNIX O.S

58. To repair a mounted filesystem manually you have to run

A. fsck

B. fsck filesys

C. /fsck filesys

D. None of the above

59. State the command that can be used to rescan the command line. A. case command

B. which

C. until command

D. eval command

60. Which of the following shell command displays the content of each of the command line

arguments,one by one?

A. cat $*

B. cat '$*'

C. cat "$*"

D. cat "*$"

Page 18: BC0056 Model Question Paper UNIX O.S

Part C (Four mark questions)

61. Match the following

Set–I

1. grep Command

2. wc Command

3.UNIX Files

4. Shell

Set–II

a. case sensative

b. Search data

c. Count the words

d. Command interpreter

A. 1–a, 2–c, 3–b, 4–d

B. 1–b, 2–c, 3–a, 4–d

C. 1–b, 2–a, 3–d, 4–c

D. 1–c, 2–b, 3–d, 4–c

62. Match the following

Set–I

1. To create a file

2. To file system checking

3. To host the boot program and kernal

4. file system used by CD-ROMs

Page 19: BC0056 Model Question Paper UNIX O.S

Set–II

a. bfs

b. fsck

c. mkfs

d. hsfs

e. mount

A. 1–a, 2–c, 3–b, 4–d

B. 1–b, 2–c, 3–a, 4–d

C. 1–b, 2–a, 3–d, 4–c

D. 1–c, 2–b, 3–a, 4–d

63. Select True (T) or False(F)

1. ps command is used to view the processes.

2. Those users who are sleeping on an event get higher priority than those jobs that are purely

CPU driven.

3. msgrcv() is used to write the messages onto a queue.

4. Semaphore is used for process synchronization.

A. 1–F, 2–T, 3–T, 4–F

B. 1–T, 2–T, 3–F, 4–T

C. 1–F, 2–F, 3–T, 4–T D. 1–F, 2–F, 3–T, 4–F

64. Select True(T) or False(F)

1. Press enter key twice to get to a new login: prompt.

2. UNIX commands use a special type of argument called an option.

3. Large UNIX systems allow one login at a time

Page 20: BC0056 Model Question Paper UNIX O.S

4. The eof control character is used to signal the end of input.

A. 1–F, 2–T, 3–T, 4–F

B. 1–T, 2–T, 3–F, 4–T

C. 1–F, 2–F, 3–T, 4–T

D. 1–F, 2–F, 3–T, 4–F

65. Fill in the blanks:

1. _____is a pointer to another file

2._____ displays the full absolute path of the current location in the filesystem.

3.___ can be used to delete directories.

4.____can be used to change the group

A. 1-rm 2- pwd 3- Link 4- chgrp

B. 1- chgrp 2- Link 3- pwd 4- rm

C. 1- chgrp 2- Link 3- rm 4- pwd

D. 1- Link 2- pwd 3- rm 4- chgrp

66. Match the following

Set–I

1. cut Command

2. tar Command

3.which command

Page 21: BC0056 Model Question Paper UNIX O.S

4. cpio

Set–II

a. To find the programs stored on the disk

b. pick up the given number of characters

c. To take backup

d. creating and reading archives

A. 1–a, 2–c, 3–b, 4–d

B. 1–b, 2–c, 3–a, 4–d

C. 1–b, 2–a, 3–d, 4–c

D. 1–c, 2–b, 3–d, 4–c

67. Match the following

Set–I

1. suspend the job running in the foreground

2. kill the job running in the foreground

3 .terminate or signal a process

4. combining system utilities

Set–II

a. Pipe

b. Kill

c. ^Z

d. ^C

A. 1–a, 2–c, 3–b, 4–d

B. 1–b, 2–c, 3–a, 4–d

Page 22: BC0056 Model Question Paper UNIX O.S

C. 1–b, 2–a, 3–d, 4–c

D. 1–c, 2–d, 3–b, 4–a

68. Fill in the blanks:

1. ________ provides a way to browse the web on a text-only terminal.

2. _______is a non-interactive URL, provides a way to retrieve files from the web.

3.____ is a secure way of transferring files between computers

4. ____ show the list of users.

A. 1- lynx 2- wget 3- scp 4- finger

B. 1- finger 2- wget 3- scp 4- lynx

C. 1- scp 2- finger 3- lynx 4- wget

D. 1- finger 2- scp 3- wget 4- lynx

69. Select True (T) or False (F)

1. In input mode, characters you type are inserted or overwrite existing text.

2. To join two lines together. Press k

3. To start editing another file, type :e filename and press enter.

4. In the insert mode to delete a word press dd.

A. 1–F, 2–T, 3–T, 4–F

B. 1–T, 2–T, 3–F, 4–T

C. 1–T, 2–F, 3–T, 4–F

D. 1–F, 2–F, 3–T, 4–F

70. Fill in the blanks:

1. ______which forces the state of the file system to be brought up to date.

Page 23: BC0056 Model Question Paper UNIX O.S

2. _______ is a utility for adding new users to a UNIX system.

3. To modify the group permissions of an existing user, use _________.

4. __________ is a daemon that executes commands that need to be run regularly according to

some schedule.

A. 1- useradd 2- Sync 3- usermod 4- crond

B. 1- usermod 2- useradd 3- Sync 4- crond

C. 1- Sync 2- useradd 3- usermod 4- crond

D. 1- crond 2- useradd 3- usermod 4- Sync

71. Select True (T) or False (F)

1. To use the wildcard characters as arguments to the shell, they are enclosed using single or

double quotes.

2. Shell procedures can use the trap command to disable a signal or redefine its action.

3. ampersand( &) causes the shell to wait till the previous command has finished executing.

4. Pipes are a means of interconnecting commands together.

A. 1–F, 2–T, 3–T, 4–F

B. 1–T, 2–T, 3–F, 4–T

C. 1–F, 2–F, 3–T, 4–T

D. 1–F, 2–F, 3–T, 4–F

72. Fill in the blanks:

1. Unix allows you to run_________ process at once, some of which are in the

background.

2. At one time __________ no. of processes can actually be executing on a CPU.

3. Multics is an example for ___________.

Page 24: BC0056 Model Question Paper UNIX O.S

4. ---------------------- provides the essential services that make up the heart of UNIX

systems.

A.1- More than One, 2- One, 3- Operating system, 4-Kernel

B. 1- One, 2- More than One, 3- Kernel, 4- Operating system

C. 1- More than One, 2- One, 3- Kernel, 4- Operating system

D. 1- Operating system, 2- One, 3- More than One, 4-Kernel

Page 25: BC0056 Model Question Paper UNIX O.S

73. Select the procedures to add a new user to system

a. Get user’s name and create a login

b. Enter this data into /password file and /etc/group file

c. Create a home directory on different disk

d. Chown and cghrp to give new user ownership of his home directory

e. Set mask for new files that are created

A. a, b, c

B. a, b

C. a, b, d

D. a, b, e

74. Select the points to consider while setting password:

a. Should not be easy for anyone to figure out

b. Don’t write it down or tell anyone

c. Should be lengthy

d. Change password once in a while

e. Should be complicated

A. a, b, e

B. a,b

C. a, b, d

D. b,e

Page 26: BC0056 Model Question Paper UNIX O.S

75. Match the following mapping of permissions onto their corresponding octal digits

Set–I

i. -Wx

ii. r--

iii. r-x

iv. rwx

Set–II

a. 5

b. 3

c. 4

d. 7

A. i–b, ii–d, iii–a, iv–c

B. i–d, ii–c, iii–a, iv–b

C. i–d, ii–b, iii–a, iv–c

D. i–b, ii–c, iii–a, iv–d

Page 27: BC0056 Model Question Paper UNIX O.S

Answer Keys

Part - A Part - B Part - C

Q. No. Ans. Key Q. No. Ans. Key Q. No. Ans. Key Q. No. Ans. Key

1 B 21 C 41 C 61 B

2 B 22 A 42 C 62 D

3 C 23 C 43 A 63 B

4 B 24 A 44 A 64 B

5 C 25 A 45 C 65 D

6 D 26 C 46 A 66 B

7 A 27 B 47 C 67 D

8 D 28 D 48 A 68 A

9 C 29 D 49 D 69 C

10 B 30 C 50 B 70 C

11 D 31 A 51 B 71 B

12 D 32 B 52 C 72 A

13 A 33 A 53 B 73 C

14 C 34 C 54 C 74 C

15 B 35 B 55 A 75 D

16 D 36 C 56 C

17 B 37 D 57 A

18 D 38 C 58 B

19 B 39 A 59 D

20 A 40 B 60 A