Tag: operating systems

Questions Related to operating systems

Before you switch the operation mode manually in the system ?

  1. restart the instance

  2. change parameter rdisp/btctime

  3. simulate

  4. close all the user sessions


Correct Option: C

How much Swap memory should be in the system ?

  1. at least 2GB

  2. at least 3GB

  3. at least 1GB

  4. Two times of main Memory


Correct Option: A

Which of the following commands is not a filter

  1. man

  2. pg

  3. cat

  4. head


Correct Option: A
Explanation:

To answer this question, the user needs to know what is meant by a filter command.

A filter command is a command that takes input from standard input, performs some operation on it, and then produces output to standard output.

Now, let's go through each option and explain whether it is a filter command or not:

A. man: This command is not a filter command. It is used to display the manual page of a given command.

B. pg: This command is a filter command. It is used to paginate the input that is received from standard input.

C. cat: This command is a filter command. It is used to concatenate files and display the output on standard output.

D. head: This command is a filter command. It is used to display the first few lines of the input that is received from standard input.

Therefore, the answer is:

The Answer is: A. man

Whats the command to kill the last background job?

  1. kill $!

  2. kill $0

  3. kill $#

  4. kill -9 $1


Correct Option: A

AI Explanation

To answer this question, you need to understand how to kill background jobs in a Unix-like operating system.

The correct command to kill the last background job is option A) kill $!.

Explanation for each option:

Option A) kill $! - This option is correct because $! refers to the PID (Process ID) of the last background job. By using the "kill" command followed by $!, you can terminate the last background job.

Option B) kill $0 - This option is incorrect because $0 refers to the PID of the current shell process, not the last background job.

Option C) kill $# - This option is incorrect because $# refers to the number of command-line arguments, not the PID of the last background job.

Option D) kill -9 $1 - This option is incorrect because $1 refers to the first command-line argument, not the PID of the last background job. Additionally, using the -9 signal with the kill command is a forceful termination, which may not be necessary or desired.

Therefore, the correct answer is A) kill $!. This option is correct because it correctly references the PID of the last background job, allowing you to terminate it.

What will the following command do? echo *

  1. Display all the files under current directory

  2. displcay the pid of the last background job

  3. display the pid of the current background job

  4. display syntax error


Correct Option: A

Trap is a

  1. Synchronous interrupt

  2. Asynchronous interrupt

  3. Hardware interrupt

  4. Operating System interrupt


Correct Option: A

FIFO scheduling is

  1. Pre-Emptive Scheduling

  2. Non Pre-Emptive Scheduling

  3. Deadline Scheduling

  4. Fair-Share Sceduling


Correct Option: B

In Memory Management, FRAGMENTATION problem is caused by creation of

  1. Large number of processes

  2. Large number of free holes

  3. Large number of waiting processes

  4. None of the above


Correct Option: B
  1. accept interrupts from a specific channel

  2. reject all interrupts

  3. reject selected interrupts

  4. reject all interrupts from selected channels


Correct Option: A