l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: personal webpage for L4-Hurd


From: OKUJI Yoshinori
Subject: RE: personal webpage for L4-Hurd
Date: Fri, 24 Nov 2000 02:04:48 +0900

From: Volkmar Uhlig <address@hidden>
Subject: RE: personal webpage for L4-Hurd
Date: Thu, 23 Nov 2000 17:35:48 +0100

> you write on your web-page:
> "One thing which I find cannot be realized in current L4 is that it doesn't
> provide sufficient information on elapsed time. This is necessary especially
> for profiling, but L4 doesn't tell how amount of time is used for a certain
> thread (e.g. system time in Mach). I think the L4 API should be extended."
> 
> That is not true. Have a look at the thread_schedule syscall which provides
> the time consumed by a thread.

  Thanks for your suggestion, but I don't think so. In GNU Mach, this
is defined in include/mach/thread_info.h:

struct thread_basic_info {
        time_value_t    user_time;      /* user run time */
        time_value_t    system_time;    /* system run time */
        integer_t       cpu_usage;      /* scaled cpu usage percentage */
        integer_t       base_priority;  /* base scheduling priority */
        integer_t       cur_priority;   /* current scheduling priority */
        integer_t       run_state;      /* run state (see below) */
        integer_t       flags;          /* various flags (see below) */
        integer_t       suspend_count;  /* suspend count for thread */
        integer_t       sleep_time;     /* number of seconds that thread
                                           has been sleeping */
        time_value_t    creation_time;  /* time stamp of creation */
};

As you see, Mach distinguishes user-level run time from system-level
run time consumed by each thread. AFAIK, thread_schedule returns only
one run time value (it is not clear whether the value should be total
run time or user-level run time, though). This means that you cannot
implement ITIMER_PROF or ITIMER_VIRTUAL in Unix correctly.

Okuji



reply via email to

[Prev in Thread] Current Thread [Next in Thread]