发明名称 Measuring by the kernel the amount of time a monitored thread spends in a queue in order to monitor scheduler delays in a computing device
摘要 In general, techniques of this disclosure relate to measuring scheduling performance of monitored threads in an operating system with improved precision. In one example, a method includes inserting, by an operating system kernel, a monitored thread into a queue comprising one or more threads and recording an insertion time that the monitored thread is inserted into the run queue; receiving, by the kernel, an event to remove the monitored thread from the run queue; responsive to receiving the event, determining, by the kernel, an amount of time that the monitored thread is stored on the run queue based on the insertion time and a removal time at which the monitored thread was removed from the run queue; and when the amount of time the monitored thread is stored on the run queue is greater than or equal to a specified threshold, sending a notification to a notification listener.
申请公布号 US8954968(B1) 申请公布日期 2015.02.10
申请号 US201113197589 申请日期 2011.08.03
申请人 Juniper Networks, Inc. 发明人 Pohl William N.;Suhas Suhas;Ronen Alon
分类号 G06F9/46;G06F11/34;G06F9/48 主分类号 G06F9/46
代理机构 Shumaker & Sieffert, P.A. 代理人 Shumaker & Sieffert, P.A.
主权项 1. A method comprising: storing, by a kernel of an operating system executing on a computing device, a flag associated with a monitored thread that causes the kernel to determine an amount of time that the monitored thread is stored on a queue, wherein the queue is at least one of a run queue or a sleep queue, wherein the queue stores a plurality of threads scheduled by the operating system for execution, the plurality of threads comprising the monitored thread and at least one thread that is not monitored; inserting, by the kernel of the operating system executing on the computing device, the monitored thread into the queue comprising the plurality of threads and recording an insertion time that the monitored thread is inserted into the queue; detecting, by the kernel of the operating system executing on the computing device, an event to remove the monitored thread from the queue; responsive to detecting the event, removing, by the kernel of the operating system, the monitored thread from the queue; responsive to removing the monitored thread, determining, by the kernel of the operating system executing on the computing device, an amount of time that the monitored thread is stored on the queue based on the insertion time and a removal time at which the monitored thread was removed from the queue, wherein determining the amount of time, by the kernel, comprises computing the amount of time to exclude time associated with system events comprising interrupts and memory allocations, from the amount of time the monitored thread is on the queue; and when the amount of time the monitored thread is stored on the queue is greater than or equal to a performance threshold, sending a notification to a notification listener to indicate a potential performance problem within the computing device.
地址 Sunnyvale CA US