Top 550+ Solved Operating System Architecture MCQ Questions Answer

From 181 to 195 of 627

Q. Switch table is used by

a. device special file

b. directory file

c. fifo

d. link file.

  • a. device special file

Q. What is the use of fcntl function?

a. locking a file

b. reading the file descriptor flag

c. changing the file status flag

d. all the above

  • d. all the above

Q. Which function can be used instead of the dup2 to duplicate the file descriptor?

a. read()

b. open()

c. stat()

d. fcntl()

  • d. fcntl()

Q. printf() uses which system call

a. open

b. read

c. write

d. close

  • c. write

Q. read() system call on success returns

a. 0

b. -1

c. c)

d. none

  • c. c)

Q. Which system call is used to create a hard link?

a. hardlink

b. link

c. symlink

d. ln

  • b. link

Q. namei() is

a. ansi c library function

b. c library function

c. system call

d. kernel routine

  • d. kernel routine

Q. dup2(1,0)

a. closes the stdout and copies the stdin descriptor to stdout

b. closes the stdin and copies the stdout descriptor to stdin

c. will produce compilation error

d. none of the above

  • b. closes the stdin and copies the stdout descriptor to stdin

Q. ode snippets str1=”45678\n” str2=”123\n”f1 = fopen(file1,RDWR,RWX) f2 = fopen(file1,RDWR,RWX) write(f1,str1,len_str1) write(f2,str2,len_str2)o/p:

a. 12378

b. 123(newline)8(new line)

c. 123(newline)78(ne wline)

d. 45678(newline)1 23(newline)

  • b. 123(newline)8(new line)

Q. what is file system

a. seqenceof bytes

b. sequence of bits

c. sequence of kilo bytes

d. sequence of megabytes

  • a. seqenceof bytes
Subscribe Now

Get All Updates & News