edited by
450 views
0 0 votes

I am confused about option D is it right or wrong, kindly explain the reason

 

solution question description

Which of the following statements is/are incorrect ?

  1. Process is brought to ready state always by job (long term) scheduler
  2. A process can kill itself and other processes too
  3. If all processes arrive at time 0 then SRTF algorithm will provide lesser average waiting time then SJF algorithm for their execution on single CPU system
  4. When a process needs any resource then the process requests OS to allocate the resources to process

1 Answer

Best answer
2 2 votes

(A) Process is brought to ready state always by job (long term) scheduler.

  • Explanation: The job (long-term) scheduler decides which processes are to be loaded into the ready queue. It brings processes from the new state (or job pool) to the ready state, typically based on some admission control mechanism (CPU or memory availability). However, it is not the only scheduler that deals with processes in the ready state. The short-term scheduler (or CPU scheduler) also plays a role in managing processes in the ready state by dispatching them to the CPU.

  • Incorrect: The word "always" makes this statement inaccurate. The job scheduler may bring processes into the ready state, but the short-term scheduler also manages the ready state. So, it's not always the job scheduler.

(B) A process can kill itself and other processes too.

  • Explanation: A process can terminate itself using system calls like exit() or kill(). However, terminating other processes requires proper privileges. A user process, for instance, cannot arbitrarily kill any other process unless it has permission (e.g., a root process in a Unix-like system can kill other processes).

  • Incorrect: The phrase "can kill itself and other processes too" is misleading because a process can't necessarily kill any other process. It depends on the operating system's permissions and privileges.

(C) If all processes arrive at time 0 then SRTF algorithm will provide lesser average waiting time than SJF algorithm for their execution on a single CPU system.

  • Explanation:

    • SJF (Shortest Job First) is a non-preemptive scheduling algorithm where the process with the shortest burst time is selected for execution.
    • SRTF (Shortest Remaining Time First) is a preemptive version of SJF, where the scheduler may preempt the currently running process if a new process with a shorter remaining time arrives.

    If all processes arrive at the same time (time 0), SRTF and SJF will both execute the shortest job first. Since there’s no further arrival of processes, there will be no preemption in SRTF. Therefore, both algorithms will yield the same average waiting time if all processes arrive simultaneously.

  • Incorrect: This statement is wrong because SRTF and SJF will result in the same average waiting time when all processes arrive at time 0.

(D) When a process needs any resource then the process requests OS to allocate the resources to the process.

  • Explanation: This is a basic principle of operating systems. When a process requires resources (CPU, memory, I/O devices, etc.), it makes a system call or a request to the operating system to allocate the necessary resources. The OS is responsible for managing resources and ensuring that processes are granted resources in a safe and efficient manner (e.g., avoiding deadlocks).

  • Correct: This statement is accurate. The OS handles resource allocation based on requests made by processes.


Conclusion:

  • Statements A, B, and C are incorrect.
  • Statement D is correct.
selected by
Position:
Show:

Related questions

4 4 votes
1 answers 1 answer
1.1k
1.1k views
himanshu55 asked Dec 9, 2023
1,096 views
Consider the following E-R diagram.The min no. of foreign keys in the relational model of above ER diagram is $\qquad$ .
0 0 votes
0 0 answers
440
440 views
jaswinder asked Aug 30, 2023
440 views
hello gate overflow family..i need a suggestion from you guyz i'm going to write gate 2024 cse exam but it was too late that i have started my preparation journey (in Aug...
3 3 votes
1 1 answer
275
275 views
goku4199 asked Jan 3
275 views
I have been on gateoverflow platform from a quite lot of time as an Editor I wanted to say something.......I have seen that a lot of answers people are writing completely...
1 1 vote
1 1 answer
1.0k
1.0k views
Phantom5 asked Sep 2, 2018
1,032 views
I need strict advice and guidance on this. All my other subjects syllabus and preparation covered. Only these two remained and I'm wondering. Somebody Suggested me to buy...