First, prefaceThe tick device layer in the time subsystem mainly involves kernel/time/tick-* related files, and the main content of this article is to describe the operating logic of the tick device layer from the level of high (not entangled in
First, tick device concept Introduction1. Data structureIn the kernel, use struct tick_device to abstract the tick device in the system, as follows:
struct Tick_device {struct Clock_event_device *evtdev;Enum Tick_device_mode mode;};
As
1 CPU hotspot Analysis positioning backgroundCPU resources are still very expensive, in order to feel this expensive, the current CPU price of resources:So for the program apes, it is necessary for the program to use CPU resources reasonably and
A time slice is the time that the CPU allocates to each program, and each thread is assigned a time period, called its time slice, that is, the time the process is allowed to run, so that the individual programs are simultaneously on the surface. If
Game server programs design the so-called tick mechanism in a unified manner. This mechanism generally has two purposes. One is that many business modules have regular processing needs, such: skill buff timing, time item check, timing to give
Http://ilinuxkernel.com/?cat=4Linux CPU Utilization principle and accuracy analysis1 CPU Usage Calculation principleUnder Linux/unix, CPU utilization is divided into user state, System State and idle state, which indicate the time that the CPU is in
This article describes how to use cgroups to restrict cpu resources in Linux to avoid a process occupying all CPU resources. For more information, see
This article describes how to use cgroups to manage cpu resources. Let's talk about the cpu usage
1. Indicator Range 1.1 User mode CPU utilization+ System Mode CPU UtilizationReasonable value: 60-85%, if the us+sy time in a multiuser system exceeds 85%, the process may take time to wait in the running queue, the response time and business
In linux, you can use top or vmstat to view the system's CPU usage. In most cases, the CPU usage is accurate, but in real-time linux systems with high time precision, the CPU usage measured by top may be inaccurate. The following uses the top
Linux core is an important time-related domain name or change. The following describes Hz, tick, and jiffies.
Hz
In Linux, the kernel sends the timer interrupt (IRQ 0) Every fixed period. Hz is used to determine that there are two times of timer
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.