Just answer part of your questions

jabber (jabber)
1) You know how to create a Thread using the Thread class.

2) A Java application itself is a Process on your native machine.

3) JVM can initiate a new (native) Process. The code is as follows

Process p = Runtime.exec(".....");

4) The title of your response is full of confusion. Let me cite it here--- How can I judge a running program is Process or Thread. The reason is that a running programm cannot be simply a Thread.

5) Whenever you talk about a Thread, please remember it means " a thread of control".

6) If you are really interested in hacking on the precise definitions, I suggest you pick up a book on Operating System. I guess you have one. As you browse the book, please pay attention to another term---task. Usually, people do a task in a seperate Thread.

7) Good luck.
2001-2-25 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 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.

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论