OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Sep 25, 2017 11:48 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: CPU Thermal Cutoff
PostPosted: Mon Sep 19, 2016 3:30 am 
Offline
Member
Member
User avatar

Joined: Tue Aug 02, 2016 1:52 pm
Posts: 286
Location: East Riding of Yorkshire, UK
Hi, it seems like every modern CPU automatically shuts off when it reaches a certain temperature (presumably to prevent damage).

Where is this handled? Additionally, is there a way for the user to disable it?

Thanks :)

_________________
com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
Compiler Development Forum


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Mon Sep 19, 2016 4:18 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8080
Location: At his keyboard!
Hi,

zenzizenzicube wrote:
Hi, it seems like every modern CPU automatically shuts off when it reaches a certain temperature (presumably to prevent damage).


For modern (80x86) CPUs there's 2 different things. The first throttles the CPU back when the temperature gets too high, and this is connected to a "thermal monitor" IRQ source in the local APIC so that the OS can re-balance load across CPUs or whatever.

The second is more of an emergency shutdown that's used when thermal throttling didn't work and CPU got "too much hotter than too hot". The OS isn't notified, and what actually happens in this case depends on motherboard/firmware (e.g. maybe "shutdown remaining CPUs and make PC speaker beep to inform user that OS power management failed to manage power", but maybe something completely different).

zenzizenzicube wrote:
Additionally, is there a way for the user to disable it?


It's faster/easier for the end user to unplug their CPU (and remove the heatsink) and bake it in their kitchen oven at 350 degrees Celsius for an hour (if the end user really does want to destroy their CPU with excessive heat).


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Mon Sep 19, 2016 4:40 am 
Offline
Member
Member
User avatar

Joined: Tue Aug 02, 2016 1:52 pm
Posts: 286
Location: East Riding of Yorkshire, UK
Brendan wrote:
The OS isn't notified, and what actually happens in this case depends on motherboard/firmware (e.g. maybe "shutdown remaining CPUs and make PC speaker beep to inform user that OS power management failed to manage power", but maybe something completely different).


So it could be possible for someone to flash new firmware with no thermal cutoff?

Brendan wrote:
It's faster/easier for the end user to unplug their CPU (and remove the heatsink) and bake it in their kitchen oven at 350 degrees Celsius for an hour (if the end user really does want to destroy their CPU with excessive heat).


If the CPUs can handle 350C for an hour, why do they tend to shut down a lot sooner?

Thank you for the response

_________________
com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
Compiler Development Forum


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Mon Sep 19, 2016 5:24 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8080
Location: At his keyboard!
Hi,

zenzizenzicube wrote:
Brendan wrote:
The OS isn't notified, and what actually happens in this case depends on motherboard/firmware (e.g. maybe "shutdown remaining CPUs and make PC speaker beep to inform user that OS power management failed to manage power", but maybe something completely different).


So it could be possible for someone to flash new firmware with no thermal cutoff?


No. If you create your own chipset, your own motherboard and your own firmware; then you can do something different when the CPU shuts itself down (but the CPU would still be shut down).

zenzizenzicube wrote:
Brendan wrote:
It's faster/easier for the end user to unplug their CPU (and remove the heatsink) and bake it in their kitchen oven at 350 degrees Celsius for an hour (if the end user really does want to destroy their CPU with excessive heat).


If the CPUs can handle 350C for an hour, why do they tend to shut down a lot sooner?


They can't handle 350C.

I'm just saying that there's easier ways to destroy the CPU than disabling the "shut down to prevent destruction" feature.


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Mon Sep 19, 2016 6:08 am 
Offline
Member
Member
User avatar

Joined: Thu Aug 11, 2005 11:00 pm
Posts: 1041
Location: Tartu, Estonia
This reminds me to this nice video:
http://www.youtube.com/watch?v=y39D4529FM4
BTW, my kitchen oven barely reaches 250°C ;)

_________________
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Mon Sep 19, 2016 2:20 pm 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1125
If you disable the CPU thermal cutoff, your CPU will probably melt in a few days, especially if you do a lot of processor-intensive work (gaming, complicated calculations, 3D rendering, compiling large code, etc.). CPUs slow themselves down to avoid overheating a lot more than you'd expect - think of the number of times your CPU fan is maxed out, and you keep pushing the CPU, if it didn't slow itself down it would overheat pretty quickly.

_________________
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing


Last edited by onlyonemac on Tue Sep 20, 2016 4:52 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Tue Sep 20, 2016 12:04 am 
Offline
Member
Member
User avatar

Joined: Wed Dec 01, 2010 3:41 am
Posts: 1721
Location: Hong Kong
If you really want to avoid thermal cutoff, instead of disabling the safety measures you would instead enforce heat removal like install liquid cooling system. Safety is not meant to be disabled.


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Tue Sep 20, 2016 7:41 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 366
Location: Serbia
Why would you do that? :roll:

_________________
Website


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Tue Sep 20, 2016 9:20 am 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1125
Lukand wrote:
Why would you do that? :roll:
So you can run the CPU faster.

_________________
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Tue Sep 20, 2016 9:40 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 366
Location: Serbia
Yes, running CPU faster by allowing it to run on 150 °C / 302 °F. Go try it. It will be so fast that screen would blackout and hang.
Shouldn't buying a better fan be better and THEN overclocking would be better?

_________________
Website


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Tue Sep 20, 2016 9:56 am 
Offline
Member
Member
User avatar

Joined: Tue Aug 02, 2016 1:52 pm
Posts: 286
Location: East Riding of Yorkshire, UK
Lukand wrote:
Why would you do that? :roll:


Mostly for fun.
I don't really trust myself with liquid nitrogen or similar so I figured that it would just be easier to try and prevent it shutting down when it gets too hot.

_________________
com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
Compiler Development Forum


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Tue Sep 20, 2016 1:01 pm 
Offline
Member
Member
User avatar

Joined: Wed Jul 13, 2011 7:38 pm
Posts: 523
Location: Victoria, Canada
The thermal throttling point on recent Intel chips is somewhere between 90 and 100 C. In that range, the CPU will start downclocking itself dynamically in order to maintain what it feels to be acceptable clocks with a maximum percentage of time spent at an overheated temperature. Its goal is to stay below 90 C, and it'll do that if possible.

You start to see dramatic clock drops if it spends too much time at 100 C, past which it will not allow itself to gain heat. If it spends too long at 100 C or manages to go significantly over that it'll shut down.

You cannot change this behaviour, and I highly stress that you should not attempt to circumvent it or run a process or above 85 C for any significant period of time. Go buy a $100 all-in-one closed loop liquid cooler and some decent thermal paste and you'll be able to run your system at a more than acceptable overclock for minimal mess without screwing with your thermals or requiring exotic cooling solutions.

_________________
The good thing about Unix is when it screws up, it does so very quickly.


Top
 Profile  
 
 Post subject: Re: CPU Thermal Cutoff
PostPosted: Tue Sep 20, 2016 3:56 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8080
Location: At his keyboard!
Hi,

Kazinsal wrote:
The thermal throttling point on recent Intel chips is somewhere between 90 and 100 C. In that range, the CPU will start downclocking itself dynamically in order to maintain what it feels to be acceptable clocks with a maximum percentage of time spent at an overheated temperature. Its goal is to stay below 90 C, and it'll do that if possible.

You start to see dramatic clock drops if it spends too much time at 100 C, past which it will not allow itself to gain heat. If it spends too long at 100 C or manages to go significantly over that it'll shut down.

You cannot change this behaviour, and I highly stress that you should not attempt to circumvent it or run a process or above 85 C for any significant period of time. Go buy a $100 all-in-one closed loop liquid cooler and some decent thermal paste and you'll be able to run your system at a more than acceptable overclock for minimal mess without screwing with your thermals or requiring exotic cooling solutions.


Note that while you can't (and shouldn't) change this behaviour; it's possible (and likely desirable) for an OS to take it into account. This could include keeping track of how quickly CPU temperature increases under load, and using this information to detect when CPU temperature is increasing at an abnormal rate and alert the user/admin of "suspected CPU fan/cooling system failure".

It can also include shifting CPU load to other CPUs if one is hotter than the others, and downclocking CPUs when running lower priority tasks; to reduce the chance of the CPU doing thermal throttling when you're running high priority tasks, and so that (when it's unavoidable) the transition is a more gradual "everything fast" to "some things slower" to "everything slower" (rather than an unexpected and sudden "everything fast" to "everything slower" change).

Also note that (for OS power management) things like fan speed/fan noise and (laptop or UPS) battery level are involved too, and CPU speed is just one factor in the OS's "performance vs. power consumption vs. fan noise" compromise. It's not as simple as "let's always try to do everything as fast as possible".


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group