Thread-level resource usage measurement
AssigneeSap SE
InventorJan Dostert
Life of this patent
Estimating the term…
Abstract
Methods and apparatus, including computer program products, that implement thread-level resource usage measurement. A runtime system to run on top of a native operating system can be operable to perform operations including running threads; taking snapshots of usage of one or more resources in the runtime system, including taking a first snapshot corresponding to a start of execution a thread and a second snapshot corresponding to an end of execution of the thread, where the first snapshot is taken before the second snapshot; and calculating usage of the resources by the thread based on the snapshots. The threads can be running in a virtual machine and snapshots can be measurements of resources at the operating system level.
Claims21
A machine-readable storage medium containing instructions that, when executed, cause a machine to:
- start a user-level simulated thread scheduled by a runtime system, hereinafter a “green thread”, the runtime system running on top of an operating system, the green thread being visible to the runtime system as an independent process and not being visible to the operating system as part of a thread separate from a second process that includes the runtime system;
- take a first measurement of operating system resources used by, and corresponding to the start of, the green thread;
- end the green thread in the runtime system;
- take a second measurement of the operating system resources, after the first measurement and corresponding to the end of the green thread;
- and
- calculate the operating system resources usage of the green thread based on the first and second measurement.
A method composing:
- running a user-level simulated thread scheduled by a routine system, hereinafter a “green thread”, the runtime system running on top of a native operating system, the green thread being visible to the runtime system as an independent process and not being visible to the operating system as part of a thread separate from a second process that includes the runtime system;
- taking measurements of usage of one or more resources in the runtime system, the measurements comprising a first measurement corresponding to a start of execution of a first green thread and a second measurement corresponding to an end of execution of the first green thread, wherein the first measurement is taken before the second measurement and measurements are measurements of operating system resources usage by the first green thread;
- and
- calculating usage of the resources by the first green thread based on the first and second measurement.
A computing system comprising:
- a runtime system to take measurements of usage of one or more operating system resources, the measurements comprising a first measurement corresponding to a start of execution of a user-level simulated thread scheduled by a runtime system, hereinafter a “green thread”, a second measurement corresponding to an end of execution of the green thread, and a number of measurements taken between the first measurement and the second measurement, wherein the first measurement is taken before the second measurement and wherein each measurement corresponds to a point in a life of the green thread, and wherein the runtime system calculates the usage of the one or more resources by the green thread based on the measurements;
- an application program unit running in the runtime system, the application program unit to start a set of threads;
- and
- a storage unit to store the measurements and the calculated usage of the one or more resources used by the green thread based on the measurements.
Dependencies are inferred from the claim text.