NP

Published on January 2017 | Categories: Documents | Downloads: 87 | Comments: 0 | Views: 878
of 6
Download PDF   Embed   Report

Comments

Content

1 Marks: 1 Which statement is not true? Choose one answer. a. Server waits for the request from the client b. Client-server model provide a way to communicate( interconnect) program that are distributed across distinct locations c. Server is a process not a machine. d. Server must needs to be aware of the client sending the request Question 2 Marks: 1 The execlp() system function Choose one answer. a. Creates a new process and runs a program b. None of these c. Runs a program in the calling process d. Search for the calling process and attach a child process to it and then runs a program Question 3 Marks: 1 How many new process will be created if following program executes main() { fork(); fork(); fork(); fork(); printf("\nEC-1"); } Choose one answer. a. 4 b. 16 c. 15 d. 8 e. 9 Question 4 Marks: 1 Which one is the kernel persistence type of IPC? Choose one answer. a. Message Queue b. PIPE c. TCP and UDP SOCKET

d. FIFO Question 5 Marks: 1 Which of the following is FALSE? Choose one answer. a. Generally UDP servers are typically concurrent, while TCP servers are typically iterative. b. Child process doesn't inherits file locks set by parent c. Process ID does not change after an exec() call d. A DNS queries typically follow both the recursive and iterative resolution pattern. Question 6 Marks: 1 Suppose we have a set of descriptors {1,2,3,4}. Which of the following can not be instructed to the kernel by using select()? Choose one answer. a. return only when 2 seconds are passed b. return only when 3 and 4 are ready for writing c. return only when any of the descriptor in the set is no longer exists in system d. return only when 1 has an pending exception Question 7 Marks: 1 If your process receives the signal SIGSTOP, what you can do? Choose one answer. a. Cast it to SIGURG, so that a childs sigaction() can be invoked if necessary. b. Catch it by providing a signal handler and perform some appropriate action. c. Ignore the signal. d. None of these. Question 8 Marks: 1 If two or more processes are writing to same pipe or FIFO at the same time then which one of the following correctly explains the behaviour of writes? Choose one answer. a. intermixing of data from both the processes b. depends upon PIPE_BUF c. depends on O_NONBLOCK flag d. first process data followed by second process or vice-versa Question 9

Marks: 1 If you are writing a server program which will be run on a multi-homed machine then to which IP address and Port number do you prefer to bind your server? Choose one answer. a. Wildcard IP address and well-known Port number b. well-known IP address and ephemeral Port number c. Wildcard IP address and ephemeral Port number d. well-known IP address and well-known Port number Question 10 Marks: 1 Which of the following is not a feature we can add, to make the UDP based client/server reliable? Choose one answer. a. Sequence number b. Handshake c. checksum d. Timeout and retransmission Question 11 Marks: 1 If we have a set of descriptors as {1,2,4,5} and we need to check descriptors 1,5, then what would be the value of maxfdp1 argument in select()? Choose one answer. a. 4 b. 2 c. 6 d. 3 Question 12 Marks: 1 No IPC form/type supports file system persistency.Which one of the following explains the reasons for this? I. Processes do not survive system reboot. II. File system persistency would degrades the performance. Choose one answer. a. None of these b. only I c. only II d. both I & II

Question 13 Marks: 1 State which is not true Choose one answer. a. In the case of an abnormal termination, the process generates a termination status to indicate the reason for the abnormal termination. b. In the case of an abnormal termination, the kernel generates a termination status to indicate the reason for the abnormal termination. c. The parent of the process can obtain the termination status using wait or the waitpid function. d. Child passes an exit status to its parent as the argument to exit functions (exit, and _exit). Question 14 Marks: 1 Consider a System V message queue having three messages M1, M2 and M3 with their type values as 35, 10, 2 respectively. If three processes P1, P2 and P3 calls msgrcv() with type argument set to 0, -5, 12 respectively, then which process will receive which message? Choose one answer. a. P1 -> M1, P2 -> M2, P3 -> M3 b. P1 -> M1, P2 -> M3, P3 -> error/blocked c. P1 -> error/blocked, P2 -> M3, P3 -> M2 d. P1 -> M2, P2 -> M1, P3 -> M3 Question 15 Marks: 1 When a server is execed by the process that calls accept, the only way the server can obtain the identity of the client is to use Choose one answer. a. gethostbyname() b. getsockname() c. getpeername() d. getservbyname() e. all of these Question 16 Marks: 1 Which statement is TRUE Choose one answer. a. Connect will not return an error when a TCP client calls connect, if at the destination TCP server is running. b. When a UDP client calls connect() and if at the destination there is an UDP server running,connect() will not returns an error.

c. all of these d. When a UDP client calls connect() and if at the destination there is no UDP server running,connect() will not returns an error. Question 17 Marks: 1 When socket address structure is passed to a socket functions, a pointer to structure and length of structure is also passed as an argument. Does assertion below follow from reason? Assertion : A pointer to length of structure is passed instead of length, always. Reason : It supports value-result argument i.e. value pointed by the pointer is used both as value & result. Choose one answer. a. Both are correct and Reason justifies Assertion b. Only reason is correct c. Both are correct but Reason does not explain assertion d. Only assertion is correct Question 18 Marks: 1 In DNS system which resource record is responsible for mapping IP address to a domain name? Choose one answer. a. PTR record b. NS record c. A record d. AAA record e. MX record Question 19 Marks: 1 Which is not true about writing to pipe/fifo when pipe/fifo is open for reading Choose one answer. a. If there is no room in the pipe for the requested data (< PIPE_BUF), by default it blocks. b. None of these c. If data size is less than or equal to PIPE_BUF, the write is atomic d. If O_NONBLOCK option is set, EAGAIN error is returned e. If data is greater then PIPE_BUF and O_NONBLOCK option is set, Atomicity is guaranteed Question 20 Marks: 1 fork() is used to create child process. State which is not true

Choose one answer. a. Child has same PPID b. Child gets its own copy of parent’s data, heap and stack segment c. Child resource utilization set to zero d. Child has unique PID

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close