Recent questions tagged threads

3.3k
views
3 answers
8 votes
S1: Context Switching occurs only in kernel mode. :TRUES2: Context Switching in user mode is faster as compared to context switching in kernel mode. : TRUEIf ... which means more time should be taken as compared to CS in kernel mode.
1.7k
views
1 answers
4 votes
True/False :1)Several threads can share same physical address space.2)Several threads can share same virtual address space.
2.0k
views
4 answers
1 votes
The primary difference between process and thread ?(A) The number of I/O requests mode.(B) The amount of overhead associated with creation and context ... (C) The amount of memory allocation(D) The average number of instructions executed
734
views
2 answers
1 votes
Why threads have less context than process? Context means various attributes that we store in the PCB,so the attributes like state,property,PC,etc.. should be there in both process and thread.So,how thread have less context than process?
896
views
0 answers
0 votes
Threads of a process share(A) global variables but not heap(B) heap but not global variables(C) neither global variables nor heap(D) both heap and global ... files. So global variables it does share bt does it also share heap section?
1.2k
views
1 answers
0 votes
Multi-threaded application cannot take advantage of multiprocessing.What does this mean?
1.4k
views
1 answers
1 votes
Which one of the following is false about user threads1. User threads can switch fast since it does noy invoke kernel2.user threads are light weight since they do ... of every user threads ie if it is blocking or run able4.none of these
1.1k
views
1 answers
1 votes
State true or false A program to compute the sum of first 10000 numbers can be divided into 4 sub parts and executed on 4 CPUs using either forks/threads. ... between the 4 subparts are very similar and need not duplicated. A. TrueB. False
550
views
1 answers
0 votes
I am getting confused with the implementation of threads.....as we know if some task is assigned to process it can divide the task into subprocess and ... why there is need of the concept multithreading? plz explain it clearly if possible
667
views
2 answers
4 votes
Whether the following statement is true or false??"The OS maintains scheduling and accounting information for each thread"
893
views
2 answers
9 votes
if(fork() && fork()) {fork();}if(fork()||fork()) {fork();fork();}printf("XYZ");How many time XYZ gets printed ?
1.2k
views
4 answers
11 votes
int main() { if(fork() == 0) printf("GATE2018"); if(fork() == 0) printf("GATE2018"); }How many times GATE2018 printed?
5.9k
views
2 answers
4 votes
Can a multithreaded solution using multiple user-level threads achievebetterperformance on amultiprocessor system than on a single-processorsystem?
542
views
1 answers
0 votes
Which of the following is not true regarding a preemptive kernela. If a high priority thread becomes ready to run, low priority thread is ... . There are special demands on communication between threads and handling common resources
17.8k
views
7 answers
48 votes
Threads of a process shareglobal variables but not heapheap but not global variablesneither global variables nor heapboth heap and global variables
12.2k
views
5 answers
30 votes
Which of the following is/are shared by all the threads in a process?Program counterStackAddress spaceRegisters(I) and (II) only(III) only(IV) only(III) and (IV) only
735
views
1 answers
5 votes
743
views
1 answers
1 votes
Consider the following statements.1. A thread running in critical section never get context switched.2. Hardware access to devices is usually available in user ... only possible in Kernel mode.Which of the above statements are incorrect?
2.6k
views
3 answers
10 votes
can anyone tell what are different activities that are performed in kernel modeuser modehow to change frm user mode to kernel mode and vice-versa,,
486
views
1 answers
1 votes
Suppose you have an array A of 4 numbers and you have 2 threads. how will you perform a cumulative sum of numbers and store it in array B using parallel computation and synchronization. (B[1]=A[1], B[2]=A[1] + A[2],.. so on
2.8k
views
3 answers
2 votes
Java uses threads to enable the entire environment to be ______.SymmetricAsymmetricSynchronousAsynchronous
1.8k
views
2 answers
5 votes
Assume that process A has 3 user level threads and process B has 4 kernel-level threads. Consider while process A is running in CPU, process B is waiting in ready ... .C. All B threads are blocked and A threads are not blocked.D. None.
1.1k
views
1 answers
4 votes
If a process has multiple threads and it calls a fork() then will the child process be multi-threaded also or it will have only one thread?
2.2k
views
2 answers
3 votes
Possible thread states in Windows 2000 operating system include:Ready, running and waitingReady, standby, running, waiting, transition and ... waiting, transition and terminatedStandby, running, waiting, transition and terminated
2.7k
views
2 answers
10 votes
Q:which of the following can run in parallel on different processors in a multiprocessorsa)user level thread b)kernel level thread c)processesd) processes and kernel level thread
3.1k
views
2 answers
2 votes
A thread is a light weight process.In the above statement, weight refers totimenumber of resourcesspeedall of the above
4.9k
views
5 answers
3 votes
Overlayingrequires use of a loaderallows larger programs, but requires more effortis most used on large computersis transparent to the user
1.7k
views
3 answers
5 votes
Thread is a light-weight sub-process. If so, what is executed by the processor? Process or thread? If it is thread, why do we say that ready queue has ... is very small in size? What is actually the difference between these two?Thank you.
14.4k
views
4 answers
27 votes
Which one of the following is NOT shared by the threads of the same process ?StackAddress SpaceFile Descriptor TableMessage Queue