Question about billing system - Minix

This is a discussion on Question about billing system - Minix ; Hi! As far as I understand the billing system, it works that way: If a billable process calls a service from a non-billable process, the ticks the non-billable process consumes is billed on the billable process in system-time. Correct? 2 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Question about billing system

  1. Question about billing system

    Hi!

    As far as I understand the billing system,
    it works that way:
    If a billable process calls a service from
    a non-billable process, the ticks the non-billable
    process consumes is billed on the billable
    process in system-time. Correct?
    2 questions about this:
    1) A common case for this example would be
    a user process calling a server, right?
    2) Why are there 2 different billing systems,
    is this used in the scheduling or just for
    statistics?

    thx in advance
    Bernhard

  2. Re: Question about billing system

    > As far as I understand the billing system, it works that way:
    > If a billable process calls a service from a non-billable
    > process, the ticks the non-billable process consumes is billed
    > on the billable process in system-time. Correct?


    Yes. Unfortunately, accounting in a multiserver system is complicated, and
    this is not bullet-proof. Suppose process A requested I/O and the driver
    is blocked waiting for an interrupt, process B may be scheduled in
    between. Now, when the interrupt occurs, the bill pointer points to user
    process B, while the driver continues doing work on behalf of process A.

    > 1) A common case for this example would be
    > a user process calling a server, right?


    Yes.

    > 2) Why are there 2 different billing systems,
    > is this used in the scheduling or just for
    > statistics?


    There is billing for scheduling: the quantum of a user process is
    decremented; when it becomes zero, another process is scheduled in a
    round-robin fashion.

    Furthermore, user and system times are accumulated for each process. (This
    is done in the kernel. The PM also accumulates the total child user and
    system times at the parent whenever a process exits.) These times are, for
    example, used for the 'time' utility.

    Jorrit

+ Reply to Thread