search
Log In

Recent questions tagged process

0 votes
2 answers
2
For a process the termination state lies in which memory? Main or Secondary memory?
asked Jun 7, 2019 in Operating System shubhojit1412 130 views
0 votes
1 answer
3
Which part of the process image forms the logical address space that is used in paging?
asked May 26, 2019 in Operating System aditi19 119 views
0 votes
2 answers
4
Consider we have a cpu whose processes are scheduled using premptive priority scheduling algorithm, suppose a process of higher priority than the currently running process arrives in the ready queue, according to the algorithm the running process must be prempted, who actually does this job of interrupting the running process?
asked Apr 9, 2019 in Operating System Saideepak Bejawada 199 views
0 votes
0 answers
5
What are the benefits and the disadvantages of each of the following ? Consider both the system level and the programmer level. a. Synchronous and asynchronous communication b. Automatic and explicit buffering c. Send by copy and send by reference d. Fixed-sized and variable-sized messages
asked Mar 19, 2019 in Operating System akash.dinkar12 40 views
0 votes
0 answers
6
Using the program shown below, explain what the output will be at lines X and Y. #include <sys/types.h> #include <stdio.h> #include <unistd.h> #define SIZE 5 int nums[SIZE] = {0,1,2,3,4}; int main() { int i; pid t pid; pid = fork(); if (pid == 0) { for (i = 0; i < SIZE; i++) { ... else if (pid > 0) { wait(NULL); for (i = 0; i < SIZE; i++) printf("PARENT: %d ",nums[i]); /* LINE Y */ } return 0; }
asked Mar 19, 2019 in Operating System akash.dinkar12 54 views
0 votes
0 answers
7
Consider the RPC mechanism. Describe the undesirable consequences that could arise from not enforcing either the “at most once” or “exactly once” semantic. Describe possible uses for a mechanism that has neither of these guarantees.
asked Mar 19, 2019 in Operating System akash.dinkar12 56 views
0 votes
0 answers
8
Give an example of a situation in which ordinary pipes are more suitable than named pipes and an example of a situation in which named pipes are more suitable than ordinary pipes.
asked Mar 19, 2019 in Operating System akash.dinkar12 41 views
0 votes
0 answers
9
Using the program in Figure 3.34, identify the values of pid at lines A, B, C, and D. (Assume that the actual pids of the parent and child are 2600 and 2603, respectively.) #include <sys/types.h> #include <stdio.h> #include <unistd.h> int main() { pid t pid, pid1; /* fork a child ... printf("parent: pid = %d",pid); /* C */ printf("parent: pid1 = %d",pid1); /* D */ wait(NULL); } return 0; }
asked Mar 19, 2019 in Operating System akash.dinkar12 98 views
0 votes
1 answer
10
Explain the circumstances under which which the line of code marked printf("LINE J") in following program will be reached. #include <sys/types.h> #include <stdio.h> #include <unistd.h> int main() { pid t pid; /* fork a child process */ pid = fork(); if (pid < 0) { / ... else { /* parent process */ /* parent will wait for the child to complete */ wait(NULL); printf("Child Complete"); } return 0; }
asked Mar 19, 2019 in Operating System akash.dinkar12 208 views
0 votes
1 answer
11
Including the initial parent process, how many processes are created by the program shown below- #include <stdio.h> #include <unistd.h> int main() { int i; for (i = 0; i < 4; i++) fork(); return 0; }
asked Mar 19, 2019 in Operating System akash.dinkar12 73 views
0 votes
0 answers
12
0 votes
0 answers
13
Construct a process tree similar to Figure 3.8. To obtain process information for the UNIX or Linux system, use the command ps -ael.Use the command man ps to get more information about the ps command.The task manager on Windows systems does not provide the parent process ID, but the process monitor tool, available from technet.microsoft.com, provides a process-tree tool.
asked Mar 19, 2019 in Operating System akash.dinkar12 104 views
0 votes
1 answer
14
0 votes
1 answer
15
0 votes
0 answers
16
Assume that a distributed system is susceptible to server failure. What mechanisms would be required to guarantee the “exactly once” semantic for execution of RPCs?
asked Mar 19, 2019 in Operating System akash.dinkar12 56 views
0 votes
0 answers
17
Consider the “exactly once”semantic with respect to the RPC mechanism. Does the algorithm for implementing this semantic execute correctly even if the ACK message sent back to the client is lost due to a network problem? Describe the sequence of messages, and discuss whether “exactly once” is still preserved.
asked Mar 19, 2019 in Operating System akash.dinkar12 54 views
0 votes
0 answers
18
When a process creates a new process using the fork() operation, which of the following states is shared between the parent process and the child process ? a. Stack b. Heap c. Shared memory segments
asked Mar 19, 2019 in Operating System akash.dinkar12 31 views
0 votes
0 answers
19
The Sun UltraSPARC processor has multiple register sets. Describe what happens when a context switch occurs if the new context is already loaded into one of the register sets. What happens if the new context is in memory rather than in a register set and all the register sets are in use ?
asked Mar 19, 2019 in Operating System akash.dinkar12 30 views
0 votes
0 answers
20
Original versions of Apple’s mobile iOS operating system provided no means of concurrent processing. Discuss three major complications that concurrent processing adds to an operating system.
asked Mar 19, 2019 in Operating System akash.dinkar12 81 views
1 vote
1 answer
21
Including the initial parent process, how many processes are created by the following program. #include <stdio.h> #include <unistd.h> int main() { fork(); fork(); fork(); return 0; }
asked Mar 19, 2019 in Operating System akash.dinkar12 32 views
0 votes
0 answers
22
#include <sys/types.h> #include <stdio.h> #include <unistd.h> int value = 5; int main() { pid t pid; pid = fork(); if (pid == 0) { /* child process */ value += 15; return 0; } else if (pid > 0) { /* parent process */ wait(NULL); printf("PARENT: value = %d",value); /* LINE A */ return 0; } } Explain what the output will be at LINE A in this program.
asked Mar 19, 2019 in Operating System akash.dinkar12 123 views
0 votes
1 answer
23
Consider a process P1 that is executing on a Linux-like OS on a single core system. When P1 is executing, a disk interrupt occurs, causing P1 to go to kernel mode to service that interrupt. The interrupt delivers all the disk blocks that unblock a process P2 (which blocked ... back to the user mode of P1. At this point in time, what are the states (ready/running/blocked) of processes P1 and P2 ?
asked Jan 13, 2019 in Operating System dd 194 views
0 votes
0 answers
24
In round robin scheduling, which process gets the chance first if a process comes to ready state from running(i.e time quantom getting over) and another from new to ready(i.e due to same arrival time) ? Is there a convention or will it be specified in the question?
asked Jan 4, 2019 in Operating System subho16 121 views
0 votes
0 answers
25
test and set is used to implement Lock / Unlock to avoid BUSSY WAITING. above statement is true or false?
asked Dec 21, 2018 in Operating System Rahul_Rathod_ 241 views
0 votes
1 answer
26
is this preemptive or non-preemptive?
asked Dec 15, 2018 in Operating System pps121 50 views
0 votes
1 answer
27
0 votes
1 answer
28
Consider the following statements: S1: Long term scheduler sends the process from ready state to running state. S2: Medium term scheduler controls the degree of multiprogramming. which of the following is correct? Only S1 Only S2 Both S1 & S2 Neither S1 & S2
asked Dec 9, 2018 in Operating System balraj_allam 680 views
0 votes
1 answer
29
The first known correct software solution to the critical-section problem for two processes was developed by Dekker. The two processes, P0 and P1, share the following variables: boolean flag[2]; /* initially false */ int turn; The structure of process Pi (i == 0 or 1) is shown in Figure 5. ... [i] = true; } } /* critical section */ turn = j; flag[i] = false; /* remainder section */ } while (true);
asked Nov 17, 2018 in Operating System Chetan Warke 226 views
0 votes
0 answers
30
when a process is in wait/blocked state it is in MM/disk/buffer?
asked Oct 31, 2018 in Operating System aditi19 59 views
...