Previous | Next --- Slide 7 of 54
Back to Lecture Thumbnails
monkeyking

They use process instead of thread here. Is that because if one thread crashes, they whole process crashes?

eknight7

@monkeyking: I think they say process instead of thread here because each worker process and parent process can run on a separate machine. Each process can run many threads. Quite like Assignment 4. And since we have a worker process "Busy serving long request", we can say that this is a single-threaded process.

And yes, a process is an independent entity, so that if it crashes, it doesn't affect other processes. Where as if a thread crashed, it would then cause entire program to crash (including parent "thread"). I suppose that in a well designed system, workers are programmed to handle "crashing" cleanly, especially if the issue is due to serving a certain request.

arcticx

Can someone explain what does this "critical path" mean?

eknight7

@arcticx "critical path" refers to the "path" or "steps" for serving a request. Remember in assignment 4, if we needed a new worker to serve a request, the worker launch would take some time, and this time would be counted in the latency of responding to that request? So if we launch some workers beforehand, so that when we need another worker to serve a request, no time goes in launching a new worker, we reduce the latency of serving that request.

RX

The web service workers need more properties of processes than threads because

  • the workers won't communicate with each other too often, they are very much independent
  • the workers should have certain level of isolation so that one worker won't exploit other worker's information, and crash of one workers won't affect others

In another word, we would rather use the abstraction of processes instead of threads because these properties. But in real world, the implementation can either be processes or threads