Page 2 of 2

Posted: Tue Nov 20, 2007 11:18 am
by JoeKayzA
mystran wrote:Well, yeah, the filesystem on disk doesn't have to understand those, but at least the buffer cache will have to, and now you get a lot more complexity, because your mapping isn't <memaddr,len,file,fileoffset> anymore, 'cos you'll have to keep track of whether the "copy" has been modified at some address, or whether it still refers to the original, and you have to track how many references there are to the original file, so you know when it's no longer shared... and so on and so on.
Agreed, it's all about design decisions.
mystran wrote:Anyway, IMHO the whole POSIX fork() is somewhat overrated. The main thing where it's useful is servers that have one process for listening incoming connections, then fork() for each client. That's a nice way to serve lots of clients, if you lack multi-threading and proper asynchronous I/O.
100% agreed.