Describe the difference between a Thread and a Process?

Answer Posted / nalin jayasuriya

A thread consists of a series of computer instructions...
and usually corresponds to the CPUs execution of a series
of instructions. Threads use the registers and the 'stack'
as its memory (state).

A process contains at least one thread and private memory.
A process is the operating system loads when one executes a
program. When a process contains multiple threads, there is
usually thread synchronization needed.

In Windows programming, the primary thread is what creates
the user-interface controls and it's that thread that is
allowed exclusive privileges to update the user-interface.

In Windows programming, a process receives and sends
messages to the operating system.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the 3 types of system development life cycle

2429


What is a class oop?

588


What is for loop and its syntax?

593


Why is oop better than procedural?

600


What do you mean by variable?

572






Can bst contain duplicates?

664


Why polymorphism is used in oops?

578


What is encapsulation oop?

574


What is interface? When and where is it used?

1662


What is the real life example of polymorphism?

605


What is super in oop?

589


What is destructor oops?

615


What is difference between inheritance and polymorphism?

561


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2157


What is polymorphism and example?

590