Scheduler and CPU performance controller cooperation

    公开(公告)号:US10437639B2

    公开(公告)日:2019-10-08

    申请号:US15786466

    申请日:2017-10-17

    Applicant: Apple Inc.

    Abstract: In one embodiment, an application programming interface (API) is defined that enables a thread scheduler to communicate thread information to the CPU performance controller when dispatching a thread to a processor or processor core. When dispatching a thread, the scheduler may communicate thread information including thread state information, a general “importance” of the thread as defined by a priority level and/or quality of service (QoS) classification, a measurement of the scheduler dispatch latency for the thread, or architectural information regarding the instructions within the thread, such as whether the thread is contains 64-bit or 32-bit instructions. The performance controller can use the information provided by the scheduler to make performance control decisions for the processor cores within the system.

    Hand-off scheduling
    12.
    发明授权

    公开(公告)号:US10310891B2

    公开(公告)日:2019-06-04

    申请号:US14871837

    申请日:2015-09-30

    Applicant: Apple Inc.

    Abstract: Disclosed herein are systems, methods, and computer-readable media directed to scheduling threads in a multi-processing environment that can resolve a priority inversion. Each thread has a scheduling state and a context. A scheduling state can include attributes such as a processing priority, classification (background, fixed priority, real-time), a quantum, scheduler decay, and a list of threads that may be waiting on the thread to make progress. A thread context can include registers, stack, other variables, and one or more mutex flags. A first thread can hold a resource with a mutex, the first thread having a low priority. A second thread having a scheduling state with a high priority can be waiting on the resource and may be blocked behind the mutex held by the first process. A scheduler can execute the context of the lower priority thread using the scheduler state of the second, higher priority thread. More than one thread can be waiting on the resource held by the first thread. A “pusher list” of threads that are waiting on the first thread can be associated with the first thread. The scheduler can use the pusher list to identify threads that need the first thread to make progress until the first thread releases the resource and mutex. Then, the scheduler can use the pusher list to identify threads that are now runnable and make immediate use of the resource.

    MICROSTACKSHOTS
    15.
    发明申请

    公开(公告)号:US20140237219A1

    公开(公告)日:2014-08-21

    申请号:US13842938

    申请日:2013-03-15

    Applicant: APPLE INC.

    CPC classification number: G06F11/366 G06F11/0706 G06F11/079

    Abstract: A method and apparatus of a device that captures a stackshot of an executing process is described. In an exemplary embodiment, the device detects an interrupt of the process occurring during the execution of the process, where the process execution can be in a kernel space and user space, and the interrupt occurs during the user space. The device further determines whether to capture a stackshot during the interrupt using a penalty function. If the stackshot is to be captured, the device captures the stackshot and saves the stackshot.

    Abstract translation: 描述捕获执行过程的堆叠的设备的方法和装置。 在示例性实施例中,设备检测在执行过程期间发生的过程的中断,其中过程执行可以在内核空间和用户空间中,并且在用户空间期间发生中断。 该设备进一步确定在使用惩罚功能的中断期间是否捕获堆叠。 如果要捕获stackshot,设备将捕获stackshot并保存stackshot。

Patent Agency Ranking