def utilization (arrv):
    """Returns observed utilization of all queues in arrv."""
    max_d = 0
    tot_time = [0] * arrv.num_queues()
    for evt in arrv:
        max_d = max (evt.d, max_d)
        tot_time[evt.qid] += evt.s
    return [ x / max_d for x in tot_time ]