Thread: Virtual memory in user space (Operting Systems)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Perhaps you should have just asked "possible to get rid of the 'lands'?"... Seriously, why?

    Oh yes, we want to be doing that, it was such a good idea 20 years ago.

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by zacs7 View Post
    Perhaps you should have just asked "possible to get rid of the 'lands'?"... Seriously, why?
    The usual justifications are either performance (minimising overhead) or making life easier for the programmer (enabling simpler methods rather than complex APIs with their pesky error checking). Problem is, those benefits usually come at the expense of reliability - programmers have demonstrated convincingly that they cannot be trusted to ensure system integrity if they have access to system resources from userland code.

    Quote Originally Posted by zacs7 View Post
    Oh yes, we want to be doing that, it was such a good idea 20 years ago.
    Indeed. In the days of MS-DOS and early versions of windows that ran on top of DOS (up to windows version 3.11 IIRC) all memory on the machine was accessible from user-mode code. One notable characteristic of those systems is that they were unable to protect themselves from actions of running programs. Quite a few programs were written, accidentally or deliberately, that could easily crash the system, overwrite memory being used by other programs, and also do things like reformat hard drives without confirmation.

    Protected mode processors, memory management units, kernel mode, etc were designed to prevent user-land processes from having unfettered access to system resources that might be used by other processes (whether physical or virtual). One of the arts of modern operating system design is selecting what actions are permitted in "user mode" versus those that are permitted in "kernel mode".

    So, in answer to the original question, yes it would be possible to design an operating system that places system memory management into user space. That would run completely at odds with the way things have developed over the last 20 years or so (the trends have been to increasingly prevent user programs from managing system memory). It would probably be easier to tailor your own operating system, rather than attempting to modify a modern operating system to allow it, as most modern operating systems are specifically designed to do the opposite.
    Last edited by grumpy; 05-04-2011 at 02:21 AM.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. NUMA Virtual Adress Space / Physical Adress Space
    By NUMA Orly in forum Windows Programming
    Replies: 0
    Last Post: 03-14-2011, 03:19 AM
  2. Max Out Virtual Memory Space
    By newbe in forum Windows Programming
    Replies: 0
    Last Post: 05-06-2010, 10:46 AM
  3. user space control for device driver
    By itisravi in forum Linux Programming
    Replies: 5
    Last Post: 03-02-2010, 02:17 PM
  4. Replies: 2
    Last Post: 09-28-2006, 01:06 PM
  5. space problem with user input
    By codebrawler in forum C++ Programming
    Replies: 5
    Last Post: 01-08-2006, 02:01 PM