News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Processor Temperature

Started by subhadeep_ghosh, August 22, 2005, 09:45:19 AM

Previous topic - Next topic

subhadeep_ghosh

Hey guys, I am new to this forum, but I've been using MASM32 for a long time now. The query that I have is not specific to MASM32 programming as such. I wanted to know if there was anyway by which I could find out the temperature of the microprocessor. Is there a Win32 API which does that or is there any processor instruction for that or any method of knowing that maybe. I would really appreciate you're effort.

The reason for knowing the processor temperature is to formulate a hardware dependent random number generating library which would generate random numbers depending on the processor temperature. I've already created a random number generator for windows, which generates the random number using the High Prescision Frequency Counter.

P1

That is a motherboard specific feature, of the which most do not offer. 

At one time, the AMD motherboards regularly included a termal shutdown circuit and this termal feedback from BIOS.

Please continue your random seed research with Google.

I have read there are some internet seed sources. 

I have thought that a library of random seed routines, with the use of a random & resource aware selector would work. 

The are new security chips have a hardware based seed generator. 

Have fun with this old problem!!!

Regards,  P1  :8)

ninjarider

i know the infinity motherboard that i have has that feature. i dont think computers that u by on the market have that feature mostly because there not going to be overclocked so theres no need to monitor the temp. any gaming motherboard should have it.

my board gives me each individual fan speed, processor temp, case temp, and all the voltage levels. interested in seeing your random number generators.

Mark Jones

One could create a small hardware LPT dongle which returns any length of truly random bits. A PIC or similar microcontroller could be used for interfacing/protocol if the port is to be shared with a printer, otherwise a dedicated LPT port would be easiest. Some of the newer PIC microcontrollers have USB support so a USB dongle is a possibility. Gotta code a driver though. In either case, get the bits from a reverse-biased base-emitter PN transistor junction (biased into the avalanche region.) In english that means that a commonplace transistor can be engineered to make white noise, perfect for RNG.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

subhadeep_ghosh

Mark, your idea seems to be good, eventhough I couldn't make out much of it. Coz I'm not that much into hardware to comprehend what you are saying. But what I think is that, if I use the LPT for providing a seed for my RNG, that would slow the generation speed. Thatz my personel opinion. The reason for that I think is that LPT is a legacy I/O port which is included in modern just for the sake of compatibility. Coz all the printers now-a-days use USB. The point I'm trying to make here is that legacy systems (I think) interface at a much slower rate than what is acceptable.

But I think USB is a good idea. But there is another question.

To use any port (either LPT or USB or anyother) dosen't the port need to be active ? Or is it that your idea will be applicable to even the passive ports.

By active I mean when the port is connected to a device and data is being transfered via the port.
By passive I mean that no data is being transfered via the port.

hutch--

Left,

The are a whole pile of sources for real world sampling to generate a random sequence seed from but you must have an interface of some type to pick it up. I have done reasonable ones with a mouse pad, subsonic rumbling or the universe as radio noise is one of the good ones but you have the option without exotic hadware of using a microphone as a sampler and playing with the input. Play a KYLIE CD through a bad hifi system while having a fan running and it will come out close to random noise.  :bg

If you have a nucear reactor handy, radioactive noise is supposed to be very good as a random sequence source.

I would be highly suspcious of anyting that comes out of a computer as it tends to be attached to all sorts of bits that have specific frequencies and predictable signal ranges.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Tedd

How about using the contents of hutch's postings to alt.lang.asm as a random number generator? :green2
No snowflake in an avalanche feels responsible.

subhadeep_ghosh

Hutch,

Those were few amazing ideas, and I've personally talked to the North Korean government to get me a few samples of pocket size nuclear reactors  :toothy.
And you're right, the data coming out of the computer is in a precdictable way, which is why I'm trying to gather information on the things going into the computer.
Like the thermal state of the micro processor and maybe the exact voltage of any of the processors. These are things which are not digitized and hence there is a good chance of them being of random nature. And they are also a part of the computer so an external device dosen't need to be added to gather information about them.

Thank you.

hutch--

 :bg

Tedd,

> How about using the contents of hutch's postings to alt.lang.asm as a random number generator?

Nah, the subject material is so grindingly boring that you would get a chi-squared test of either 1 or 100. I does not seem to matter what you post in there, nothing is capable of raising the dead so it is purely repetitive formula stuff. Now with a particular highly self acclaimed leading guru assembler author in there, if you could reliably plot the disposal of his main waste product in terms of frequency and fluid flow down his leg, you may end up with a graphable random source but the results would be slow.  :cheekygreen:
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Ratch


subhadeep_ghosh

Hey Guys,

I appreciate your time and the effort you guys have put in. Anyway after a bit of hunting I finally found out they method by which the different hardware parameters can be found out. But this method is only for Win32 (and above) users (afterall MASM32 is meant for these environments). All modern motherboards come with CPU heat sensors, and the Win32 API specifically has a class called the WMI (Windows Management Instrumentation) class, specifically designed for the purpose of probing the various properties of the different hardwares (CPU included).

For information on WMI, you could go to ... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_classes.asp

And for information on CPU temperature, you could go to ... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/computer_system_hardware_classes.asp

Thank you.

P1

Quote from: Left Of Right on August 24, 2005, 08:22:34 AMAll modern motherboards come with CPU heat sensors, and the Win32 API specifically has a class called the WMI (Windows Management Instrumentation) class, specifically designed for the purpose of probing the various properties of the different hardwares (CPU included).
I know of several that do not.  Just because it's offered in the API, does not mean it's available in the hardware.  Another example of this, is the implementation of DirectX/OpenGL with the feature is not available error.

Regards,  P1  :8)

subhadeep_ghosh

Hi P1,

You are right, not all motherboards come with the sensors I was talking about and if the API's for it are provided it dosen't mean that the function would be available. But what I was looking for was a method to access these parameters for the motherboards which have that provision, which was provided by these API's. Hence I've found what I was looking for...

This also means that, if I develope a RNG library based on these, it will not run on every computer. Which is fine, coz this is just an experiment I'm conducting to include physical parameters in my RNG library such that the random nature of the library increases. And I'm sure, most of the motherboards in the future will have some sort of a paramemter sensor or even the reading of the input voltage to any of the motherboard elements (including the CPU) could be used for the RNG seed.

Thank you.

dioxin

Mark,
Quote
One could create a small hardware LPT dongle which returns any length of truly random bits. A PIC or similar microcontroller could be used .. In either case, get the bits from a reverse-biased base-emitter PN transistor junction (biased into the avalanche region.) In english that means that a commonplace transistor can be engineered to make white noise, perfect for RNG.
A bit on the expensive side but someone beat you to it:
http://www.araneus.fi/products-alea-eng.html

Paul.

hutch--

Paul,

Nice looking toy, shame its so expensive.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php