# Operating System :: Process Management

NA
SHSTTON
8
Solv. Corr.
47
Solv. In. Corr.
55
Attempted
0 M:0 S
Avg. Time

1 / 37

Choose the correct option.

Match the following?

ii) Passing data from one process to another process (2)Signals
iii) A situation wherein two or more competing actions (3)Preemptive multitasking
are waiting for the other to finish, and thus
neither ever does
iv) Allows the computer system to more reliably guarantee each process a regular slice of operating time (4)Pipe

Ai-4, ii-3, iii-2, iv-1

Bi-4, ii-3, iii-2, iv-1

Ci-2, ii-4, iii-1, iv-3

Di-4, ii-2, iii-1, iv-3

| | | Asked In Commvault |

Explanation:

The answer to this question is option C.
Software Interrupt mechanisms are possible through Signals.

Passing data from one process to another process is done via PIPE.

a situation wherein two or more competing actions are waiting for the other to finish and this neither ever does is called DEADLOCK.

allows the computer system to more reliably guartee each process a regular slice of operating time is with preemptive multitasking.

Workspace

NA
SHSTTON
24
Solv. Corr.
5
Solv. In. Corr.
29
Attempted
0 M:0 S
Avg. Time

2 / 37

Choose the correct option.

Which of the following are true with respect to deadlock conditions?

1) Mutual exclusion: a resource that cannot be used by more than one process or thread at a time

2) Hold and wait: processes already holding resources may request new resources

3) No preemption: No resource can be forcibly removed from a process holding it, resources can be released only by the explicit action of the process

4) Circular wait: two or more processes form a circular chain where each process waits for a resource that the next process in the chain holds

AOnly 1

BOnly 1 and 2

COnly l, 2 and 3

DAll the 4 conditions

| | | Asked In CommvaultSociete Generale |

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
30
Solv. Corr.
19
Solv. In. Corr.
49
Attempted
2 M:11 S
Avg. Time

3 / 37

Choose the correct option.

Which of the following algorithm is used for deadlock avoidance?

AGreedy

BBankers

CBackTracking

DDivide and Conquer

| | | Asked In CommvaultGlobal Edge |

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
15
Solv. Corr.
25
Solv. In. Corr.
40
Attempted
0 M:0 S
Avg. Time

4 / 37

Choose the correct option.

ASemaphore allows a specified number of threads to access a resource.

BMutex object is to provide exclusive access to a resource and all the threads can belong to different processes.

CA critical section provide exclusive access to a resource and all the threads should belong to the same process.

DMutex object is to provide exclusive access to a resource and all the threads should belong to same processes.

| | | Asked In CommvaultGlobal EdgeSociete Generale |

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
16
Solv. Corr.
14
Solv. In. Corr.
30
Attempted
0 M:0 S
Avg. Time

5 / 37

Choose the correct option.

Semaphore is used for

Asynchronization

Cbox

DNone of these

| | | Asked In WiproGlobal Edge |

Explanation:

Semaphores are synchronization tools.

Any integer(non negative) can act as semaphore. Semaphores are used for counting tasks such as creating a critical region that allows a specified number of threads to enter. For example, if we want at most four threads to be able to enter a section, we could protect it with a semaphore and initialize that semaphore to four.The first four threads will be able to decrement the semaphore and enter the region, but at that point, the semaphore will be zero and any other thread will be blocked from outside the critical region until one of the current threads leaves and signals the semaphore.

Workspace

NA
SHSTTON
15
Solv. Corr.
14
Solv. In. Corr.
29
Attempted
0 M:0 S
Avg. Time

6 / 37

Choose the correct option.

Critical section is?

Astatements which are not accessing shared resourses

Bstatements which are accessing shared resourses

Cpart of code where exception can be thrown

DNone of the above

| | | Asked In WiproGlobal EdgeSociete Generale |

Explanation:

A critical section is a code segment that access shared variables and has to be executed as an atomic action.

It means that in a group of cooperating processes, at a given point of time, only one process must be executing its critical section, If any other process also wants to execute its critical section, it must wait until the first one finishes.

NOTE: Only those processes can enter the critical section which are using the shared variables, and not those which are independent.

Workspace

NA
SHSTTON
21
Solv. Corr.
17
Solv. In. Corr.
38
Attempted
0 M:0 S
Avg. Time

7 / 37

Choose the correct option.

The process in which OS saves all data associated with current process and switches over to the next is called

AProcess Switching

CContext Switching

DNone of these

| | | Asked In WiproGlobal Edge |

Explanation:

The correct option is Option C, ie., context switching.

Context Switching means switching of CPU to another process, i.e., saving the state of old process and loading saved data for new process.

In context switching, the process is stored in PCB(Process Control Block), to serve the new process, so that the old process can be resumed from the same part it was left.

Workspace

NA
SHSTTON
23
Solv. Corr.
16
Solv. In. Corr.
39
Attempted
0 M:0 S
Avg. Time

8 / 37

Choose the correct option.

Background running processes are typically called

CProcesses

DNone of these

| | | Asked In WiproGlobal EdgeSociete Generale |

Explanation:

Background processes are also known as Daemon processes. It runs
in the background without keyboard
input and waits till keyboard input is
required. Thus, other processes can be done in parallel with the process
running in background since they do not have to wait for the previous process
to be completed.

Adding & along with the command starts it as a background process

$pwd & Since pwd does not wants any input from the keyboard, it goes to the stop state until moved to the foreground and given any data input. Thus, on pressing Enter, Output: [1] + Done pwd$

That
first line contains information about the background process – the job number
and the process             ID. It tells you that the ls command background process
finishes successfully.

Workspace

NA
SHSTTON
7
Solv. Corr.
13
Solv. In. Corr.
20
Attempted
0 M:0 S
Avg. Time

9 / 37

Choose the correct option.

An optimal scheduling algorithm in terms of minimizing the average waiting time of a given set of processes is ________.

AFCFS scheduling algorithm

BRound robin scheduling algorithm

CShortest job first scheduling algorithm

DNone of these

Explanation:

FIrst Come First Serve(FCFS) scheduling algorithms can cause long waiting times, especially when the first job takes too much CPU time.

In the case of Round Robin(RR), if the time quantum is large, it will result to starvation, because other processes will have to wait for a long time to execute.

Only SJF or Shortest Job First  scheduling algorithm is optimal in terms of average waiting time for a given set of processes i.e., average waiting time is minimum in this scheduling algorithm. In SJF, processes which have the shortest burst time are scheduled first. It is a non-preemptive scheduling algorithm.

Workspace

NA
SHSTTON
27
Solv. Corr.
13
Solv. In. Corr.
40
Attempted
0 M:0 S
Avg. Time

10 / 37

Choose the correct option.

CPU Scheduling is a function of OS under

AProcess Management

BMemory Management

CI/O Management

DNone of these

| | | Asked In WiproGlobal EdgeSociete Generale |

Explanation:

Here is no explanation for this answer

Workspace