Privilege Levels - Minix

This is a discussion on Privilege Levels - Minix ; Hi! I am not quite sure, why the servers and the user applications run in the same privilege level of the cpu. Taking a look at the Intel Architecture Manuals, I would say it is cheaper (no privilege check, no ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Privilege Levels

  1. Privilege Levels

    Hi!

    I am not quite sure, why the servers and the user
    applications run in the same privilege level of
    the cpu.
    Taking a look at the Intel Architecture Manuals,
    I would say it is cheaper (no privilege check,
    no stack switch) for user level processes to
    interact with the servers and/or it is just
    not necessary to have them run in different
    levels.
    Or is it for compability reasons? (I don't think
    so.)

    ftp://download.intel.com/design/Pent...s/25366517.pdf
    page 160-162
    from here:
    http://www.intel.com/design/pentium4.../index_new.htm

    thx in advance
    Bernhard

  2. Re: Privilege Levels

    Bernhard Kast wrote:
    > Hi!
    >
    > I am not quite sure, why the servers and the user
    > applications run in the same privilege level of
    > the cpu.
    > Taking a look at the Intel Architecture Manuals,
    > I would say it is cheaper (no privilege check,
    > no stack switch) for user level processes to
    > interact with the servers and/or it is just
    > not necessary to have them run in different
    > levels.
    > Or is it for compability reasons? (I don't think
    > so.)
    >
    > ftp://download.intel.com/design/Pent...s/25366517.pdf
    > page 160-162
    > from here:
    > http://www.intel.com/design/pentium4.../index_new.htm
    >
    > thx in advance
    > Bernhard


    So you'd rather have the servers run in kernel-mode?

    Miix 3 uses a Microkernel where only a little tiny bit of code runs in
    kerel-mode the rest is user-mode.

    Microkernel. Say it, biatch.

  3. Re: Privilege Levels

    Hello

    I think there is an issue with vocabulary here.
    I don't understand what are the "servers" that you mention.
    Usually "servers" are either physical or logical entities that answers to
    client queries. There are simple servers like HTTP and complex servers like
    multimedia servers.
    If you mean OS parts as "servers", then you must remenber that Minix is not
    a complex OS.
    Minix is very reminiscent of Unix on PDP11 architecture without MM. You can
    find traces of this by the vocabulary "user mode", "kernel mode", use of
    chmem which imply a very simple memory allocation for processes.
    At that time you do not use more than one program at a time as a user.
    Unix was intended to make time sharing not multi tasking, i.e. process
    switch is awkward the process must be copied integrally somewhere else, then
    the new process is launched.
    Many interprocess means was offered at that time (IPC, pipes, shared
    memory). But it was not satisfying developpers.
    The main reason is the lack of virtual memory which forbid to share some
    code between different processes.
    Threads came later with more complex CPU. Many attemps where done in the 80'
    BSD, Chorus, Amoeba.
    Threads are offered commercially since the beginning of the 90'.
    To offer threads you need a CPU with MMU.

    Another thing driving the use of complex CPU is the fact that the lowering
    prices of hardware enables:
    - At end user level: The ability to launch multiple applications
    simultaneously and paste and cut data between them making productivity
    jumping far ahead.
    - At IT staff level the ability to specialize computers in server or client
    (workstation) role, to simplify user care and deployment of new applications
    lowering TCO.
    - The use of more abstracted programming paradigm, COM/Corba, simple Object
    languages with garbage collectors like Java, lowering the cost of
    developpement, script languages with dynamic and/or weak typing that are
    awful to a computer scientist but understandable by a mere human being.

    As users and managers waited for communicating processes and/or computers,
    complex CPU where produced.
    These CPU where able to enable processes to communicate in a (relatively)
    secure manner.
    Pentium IV is an incredible giant when you compare it to a PDP11.
    It's not fair to compare Minix CPU model with a PentiumIV.
    Minix is more oriented toward appliances (only one application running
    without needing care or administration) and education.

    A good description of this all is there:
    http://www.prenhall.com/divisions/es...e/right_3.html

    One final thing, I am not sure that the OS design culminates with Posix
    compliant with internal Coba and (X-)Windows of the infernal duo
    Windows/Linux.
    In fact I find Linux boring in it's cloning obsession (after Unix, now its
    more and more MS Windows-ish).
    It remains to see if it have any interest to work at improving OS design
    with today's Googlarization of IT.

    One good thing that Minix can bring is putting very different research ideas
    of this century, like Multimedia Roma OS, on a larger audience.
    Other research ideas would be Semantic Web integration at the OS level.
    In the past interesting OSes have also been killed by Unix, like Pick OS,
    where there was no file system but a huge database. Unfortunately you had to
    learn programming and Database to use it. But if you combine a modern
    requesting UI with that idea it's quite funny.
    Other ideas would be to make tiny OS inside bigger OS to tackle with
    unsecure tasks like browsing the Web.
    (please don't mention Plan9 or grid computing :-)

    Jean-Pierre


    "Bernhard Kast" a écrit dans le message de
    news:43922fce$0$708$79720d31@newsreader.inode.at.. .
    > Hi!
    >
    > I am not quite sure, why the servers and the user
    > applications run in the same privilege level of
    > the cpu.
    > Taking a look at the Intel Architecture Manuals,
    > I would say it is cheaper (no privilege check,
    > no stack switch) for user level processes to
    > interact with the servers and/or it is just
    > not necessary to have them run in different
    > levels.
    > Or is it for compability reasons? (I don't think
    > so.)
    >
    > ftp://download.intel.com/design/Pent...s/25366517.pdf
    > page 160-162
    > from here:
    > http://www.intel.com/design/pentium4.../index_new.htm
    >
    > thx in advance
    > Bernhard




  4. Re: Privilege Levels

    > So you'd rather have the servers run in kernel-mode?
    no, sorry I forgot to mention the following:

    protect.h
    #define INTR_PRIVILEGE 0 /* kernel and interrupt handlers */
    #define TASK_PRIVILEGE 1 /* kernel tasks */
    #define USER_PRIVILEGE 3 /* servers and user processes */

    to be more exactly, why the servers are not running in
    Privilege level 2 (ring 2 for the cpu)?
    (I understand, why the server is not running
    in privilege level 0 and 1.)

    Bernhard


    Segin wrote:
    > Bernhard Kast wrote:
    >
    >> Hi!
    >>
    >> I am not quite sure, why the servers and the user
    >> applications run in the same privilege level of
    >> the cpu.
    >> Taking a look at the Intel Architecture Manuals,
    >> I would say it is cheaper (no privilege check,
    >> no stack switch) for user level processes to
    >> interact with the servers and/or it is just
    >> not necessary to have them run in different
    >> levels.
    >> Or is it for compability reasons? (I don't think
    >> so.)
    >>
    >> ftp://download.intel.com/design/Pent...s/25366517.pdf
    >> page 160-162
    >> from here:
    >> http://www.intel.com/design/pentium4.../index_new.htm
    >>
    >> thx in advance
    >> Bernhard

    >
    >
    > So you'd rather have the servers run in kernel-mode?
    >
    > Miix 3 uses a Microkernel where only a little tiny bit of code runs in
    > kerel-mode the rest is user-mode.
    >
    > Microkernel. Say it, biatch.


  5. Re: Privilege Levels

    Hi!

    eeh, well I think there is some sort of misunderstanding
    around here, with servers I meant the "servers in Minix".

    http://www.minix3.org/doc/AppendixB....RIVILEGE-05843
    #define INTR_PRIVILEGE 0 /* kernel and interrupt handlers */
    #define TASK_PRIVILEGE 1 /* kernel tasks */
    #define USER_PRIVILEGE 3 /* servers and user processes */

    In Minix the filesystem, memory management etc. are called
    servers, because the provide a service, well it is a
    microkernel.
    > If you mean OS parts as "servers", then you must remenber that Minix
    > is not a complex OS.

    well, sorry I didn't give them the name and from my OS
    knowledge it was logically that they are called servers,
    therefore I wasn't more specific.

    Bernhard


    Jean-Pierre Le Rouzic wrote:
    > Hello
    >
    > I think there is an issue with vocabulary here.
    > I don't understand what are the "servers" that you mention.
    > Usually "servers" are either physical or logical entities that answers to
    > client queries. There are simple servers like HTTP and complex servers like
    > multimedia servers.
    > If you mean OS parts as "servers", then you must remenber that Minix is not
    > a complex OS.
    > Minix is very reminiscent of Unix on PDP11 architecture without MM. You can
    > find traces of this by the vocabulary "user mode", "kernel mode", use of
    > chmem which imply a very simple memory allocation for processes.
    > At that time you do not use more than one program at a time as a user.
    > Unix was intended to make time sharing not multi tasking, i.e. process
    > switch is awkward the process must be copied integrally somewhere else, then
    > the new process is launched.
    > Many interprocess means was offered at that time (IPC, pipes, shared
    > memory). But it was not satisfying developpers.
    > The main reason is the lack of virtual memory which forbid to share some
    > code between different processes.
    > Threads came later with more complex CPU. Many attemps where done in the 80'
    > BSD, Chorus, Amoeba.
    > Threads are offered commercially since the beginning of the 90'.
    > To offer threads you need a CPU with MMU.
    >
    > Another thing driving the use of complex CPU is the fact that the lowering
    > prices of hardware enables:
    > - At end user level: The ability to launch multiple applications
    > simultaneously and paste and cut data between them making productivity
    > jumping far ahead.
    > - At IT staff level the ability to specialize computers in server or client
    > (workstation) role, to simplify user care and deployment of new applications
    > lowering TCO.
    > - The use of more abstracted programming paradigm, COM/Corba, simple Object
    > languages with garbage collectors like Java, lowering the cost of
    > developpement, script languages with dynamic and/or weak typing that are
    > awful to a computer scientist but understandable by a mere human being.
    >
    > As users and managers waited for communicating processes and/or computers,
    > complex CPU where produced.
    > These CPU where able to enable processes to communicate in a (relatively)
    > secure manner.
    > Pentium IV is an incredible giant when you compare it to a PDP11.
    > It's not fair to compare Minix CPU model with a PentiumIV.
    > Minix is more oriented toward appliances (only one application running
    > without needing care or administration) and education.
    >
    > A good description of this all is there:
    > http://www.prenhall.com/divisions/es...e/right_3.html
    >
    > One final thing, I am not sure that the OS design culminates with Posix
    > compliant with internal Coba and (X-)Windows of the infernal duo
    > Windows/Linux.
    > In fact I find Linux boring in it's cloning obsession (after Unix, now its
    > more and more MS Windows-ish).
    > It remains to see if it have any interest to work at improving OS design
    > with today's Googlarization of IT.
    >
    > One good thing that Minix can bring is putting very different research ideas
    > of this century, like Multimedia Roma OS, on a larger audience.
    > Other research ideas would be Semantic Web integration at the OS level.
    > In the past interesting OSes have also been killed by Unix, like Pick OS,
    > where there was no file system but a huge database. Unfortunately you had to
    > learn programming and Database to use it. But if you combine a modern
    > requesting UI with that idea it's quite funny.
    > Other ideas would be to make tiny OS inside bigger OS to tackle with
    > unsecure tasks like browsing the Web.
    > (please don't mention Plan9 or grid computing :-)
    >
    > Jean-Pierre
    >
    >
    > "Bernhard Kast" a écrit dans le message de
    > news:43922fce$0$708$79720d31@newsreader.inode.at.. .
    >
    >>Hi!
    >>
    >>I am not quite sure, why the servers and the user
    >>applications run in the same privilege level of
    >>the cpu.
    >>Taking a look at the Intel Architecture Manuals,
    >>I would say it is cheaper (no privilege check,
    >>no stack switch) for user level processes to
    >>interact with the servers and/or it is just
    >>not necessary to have them run in different
    >>levels.
    >>Or is it for compability reasons? (I don't think
    >>so.)
    >>
    >>ftp://download.intel.com/design/Pent...s/25366517.pdf
    >>page 160-162
    >>from here:
    >>http://www.intel.com/design/pentium4.../index_new.htm
    >>
    >>thx in advance
    >>Bernhard

    >
    >
    >


  6. Re: Privilege Levels

    In article <4392c88d$0$699$79720d31@newsreader.inode.at>,
    Bernhard Kast wrote:
    >protect.h
    >#define INTR_PRIVILEGE 0 /* kernel and interrupt handlers */
    >#define TASK_PRIVILEGE 1 /* kernel tasks */
    >#define USER_PRIVILEGE 3 /* servers and user processes */
    >
    >to be more exactly, why the servers are not running in
    >Privilege level 2 (ring 2 for the cpu)?
    >(I understand, why the server is not running
    >in privilege level 0 and 1.)


    Because, servers don't need any additional services from the CPU. Whether a
    process is a server or not is kept in the (kernel's) process table. The CPU
    doesn't have to be aware of the difference.


    --
    That was it. Done. The faulty Monk was turned out into the desert where it
    could believe what it liked, including the idea that it had been hard done
    by. It was allowed to keep its horse, since horses were so cheap to make.
    -- Douglas Adams in Dirk Gently's Holistic Detective Agency

+ Reply to Thread