0

operating systems Online Quiz - 4

Description: operating systems Online Quiz - 4
Number of Questions: 20
Created by:
Tags: operating systems
Attempted 0/20 Correct 0 Score 0

BSD is an acronym for what?

  1. Berkeley Software Distribution

  2. Berkel Software Distro

  3. Berkeley Systems Distribution

  4. Bourne Systems Distribution


Correct Option: A

Which Shell variable indicates search path for commands?

  1. IFS

  2. PATH

  3. SHLVL

  4. TERM


Correct Option: B

What is the process id and group id of the init process?

  1. 1,0

  2. 0,1

  3. 1,1

  4. 0,2


Correct Option: A

What is the command for killing the suspended job number three?

  1. kill $3

  2. kill <<3

  3. kill %3

  4. terminate #3


Correct Option: C
  1. username

  2. password

  3. host name

  4. all of the above


Correct Option: D
  1. Change the permissions on all the .jpg file so that it is readable.

  2. It is not a valid command because the file name contains a *.

  3. Change the permissions on all image files

  4. Change permissions on the directory so that image files can be saved in it.


Correct Option: A

main(){ fork(); fork(); fork(); printf("Hello World!"); } How many times "Hello World!" will be printed?

  1. 2

  2. 4

  3. 6

  4. 8


Correct Option: D

AI Explanation

To determine how many times "Hello World!" will be printed, let's analyze the given code.

In the code, the fork() function is called three times consecutively. Each time the fork() function is called, it creates a new process by duplicating the existing process. So, the first fork() call creates one child process, the second fork() call creates two child processes (one from the original process and one from the child process of the first fork() call), and the third fork() call creates four child processes (one from the original process, two from the child processes of the second fork() call, and one from the child process of the first fork() call).

Therefore, a total of 1 + 2 + 4 = 7 child processes are created, in addition to the original process. Since each process executes the printf("Hello World!"); statement, it will be printed 8 times in total.

So, the correct answer is D) 8.

  1. You use the pico Unix command to create a directory

  2. The default permissions are: r w x - - - - - -

  3. You must be in your home directory

  4. The directory name must end in _html


Correct Option: C

What files are run when you log in successfully?

  1. .cshrc

  2. .c

  3. .log

  4. .login


Correct Option: A,D
- Hide questions