Try to make it clear

jfhuang (Zigzag)
<本文发表于: 相约加拿大:枫下论坛 >
The timing of a central processor can be into time slices. in every time slice a certain task(a small piece of program code) will be allowed to do according to the scheduler of the OS. Because the time slice is very small, from user's view, many applications can be excuted at the same time. That 's called multi tasking. UNIX and windows are samples of multi task systems but DOS is not. a process is a piece of programs which can be in the form of DLL, service or EXE on the windows platform. every process is defaultly a thread, which is called primary thread. Besides the primary thread , a process can create other threads as needed. A process with more than one thread is called multi-thread process. threads can communicate with each other both in-processly(threads within a process) and out-processly(threads between processes).

the concept of the thread is almost platform independant, although there are differences in the implementations between unix and windows.JAVA and C++ have their own librarys of threads. But they share almost the same concept.

To expand a little, any modern computer languages are nothing but tools to make runnable programs. Languages themselves can be devided into object oriented(C++, JAVA, smalltalk, or generally UML) and structure oriented(c, pascal,Fortran). EJB,CORBA,COM themselves are not parts of a language. They are the very thing to let people build the real applications easier. Actually most of the concepts beyond the language are implemented in the libararies to let programmers avoid coding from scrach.

So to be a programmer or a architect. knowledge beyond the language is more important than or at least the same as the language itself.
<本文发表于: 相约加拿大:枫下论坛 >

2001-2-26 -04:00

回到话题: What's the difference between Thread and Process? It's said process is expensive and thread is much more efficient when I learn the difference between CGI and Servlet. tks.

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论