Showing posts with label process. Show all posts
Showing posts with label process. Show all posts

Jan 16, 2009

process

Process is an execution of program, which has full virtual memory address including stack, heap, data segment, code segment…
The communication between processes includes socket, message passing, file, signal…

Dec 21, 2008

How and when to do a context switch? How do you handle a time slice interrupt?

How and when to do a context switch? How do you handle a time slice interrupt?

multiple processes can share a single CPU resource and the scheduler allows every task to run for some certain amount of time, so one process needs to be switched out of the CPU so another process can run. Registers especially program counter and other specific data need to be switched out.

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