If I don't active the page mechanism
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? My view is to use the different base and limit in segment mechanism to divides different task, but this way will cause another problem that is the task which will run must have know which way another tasks line in the memery, if not ,this task may have Conflict with other tasks. If it is true, who can tell the infomation to the task? and if not, how to manage the Muit-tasking just use the segment mechanism? thanks Fan
Hi.. On Wed, Oct 31, 2012 at 9:30 PM, Fan Yang <lljyangfan@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
2012/11/1 Mulyadi Santosa <mulyadi.santosa@gmail.com>
Hi..
On Wed, Oct 31, 2012 at 9:30 PM, Fan Yang <lljyangfan@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
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@gmail.com>
2012/11/1 Mulyadi Santosa <mulyadi.santosa@gmail.com>
Hi..
On Wed, Oct 31, 2012 at 9:30 PM, Fan Yang <lljyangfan@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
Hi Fan yang :) On Sat, Nov 3, 2012 at 1:04 PM, Fan Yang <lljyangfan@gmail.com> wrote:
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.
I can't comment much on this, however I agree that paging is more efficient because you get page size granularity and all those features offered by paging, versus simply using segment based approach where you have to group memory area into continous ones. So, I think, the biggest problem in modern memory management using only segment based approach is tackling memory holes and lack of delayed disk reading. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
participants (2)
-
Fan Yang -
Mulyadi Santosa