servers entry point - Minix

This is a discussion on servers entry point - Minix ; Hi Question is simple. I just want to know how does kernel find entry points of services which it is going to run at start up. struct boot_image image[] define all such services but "initial_pc" field for some services is ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: servers entry point

  1. servers entry point

    Hi

    Question is simple. I just want to know how does kernel find entry
    points of services which it is going to
    run at start up.

    struct boot_image image[] define all such services but "initial_pc"
    field for some services is empty.

    I think should be defined later by "installboot" util, but how is it
    exactly doing?

    Thx.

    Al.


  2. Re: servers entry point

    All,

    > Question is simple. I just want to know how does kernel find entry
    > points of services which it is going to
    > run at start up.
    >
    > struct boot_image image[] define all such services but "initial_pc"
    > field for some services is empty.


    IDLE, CLOCK and SYSTEM run in the kernel address space and so their
    entry points within their address space is known and is in the table.

    HARDWARE doesn't have any code, has no entry point, and is never
    scheduled (it's an explicit exception in kernel/main.c).

    The entry point for the other processes is in fact 0 (relative to their
    code segment of course - if I&D are shared, code comes first).

    =Ben



  3. Re: servers entry point


    Ok it sounds good, I've lost that 0 also can be correct initial
    program counter's value.
    But all services and kernel are combined in one image by
    "installboot"
    Who and how ( which code? ) finds exact service, finds and loads
    its segments from image ?

    I just want to add one another servers and looking for pitfalls which
    can be met.

    My be someone can suggest way for doing its properly.

    How to add one small service, perhaps for serving some request from
    userspace sent via "int XXX"?

    Thx,

    Alex.






  4. Re: servers entry point

    In article <1172600263.720719.113430@s48g2000cws.googlegroups. com>,
    wrote:
    >
    >Ok it sounds good, I've lost that 0 also can be correct initial
    >program counter's value.


    Each process gets its own text segment (well, they can be shared for
    separate I&D), and offset 0 is a valid starting point.

    >But all services and kernel are combined in one image by
    >"installboot"
    >Who and how ( which code? ) finds exact service, finds and loads
    >its segments from image ?


    The boot monitor knows about the structure of the image, loads all segments
    into memory and provides the kernel with a table that contains the locations
    of those segments.

    >I just want to add one another servers and looking for pitfalls which
    >can be met.
    >
    >My be someone can suggest way for doing its properly.
    >
    >How to add one small service, perhaps for serving some request from
    >userspace sent via "int XXX"?


    In Minix 3, new services are started at runtime using the 'service'
    command.

    In the unlikely event that you have to add another service to the image,
    you can add the name of the executable to the list passed to installboot,
    and you have to change the constants for the process numbers to match
    the new layout of the image (INIT has to be last). And you may have to
    change a few tables as well.

    It's better to use the service command.


    --
    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

  5. Re: servers entry point

    > The boot monitor knows about the structure of the image, loads all segments
    > into memory and provides the kernel with a table that contains the locations
    > of those segments.


    Where can I find description of the interface between monitor and the
    kernel (header file)? (I am a little bit lazy )

    And am I right what only services form kernel set (like ps and fs) are
    able to have
    access to user process memory directly? Or even in this case they can
    only pass data to the userspace through
    messeging?

    Al.


  6. Re: servers entry point

    In article <1172650814.481916.311670@m58g2000cwm.googlegroups. com>,
    wrote:
    >> The boot monitor knows about the structure of the image, loads all segments
    >> into memory and provides the kernel with a table that contains the locations
    >> of those segments.

    >
    >Where can I find description of the interface between monitor and the
    >kernel (header file)? (I am a little bit lazy )


    I think somebody documented the boot monitor, but have to google for it.

    >And am I right what only services form kernel set (like ps and fs) are
    >able to have
    >access to user process memory directly? Or even in this case they can
    >only pass data to the userspace through
    >messeging?


    Only the actual kernel (the system task in Minix 3) has direct access
    to other processes' memory. All other servers/drivers have to ask the system
    task. The message passing mechanism in Minix does not support bulk data
    transfers.


    --
    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