-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Mar 23, 2007 at 09:37:53AM -0000, Martyn Welch wrote: > > -----Original Message----- > > From: kernelnewbies-bounce@xxxxxxxxxxxx > > [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of > > Bithika Khargharia > > Sent: 23 March 2007 05:08 AM > > To: kernelnewbies@xxxxxxxxxxxx > > Subject: OS Clock > > > > I have few hardware counters that I want to read data from > > every nano second. > > Hi Bithika, > > I think you need to look at the praticality of what you are asking. > > Reading 1 register every nano second would require reading it at a > frequency of 1GHz. Reading anything at this kind of rate would require > quite specialised hardware. Assuming that a current 3GHz CPU can do the read in 1 clock cycle (which it can't but let's just assume it can), you have 2 clock cycles left to do something useful with the value you read. You might just be able to write it to memory, assuming a memory write also happens in 1 clock cycle. But you can't take interrupts because entering the ISR already takes more than one clock cycle. You also can't have another CPU accessing memory at the same time because that will stall the CPU writing counter values. I agree with Martyn that you need some serious specialised hardware because a computer only reading a register every ns doesn't sound very useful to me. Erik - -- They're all fools. Don't worry. Darwin may be slow, but he'll eventually get them. -- Matthew Lammers in alt.sysadmin.recovery -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGA+g6/PlVHJtIto0RAtIfAKCOH5rvzcB3lVJACCfcGCk99TriKwCbBIUh Qekc/38yO40tAv0yQ1UiaVo= =UXpv -----END PGP SIGNATURE----- -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ