Sponsored Content
Top Forums UNIX for Advanced & Expert Users The UNIX clock/timer interrupt Post 302958810 by Ultrix on Monday 26th of October 2015 02:50:33 PM
Old 10-26-2015
The UNIX clock/timer interrupt

The book The Design of the Unix Operating System speaks of a clock or timer that is used in scheduling. The clock generates interrupts that update priority information for processes and preempt processes in a round-robin fashion. It's apparent that this "clock" is not the same thing as the CPU clock, since is only generates 50 to 100 signals every second, as opposed to millions or billions of pulses a second. It's also apparent that it's not the same thing as the mechanism that keeps track of the date - that is to say, the number of seconds since midnight before January 1, 1970. So what exactly is it? Is it a pulse generator? Does it store a value that increments? Is it synced with the CPU clock somehow? How does it work? And how can it be "reset"?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

7 segement LCD unix clock

Hi, Anyone ever write a unix clock program that display the clock out in 7 segment LCD style. I tried doing one with case statements: !/usr/bin/ksh clock=`date` case $clock in #This prints out the number 0 0) echo " -" echo "| |" echo echo "| |" echo " -" ;; ... (4 Replies)
Discussion started by: Astudent
4 Replies

2. UNIX for Dummies Questions & Answers

erase and interrupt keys

This is on our Ultra 5/10 Sparc with Solaris 9. I need to store the following (stty) keys in the .profile and /etc/profile files as shown here. erase "Back Space Key" Interrupt "Ctrl + C" I need the exact syntax/procudure as I have to set these two keys whenever I login to the terminal... (1 Reply)
Discussion started by: chrs0302
1 Replies

3. UNIX for Dummies Questions & Answers

sincronization clock unix with windows server..

hi all... how i can sincronization clock solaris server with windows server....both servers i connected in the same network... thank you.... Best Regards... (4 Replies)
Discussion started by: chanfle
4 Replies

4. UNIX for Dummies Questions & Answers

timer interrupt

hello all since a process running in kernel mode cannnot be preempted by any other process what would be the status of Timer interrupt that occurs when the time quantum of a process is elapsed? thanks (2 Replies)
Discussion started by: compbug
2 Replies

5. UNIX for Dummies Questions & Answers

Clock in Unix using awk

Hey everyone! Can someone help me, i need to make a program using awk, that displays the current time (hh/mm/ss), i would really apreciate it! Thanks! Alex. (4 Replies)
Discussion started by: alex_omul
4 Replies

6. Shell Programming and Scripting

Sending an interrupt in a script?

Is it possible to sent a ^C interrupt via the command line? For example if I want to tail a log for 10 minutes at a time, kill the tail and then start it again is there a way to go about that? I would imagine there would be some way to do it by finding and killing the PID, but I'm curious if... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

7. UNIX for Dummies Questions & Answers

Real time of a clock for every 60 seconds in unix

hi can any one guide me on how to display real time of a clock in unix for every 60 seconds (2 Replies)
Discussion started by: ramnadh_babu
2 Replies

8. UNIX for Advanced & Expert Users

Interrupt storm detected on "irq 20" throttling interrupt source

I receive the following warning messages on a very new machine which has FreeBSD 8.1 x64 installed on it: Interrupt storm detected on "irq 20" throttling interrupt source It is unclear what this means and what its origins are (motherboard? CPU? RAM?). I can start the desktop and the message is... (4 Replies)
Discussion started by: figaro
4 Replies

9. UNIX for Advanced & Expert Users

Is there any shell command to show which interrupt handler handle which interrupt number?

Hi, all: Is there any shell command to show which interrupt handler handle which interrupt number in the system? li,kunlun (5 Replies)
Discussion started by: liklstar
5 Replies

10. UNIX for Advanced & Expert Users

Xt timer call, XtAppAddTimeout, hangs on system clock jump backwards

Hi, I've got an issue which I've been 'google-fu'ing without much luck. We have a legacy program which has been plagued by an issue for a long time and I've been tasked to investigate/fix. The program uses XMotif2.1 (required due to dependency on an old GUI designer) and runs on a RHEL7... (4 Replies)
Discussion started by: altrefrain
4 Replies
STRUCT 
HRTIMER(9) Driver Basics STRUCT HRTIMER(9) NAME
struct_hrtimer - the basic hrtimer structure SYNOPSIS
struct hrtimer { struct timerqueue_node node; ktime_t _softexpires; enum hrtimer_restart (* function) (struct hrtimer *); struct hrtimer_clock_base * base; unsigned long state; #ifdef CONFIG_TIMER_STATS int start_pid; void * start_site; char start_comm[16]; #endif }; MEMBERS
node timerqueue node, which also manages node.expires, the absolute expiry time in the hrtimers internal representation. The time is related to the clock on which the timer is based. Is setup by adding slack to the _softexpires value. For non range timers identical to _softexpires. _softexpires the absolute earliest expiry time of the hrtimer. The time which was given as expiry time when the timer was armed. function timer expiry callback function base pointer to the timer base (per cpu and per clock) state state information (See bit values above) start_pid timer statistics field to store the pid of the task which started the timer start_site timer statistics field to store the site where the timer was started start_comm[16] timer statistics field to store the name of the process which started the timer DESCRIPTION
The hrtimer structure must be initialized by hrtimer_init COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT HRTIMER(9)
All times are GMT -4. The time now is 12:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy