|
1) The programmer splits a process into threads by invoking pthread_create() or something similar. As one example, a web server might launch a thread for each connection. This is much faster than launching a new process for each connection. As another example, two processes may be using a lot of semaphores, messages queue, shared memory, etc to communicate. Make them two threads and they can communicate much more easily. If you have multiple cpu's, multiple threads can run simultaneously. A context switch occurs when a cpu switches from one process to another and it can be expensive. But switching from one thread to another is inexpensive. Some modern cpu's can sometimes run two or more instructions from a process at the same time. Some of these can use this to run instructions from different threads simultaneously. Intel calls this superthreading (or hyperthreading in a more advanced version).
2) A subshell is what happens when a shell forks. The shell needed a second copy of itself to do something. For example:
filelist=`cd /etc; ls`
pwd
that pwd will still show the current directory, not /etc. The cd was done in a subshell.
3) The telnet command will be typed on something. What is the terminal settings on that something prior to entering the telnet command? If you are using an xterm that is acting like a vt-100, the telnet command won't change that. Nor will it try to resize the window or anything.
4) rlogin is very much like telnet but it is non-standard and is very unix specific. It is also very insecure and so it is often disabled.
5) A cluster is a collection of systems that appear to the outside world as one system. This can be to distribute the load across a lot of boxes. And if one box goes down, the others can continue. www.google.com is probably a cluster while www.unix.com certainly is not.
|