127
83.5k

620+ Operating System Architecture Solved MCQs

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) .

251.

If one exports a variable

A. variables placed in the environment by a child process are not inherited by the parent process
B. it is passed to all its descendant processes
C. it dies when the shell that created it dies
D. all of these
Answer» D. all of these
252.

Profilers are                            

A. tools that analyze the run time behaviour of a program
B. tools that check a c code for cross file consistency
C. tools that keep track of evolving versions of a file
D. none of the above
Answer» A. tools that analyze the run time behaviour of a program
253.

The shell command :

A. does nothing
B. can be used to cause infinite looping
C. can take arguments but it cannot act on them
D. all of these
Answer» D. all of these
254.

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

A. make
B. yacc
C. sccs
D. dv
Answer» C. sccs
255.

The .(dot) shell command

A. can take command line argument
B. will fork a child shell to execute the named shell script
C. can be used to change the environment of the current shell
D. all of the above
Answer» C. can be used to change the environment of the current shell
256.

m4

A. is a macro processor
B. can he used to preprocess c code
C. can be used to preprocess assembly language program
D. none of the above
Answer» C. can be used to preprocess assembly language program
257.

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

A. date followed by 7
B. date followed by 8
C. date followed by 1
D. an error message
Answer» A. date followed by 7
258.

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

A. the \b\ indicates that it is a special file
B. mt0 indicates that it is a tape drive
C. the \ b\ indicates that data transfer is done in blocks
D. all of these
Answer» D. all of these
259.

cat/dev/tty

A. throws garbage onto the terminal 1
B. just echoes what you type. line by line
C. terminates if one types control at the beginning of a line
D. both (b) & ©
Answer» D. both (b) & ©
260.

The header files used in C programs arc usually found in

A. /bin/include
B. usr/bin/include
C. /dev/ include
D. iusr/include
Answer» D. iusr/include
261.

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

A. proof
B. make
C. lprof
D. sdb
Answer» D. sdb
262.

The difference between a pipe and a regular file is that

A. unlike a regular file, pipe is not a file.
B. the data in a pipe is transient. unlike the contents of a regular file
C. pipes forbid random accessing. while regular files do allow this
D. both (b) and ©
Answer» D. both (b) and ©
263.

Context switch changes the process mode from………

A. user to kernel mode
B. kernel to user mode
C. kernel mode to the kernel process
D. both (a) and (b)
Answer» D. both (a) and (b)
264.

cc command sequentially invokes

A. preprocessor. compiler and link editor
B. compiler and link editor
C. preprocessor, compiler. assembler and link editor
D. compiler, assembler and link editor
Answer» C. preprocessor, compiler. assembler and link editor
265.

The cc command

A. can take more than one argument
B. can act on files with . or . o extension
C. creates . o files by default when more than one argument with .,- extension is present
D. if provided with more than one argument. immediately terminates it the first argument fails to compile successfully
Answer» C. creates . o files by default when more than one argument with .,- extension is present
266.

The mv command changes

A. only the directory entry
B. only the directory entry and i-node
C. only the i-node number
D. none of the above
Answer» A. only the directory entry
267.

Which of the following programs are not interactive?

A. passwd
B. date
C. grep
D. both (b) & ©
Answer» A. passwd
268.

Choose the correct statements.

A. any process has an associated owner id and group id
B. effective id defines who you are for the duration of a process
C. real id defines who you are for the duration of a process
D. both (a) & (b)
Answer» D. both (a) & (b)
269.

No shell script can take input from

A. stdin
B. the output of the previously executed command redirected to it
C. the shell holds the script
D. none of the above
Answer» D. none of the above
270.

The disadvantage of a pipe is that

A. it is a one way communication channel
B. it dies along with the process that created it
C. it can\t he shared by unrelated processes
D. all of these
Answer» D. all of these
271.

The state of signals are

A. preserved across a fork call
B. not preserved across an exec call
C. preserved across an exec call
D. both (a) & (b)
Answer» D. both (a) & (b)
272.

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

A. echo $4
B. echo $$
C. echo $?
D. echo $!
Answer» C. echo $?
273.

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

A. .x
B. ?x
C. both (a) & (b)
D. hidden
Answer» C. both (a) & (b)
274.

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

A. clri
B. sync
C. login
D. init
Answer» D. init
275.

What is ‘ps’ command for?

A. prints the status
B. prints the process status
C. prints the execution status
D. none
Answer» B. prints the process status
276.

Which command is used to terminate the process?

A. wait
B. sleep
C. kill
D. none
Answer» C. kill
277.

Which commaand is use for the copy in unix?

A. copy
B. cp
C. cpy
D. none
Answer» B. cp
278.

What is stand for IPC?

A. inter procedure communication
B. inter process communication
C. inter part compare
D. none
Answer» B. inter process communication
279.

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

A. fork()
B. vfork()
C. both
D. none
Answer» B. vfork()
280.

fork system call…..

A. control the size of memory allocated to a process
B. create a new process
C. overlay image of a program onto the running process
D. finish executing a process
Answer» B. create a new process
281.

exec system call……..

A. create a new process
B. finish executing a process
C. control the size of memory allocated to a process
D. overlay image of a program onto the running process
Answer» D. overlay image of a program onto the running process
282.

wait system call…………

A. finish executing a process
B. control the size of memory allocated to a process
C. synchronize process execution with exit of previously forked process
D. overlay image of a program onto the running process
Answer» C. synchronize process execution with exit of previously forked process
283.

brk system call…………

A. synchronize process execution with exit of previously forked process
B. control the size of memory allocated to a process
C. finish executing a process
D. overlay image of a program onto the running process
Answer» B. control the size of memory allocated to a process
284.

signal system call…………

A. control process response to extraordinary events
B. control the size of memory allocated to a process
C. synchronize process execution with exit of previously forked process
D. overlay image of a program onto the running process
Answer» A. control process response to extraordinary events
285.

Two policies for managing memory are……………

A. swaping and demand paging
B. semaphore and deadlock
C. scheduling and wait
D. none
Answer» A. swaping and demand paging
286.

Schedular module allocate …..

A. processes to cpu
B. cpu to processes
C. processes to kernel
D. none
Answer» B. cpu to processes
287.

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

A. data flow between the kernel and secondary storage devices.
B. data flow between secondary storage devices to kernel
C. data flow of kernel
D. none
Answer» A. data flow between the kernel and secondary storage devices.
288.

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

A. an inode
B. semaphore
C. pipes
D. none
Answer» A. an inode
289.

Every file in unix has …..

A. two inode
B. one inode
C. no inode
D. none
Answer» B. one inode
290.

inode name is also called……

A. file
B. link
C. file
D. file descriptors
Answer» B. link
291.

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

A. used inode
B. unused inode
C. integer number
D. file number
Answer» B. unused inode
292.

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

A. file table and user file descriptor table
B. file system and kernel
C. file and semaphore
D. none
Answer» A. file table and user file descriptor table
293.

Which of the following is not A system calls?

A. chmod
B. open
C. lseek
D. getc
Answer» D. getc
294.

Mounting a file system results in the loading of

A. boot block
B. super block
C. i-node table
D. all of these
Answer» B. super block
295.

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

A. data file
B. binary file
C. text file
D. source file
Answer» B. binary file
296.

An attempt to read from locked file,results in

A. prematured termination
B. a deadlock
C. an indefinite wait
D. none of the above
Answer» D. none of the above
297.

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

A. semaphore
B. critical region
C. locking
D. dedicated mode
Answer» C. locking
298.

Which of the following are character special files?

A. terminal
B. printer
C. modem
D. tape drive
Answer» C. modem
299.

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

A. bss
B. data
C. header
D. symbol
Answer» A. bss
300.

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

A. shadow
B. profile
C. password
D. all of these
Answer» C. password

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.