If I don't active the page mechanism
Fan Yang
lljyangfan at gmail.com
Sat Nov 3 02:04:07 EDT 2012
Hi Mulyadi Santosa
I think the OS can just use the segment mechanism to implement the
virtual memory management. When I look through the intel manual find that
the Segment Descriptor have a member P, when the P is set this segment is
located in the physical memory otherwise the segment is not located,but If
this flag is clear, the processor generates a segment-not-present
exception when a segment selector that points to the segment descriptor is
loaded into a segment register. Just like the page mechanism we can just
use the segment mechanism to manage the virtual memory. But it
is Inefficiencies for swapping all segment from disk to memory and this way
is no use in the Multiprocessor.
regards
Fan
2012/11/1 Fan Yang <lljyangfan at gmail.com>
>
>
>
> 2012/11/1 Mulyadi Santosa <mulyadi.santosa at gmail.com>
>
>> Hi..
>>
>> On Wed, Oct 31, 2012 at 9:30 PM, Fan Yang <lljyangfan at gmail.com> wrote:
>> > Hi all:
>> > I have a problem, if i don't active the page mechanism just use the
>> > segment mechanism at the x86 cpu, how can I manage the Multi-tasking?
>>
>> multitasking and memory management are not directly related IMHO, but
>> you're right that we need process address space switching.
>>
>> I think what you're going to do is already done by Linux kernel port
>> to non MMU architectures. Can't recall which ones, so try to check
>> https://en.wikipedia.org/wiki/Memory_management_unit for further
>> examples
>>
>>
>> -
>>
>> regards,
>>
>> Mulyadi Santosa
>> Freelance Linux trainer and consultant
>>
>> blog: the-hydra.blogspot.com
>> training: mulyaditraining.blogspot.com
>>
>
> Hi Mulyadi Santosa
> Very honored to see your reply.Yes, the page mechanism can protect
> different task to interfere each other by mapping different task to
> different physical memory, and this work is already done by kernel.
>
> In order to solve the prev problem I look through the intel manual
> http://download.intel.com/design/processor/manuals/253668.pdf ,and in
> chapter 3.1 I see this sentence "Segmentation provides a mechanism of
> isolating individual code, data, and stack modules so that multiple
> programs (or tasks) can run on the same processor without interfering with
> one another." then this manual tell me that "There is no mode bit to
> disable segmentation. The use of paging, however, is optional." that is to
> say the segment mechanism must be support in the OS, but the page mechanism
> is optional, but at the manual I can't find any example to explain how to
> use the single segment mechanism to protect the different tasks to
> interfere with one another ,so I have a guess you just see.
> BTW, I try the 2.6.32.27 kernel version but nothing changed.
>
> Thanks
> Fan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121103/017389bf/attachment.html
More information about the Kernelnewbies
mailing list