In the context of implementing a crawler, answer the following:
-
What is the difference between
multithreading
and
multiprocessing
?
-
How do these relate to running on a
multi-core CPU
?
-
For a network crawler, when would you prefer threads vs processes?
-
What are common pitfalls (e.g., race conditions, deadlocks, overhead), and how do you mitigate them?