529 views
0 votes
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 implement it efficiently...if it is so , why there is need of the concept multithreading? plz explain it clearly if possible

1 Answer

0 votes
0 votes
Threads are known as Lightweight processes. The CPU switches rapidly back and forth among the threads giving illusion that the threads are running in parallel.

 

Multithreading is a type of execution model that allows multiple threads to exist within the context of a process such that they execute independently but share their process resources. A thread maintains a list of information relevant to its execution including the priority schedule, exception handlers, a set of CPU registers, and stack state in the address space of its hosting process.

Related questions

1 votes
1 votes
1 answer
1
Na462 asked Jul 12, 2018
1,694 views
According to me Answer is C, because Multithreading i.e. User application threads cannot use different processors because processor see all the thread of user process as ...
1 votes
1 votes
4 answers
2
ankitgupta.1729 asked Dec 14, 2017
1,871 views
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 switching .(C) The ...
1 votes
1 votes
2 answers
3
rahul sharma 5 asked Dec 6, 2017
691 views
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 b...
0 votes
0 votes
0 answers
4