Advantages and Disadvantages of Threads over Multi processes, Basic Computer Science

Advantages:-
• Sharing Treads permit the sharing of a lot resources that cannot be shared in process, for instance, sharing code section, data section, Operating System resources like open file etc.
• Context Switching Threads are very reasonably priced to create and destroy, and they are inexpensive to represent. For instance, they require space to store, the PC, the SP, and the common-purpose registers, but they do not need space to share memory information, Information about open files of I/O devices in use, etc. With so little circumstance, it is much faster to switch between threads. In other words, it is comparatively simpler for a circumstance switch using threads.

Disadvantages:-
• Security Since there is, a wide sharing among threads there is a potential difficulty of security. It is quite possible that one thread over writes the stack of a different thread (or damaged shared data) although it is very unlikely since threads are destined to cooperate on a single task.
• Blocking The major drawback if that if the kernel is single threaded, a system call of one thread will block the entire process and CPU may be idle during the blocking period.
Posted Date: 5/2/2012 7:14:52 AM | Location : United States







Related Discussions:- Advantages and Disadvantages of Threads over Multi processes, Assignment Help, Ask Question on Advantages and Disadvantages of Threads over Multi processes, Get Answer, Expert's Help, Advantages and Disadvantages of Threads over Multi processes Discussions

Write discussion on Advantages and Disadvantages of Threads over Multi processes
Your posts are moderated
Related Questions
Question 1 Describe the four components of light source Question 2 Briefly explain the types of textures Question 3 Explain the standard settings used to adjust th

how does one create a database in mysql

QUESTION (a) Distinguish between S-HTTP and SSL (b) What are the three basic security provided by SSL? (c) Discuss the limitations of SSL (d) State the port number us


ELEMENTS OF CPU: The CPU is a complex IC chip having millions of transistors. As mentioned earlier, a CPU has three major identifiable parts: Control Unit (CU), Arithmetic & l

Question 1 What is HTTP? How does it work? Question 2 What are the various methods of HttpServletResponse interface? Question 3 What is Web server? What are the va

Find the corresponding matrix of the digraph above

Ask qu The figure below shows a rooted tree, 756_Find the height.png 1.1. Find the height/level of the tree as shown above?estion #Minimum 100 words accepted#

Explain about MIDI audio

requirement analysis and specification for online voting