Re: Questions about Minix "Erik van der Kouwe" few.vu.nl> escreveu:
>> Something now came to my mind.
>> Suppose I'm a (small, in terms of .text) process. I have a high
>> chmem. So high that I don't fit twice in memory. However, I fit once.
>> Now, I want to execute another program, that fits in the remaining
>> free memory. To do this, I need to do fork()+execve(). Does the
>> kernel tries to clone my data segment after the fork(), thus
>> disabling me from executing another (small) program?
>
> Correct. Fixing this indeed requires copy-on-write which in turn
> requires paging, which will probably take substantial time to make it
> to a release.
One could still implement copy-on-write using segmentation.
Only, instead of duplicating the pages as they are written, the data segment
needed to be duplicated all at once.
The only problem would be if the parent process wrote something in the
memory immediately after the fork().
(now, thinking about that, it's pretty likely that the parent does that)
--
João Jerónimo
"Computer are composed of software, hardware, and other stuff terminated
in "ware", like firmware, tupperware, (...)" - by JJ. |