Recent questions tagged threads

2 2 votes
2 2 answers
180
180 views
A shared variable $x$ initially contains $0$.Thread $T_1$ adds $1$ to $x$ using:$R_1=x$$R_1=R_1+1$$x=R_1$Thread $T_2$ adds $2$ to $x$ using:$R_2=x$$R_2=R_2+2$$x=R_2$The i...
1 1 vote
1 1 answer
253
253 views
Which of the following statements about context switching are correct?When switching between two threads, the registers, stack pointer, and program counter of the outgoin...
2 2 votes
1 1 answer
258
258 views
Which of the following statements are correct?With kernel-level threads, if one thread of a process blocks, all the threads of that process will also be blocked. A lock i...
3 3 votes
1 1 answer
200
200 views
Which of the following statements are correct?Threads that are part of the same process share the same stack pointer. Threads that are part of the same process share the ...
2 2 votes
1 1 answer
175
175 views
Which of the following statements are correct?Threads belonging to the same process use a common stack. Threads belonging to the same process can use the same valid TLB e...
1 1 vote
0 0 answers
279
279 views
Can anyone please give suggest some resource for studying1. System calls2. User mode and Kernel mode3. Threads.The system calls part of galvin is only 4 pages long and I ...
0 0 votes
1 1 answer
416
416 views
Which of the following statement is correct for Pthreads?It refers to POSIX standard (IEEE $1002.1$c)This standard defines API for thread creation onlyThis is a specifica...
0 0 votes
2 2 answers
445
445 views
Given below are two statements:$\text{Statement I}$: A thread is a dispatchable unit of work that does not executes sequentially and is not interruptible$\text{Statement ...
0 0 votes
1 1 answer
371
371 views
Consider the following three threads and four semaphores.$s 1, s 2, s 3, s 4$ are counting semaphores and $x$ is a shared variable initialized as $1.$The goal is to initi...