Recent questions tagged threads

4.0k
views
2 answers
3 votes
Which of the following statements about threads is/are TRUE?Threads can only be implemented in kernel spaceEach thread has its own file descriptor table ... stackThreads belonging to a process are by default not protected from each other
2.8k
views
2 answers
1 votes
Consider the following two threads $\mathrm{T} 1$ and $\mathrm{T} 2$ that update two shared variables $\mathrm{a}$ and $\mathrm{b}$ ...
768
views
1 answers
6 votes
Consider the following program execution involving 2 threads accessing the shared variable a which has been initialised to $0.$Which of the following statement(s ... both threads will finish, or none of them of will finish execution
751
views
2 answers
4 votes
Consider three concurrently executing threads in the same process using two semaphores $\text{s}1$ and $\text{s2}.$ Assume $\text{s1}$ has been initialized to $1$, while $\text{s2}$ has ... $12$18$36$
438
views
0 answers
4 votes
Consider the scenario where $\text{L}$ is a shared variable which is a pointer to the head of a linked list originally containing three nodes with keys $3, 4,$ and $5.$ Consider the function ... $6,2,3,4,5$2,6,3,4,5$2,3,4,5$
277
views
1 answers
0 votes
Which of the following multithreading model is followed in Linux OS?One User Thread mapping to One Kernel ThreadMany User Threads mapping to One Kernel ... mapping to Many Kernel ThreadsMany User Threads mapping to Many Kernel Threads
334
views
1 answers
0 votes
$\text{ Anyone please explain : }$
1.8k
views
2 answers
0 votes
A system has 5 process and 3 resources (A, B, C). The maximum count of resources are (10, 5, 7). Consider the following table of resource allocation. MAX(A B ... P0, P2 only P2, P4, P3, P1, P0 only Both a and b None are safe sequences
893
views
1 answers
0 votes
State true or false.Deadlock detection is possible using the allocation and request matrices alone.A way to recover from deadlock is to take away the resource from one ... True, False False, True, True True, False, True False, True, False
339
views
1 answers
0 votes
Suppose we want to synchronize two concurrent process P and Q using binary semaphore S and T.Process P: Process Q: while(1){ ... (S) X : V(S) Y : P(T) Z: V(T) and initially S = 1 and T= 0
301
views
1 answers
0 votes
Which of the following is false about User threads? User threads can switch fast since it does not involve kernel. User threads are lightweight since they do not ... every user threads i.e. if it is blocking or runnable. None of these
337
views
0 answers
1 votes
_________ is an $\text{IEEE 1003.1C}$ standard $\text{API}$ for thread creation and synchronization in operating system.
879
views
0 answers
1 votes
MSQ Consider the following statements, which one of the following is/are TRUEIn fork() system call, child process inherits all the open file descriptors of ... of the parent process User level threads shares the code segment of the process