Previous | Next --- Slide 7 of 66
Back to Lecture Thumbnails
Split_Personality_Computer

This is pretty much saying if you have code like

parallel_for(a bunch of times){ work(); }

You'd be foolish to parallelize over the work when the parallel_for is inherently parallel.

cloudhary

Doesn't having these as multiple processes involve significant duplication of the resources, while threading would be relatively light weight in comparison? Additionally, since Apache has a multithreaded solution, when might one use that compared to the process based one?

hanzhoul

In a request queue model, will it be slower to use processors based server than a threads based one? I mean processors need to copy data form one to another right?

tommywow

I think it depends on how the memory is organized. Generally it would take longer to pass data from one processor to another. But using processors can lead to better memory management in terms of locality too.

taoy1

I don't think using processes need to copy much more data from one to another. Recall from 15-213, when the processes are forked, they keep read-only memory sections mapped to the same physical memory sections of the parent process.

wxt

In the spring lecture, Kayvon mentioned that another reason for using processes in lieu of threads is the lack of a need for processes to communicate, since web requests are usually pretty independent of each other. I wonder why it's harder to communicate between processes than threads.

yeezus98

@wxt thread communication is as simple as sharing variables whereas IPC is a lot more complex and requires more resources