Question: What is the difference between Inter- and Intra process?
One minute response: The prefix "inter" means "between"; the interstate highway runs between states. The prefix "intra" means "within"; intravenous feeding puts nutrients directly into a body's veins. Interprocess communication is communication between processes; intraprocess communication is communication within by a process (by threads, presumably).
Question: How do you go about implementing a time-out? If the system is locked waiting for a response, how can you keep track of how long the wait has been and break the lock?
One minute response: On Unix systems, the usual ways are to use an alarm signal or select; see tips 20, 21, and 25 in Snader. In Java, you can use a timer thread to control some other thread (although the JVM semantics make this tricky).
Question: Given different APIs for different platforms, is it advisable to stay away from thread/process manipulation and stick to single threaded design?
One minute response: That's probably the safest and easiest course if you're worried about portability across different platforms. On the other hand, cutting yourself off from concurrency may be a drastic step, particularly when performance or reliability are concerns. In such cases, you may want to consider platform independent tools, such as Java or the Apache Portable Runtime.
Question: How is file division done when downloading it in pieces? Does the JVM run in different threads?
One minute response: It depends on whether you're supporting speed or reliability. For speed, you can just divide the file into n pieces, where n is the number of concurrent connections going. For reliability, there's usually some kind of interleaving with redundancy so that missing pieces can be reconstructed from the pieces that were received.
The JVM itself runs in a single process, although recent extensions to the JVM use a multi-process architecture. Whether the JVM is implemented using threads is up to the implementer. Java threads can be implemented native to the JVM (such threads are called green threads), or by the host OS, or both.
Question: Is this compatibility between parent and child? How do I know if a system is POSIX or not?
One minute response: I'm unaware of any method other than reading the documentation. You could try using a Posix routine in your code, but if you can't run your code, it could be because you're not using the right libraries, and you're back to the documentation again. If it does work, you may have just lucked out by picking a native routine that shares a name with a Posix routine (which may be the common case because Posix is a synthesis of many Unixen).
This page last modified on 16 July 2003.