Tag Info

New answers tagged

1

With ksh93 (which has a floating point $SECONDS and a builtin sleep) typeset -F SECONDS=0 typeset -i i=0 while true; do cmd sleep "$((++i - SECONDS))" done The same script will work with zsh as well but will invoke your system's sleep command. zsh has a zselect builtin, but with 1/100 resolution only.


0

The Hardware Clock is a clock that runs independently of any control program running in the CPU and even when the machine is powered off. The System Time is the time kept by a clock inside the Linux kernel. Some programs and fringe parts of the Linux kernel such as filesystems use the kernel timezone value. An example is the vfat filesystem. If the kernel ...


0

Ticks are interrupts generated by a hardware timer and occur at a regular interval determined by the CONFIG_HZ kernel configuration, which for most architectures can be configured when compiling the kernel. The tick interrupt is a per-CPU interrupt. Starting from Linux 2.6.21, the idle dynamic ticks feature can be configured by using the CONFIG_NO_HZ kernel ...


2

Well, first of all, the kernel chooses the best one automatically, it is usually TSC if it's available, because it's kept by the cpu and it's very fast (RDTSC and reading EDX:EAX). But that wasn't always the case, in the early days when the SMP systems were mostly built with several discrete cpus it was very important that the cpus where as "equal" as it ...



Top 50 recent answers are included