thread interference: you don’t want two threads to interleave while accessing shared variables .. inconsistencies arise
deadlock: don't want to be stuck in a situation where each of the thread is waiting for the other thread to release a lock .. none of the thread can make any progress ..
starvation: don't want a thread to starve for resources being consumed by the other thread .. long and 'greedy' synchronized methods lead to this ..
livelock: pretty much like deadlock but the threads are not blocked waiting for each other but they are continuously responding to each other requests ... but none of them is able to make any progress ...
Showing posts with label thread. Show all posts
Showing posts with label thread. Show all posts
Jan 15, 2009
Dec 21, 2008
What's the difference between process and thread? What kind of information does thread maintain? its own stack? heap?
What's the difference between process and thread? What kind of information does thread maintain? its own stack? heap?
process is a execution of a program and process contains data segment, code segment, heap and stack but thread is a single sequence stream within the process. Threads can share memory space of defferent threads belonging to the same process, process cannot. Thread maintains own stack, shares heap with others
process is a execution of a program and process contains data segment, code segment, heap and stack but thread is a single sequence stream within the process. Threads can share memory space of defferent threads belonging to the same process, process cannot. Thread maintains own stack, shares heap with others
Subscribe to:
Posts (Atom)