Example: see which application is occupied by port 80:
First gets the PID that occupies the process, using the command: lsof-i:80
Next look at the process, using the command: PS-EF | grep <pid>
The difference between process and thread:
Process is the basic unit of system resource allocation and dispatch, thread is the basic unit of CPU dispatching and allocating, all threads of unified process share resources.
A thread can belong to only one process, and a process may have multiple threads.
Process switching is much more expensive than thread switching
Interprocess communication methods:
1, Pipe. Communication between user and parent processes
2, signal. For mutual notification between processes
3, Message Queuing.
4, shared memory. Simultaneously accesses the same piece of memory, unifies the signal quantity mechanism, achieves the critical resource mutually exclusive
5, signal volume. For synchronization between processes
6, socket (socket). Can be used for process communication between different machines