Click here to Skip to main content
15,884,099 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
JokeMe: It's not about how many times you fall, it's about how you get back up. PinPopular
honey the codewitch19-Jan-23 10:37
mvahoney the codewitch19-Jan-23 10:37 
GeneralRe: Me: It's not about how many times you fall, it's about how you get back up. Pin
BernardIE531720-Jan-23 9:40
BernardIE531720-Jan-23 9:40 
GeneralA basic model for how a CPU works Pin
Calin Negru19-Jan-23 9:26
Calin Negru19-Jan-23 9:26 
GeneralRe: A basic model for how a CPU works PinPopular
PIEBALDconsult19-Jan-23 9:26
mvePIEBALDconsult19-Jan-23 9:26 
GeneralRe: A basic model for how a CPU works Pin
Calin Negru20-Jan-23 4:10
Calin Negru20-Jan-23 4:10 
GeneralRe: A basic model for how a CPU works Pin
Jeremy Falcon19-Jan-23 13:06
professionalJeremy Falcon19-Jan-23 13:06 
GeneralRe: A basic model for how a CPU works Pin
obermd19-Jan-23 13:34
obermd19-Jan-23 13:34 
GeneralRe: A basic model for how a CPU works Pin
trønderen19-Jan-23 15:32
trønderen19-Jan-23 15:32 
obermd wrote:
Also, the vast majority of processor instructions, even on a RISC machine, take more than one clock cycle.
But then again, thanks to pipelining, over time the average number of instructions executed per cycle is often close to one. Techniques such as 'hyperthreading' could even give you more than one instruction per cycle ... on the average, over time.

One consequence of all these speedup techniques, from pipelining/hyperthreading to speculative execution and extensive operand prefetching, is that the cost of an interrupt goes up and up, the more fancy the CPUs become. Some of it is (semi)hidden, e.g. when after interrupt handling you may have to redo the prefetch that was already done before the interrupt. The interrupt cost is more than the time from acknowledge of the interrupt signal to the handler return. You also have to count the total delays of the interrupted instruction stream, where several instructions might be affected.

At least early ARM processors were much closer to a 'direct' clock cycle to instruction relationship; its much more 'tidy' instruction set would allow it (and the gate count restrictions wouldn't allow all those fancy speedup techniques). This is compared to the x86 architecture and its derivatives, where you have to spend a million transistors on such functions to make the CPU fast enough.

Since the early ARMs, that architecture has been extended and extended and extended and ... Now it is so multi-extended that I feel I can only scratch the surface of the architecture. It probably, and hopefully, isn't (yet?) as messy as the X86 derivatives, but I am not one to tell. I fear the worst ...

I have a nagging feeling that if it was possible to start completely from scratch, it would be possible to build equally fast processors that didn't take a few billion transistors to realize. (Yes, I know that a fair share of those few billions go into the quite regular CPU caches - but those are part of the speedup expenses, too!) ARM was sort of 'a fresh start', but that is long ago. Multicore 64 bit ARM CPUs are quite different from those meant to replace 8051s ... I haven't had the time to look at RISC-V in detail yet; maybe that is another 'new start', not for replacing 8051, but aware of gigabyte RAM banks, 64 bit data and other modern requirement. I am crossing my fingers Smile | :)
GeneralRe: A basic model for how a CPU works Pin
Jeremy Falcon19-Jan-23 15:35
professionalJeremy Falcon19-Jan-23 15:35 
GeneralRe: A basic model for how a CPU works Pin
Calin Negru20-Jan-23 2:20
Calin Negru20-Jan-23 2:20 
GeneralRe: A basic model for how a CPU works Pin
kalberts20-Jan-23 9:12
kalberts20-Jan-23 9:12 
GeneralRe: A basic model for how a CPU works Pin
Calin Negru20-Jan-23 20:02
Calin Negru20-Jan-23 20:02 
GeneralRe: A basic model for how a CPU works Pin
kalberts20-Jan-23 8:59
kalberts20-Jan-23 8:59 
GeneralRe: A basic model for how a CPU works Pin
obermd19-Jan-23 13:34
obermd19-Jan-23 13:34 
GeneralRe: A basic model for how a CPU works Pin
Calin Negru20-Jan-23 2:26
Calin Negru20-Jan-23 2:26 
GeneralRe: A basic model for how a CPU works Pin
englebart19-Jan-23 15:16
professionalenglebart19-Jan-23 15:16 
GeneralRe: A basic model for how a CPU works Pin
jmaida19-Jan-23 16:53
jmaida19-Jan-23 16:53 
GeneralRe: A basic model for how a CPU works Pin
englebart20-Jan-23 7:04
professionalenglebart20-Jan-23 7:04 
GeneralRe: A basic model for how a CPU works Pin
jmaida20-Jan-23 7:27
jmaida20-Jan-23 7:27 
GeneralRe: A basic model for how a CPU works Pin
kalberts20-Jan-23 9:48
kalberts20-Jan-23 9:48 
GeneralRe: A basic model for how a CPU works Pin
englebart20-Jan-23 15:18
professionalenglebart20-Jan-23 15:18 
GeneralRe: A basic model for how a CPU works Pin
kalberts20-Jan-23 8:39
kalberts20-Jan-23 8:39 
GeneralRe: A basic model for how a CPU works Pin
jmaida20-Jan-23 9:47
jmaida20-Jan-23 9:47 
GeneralRe: A basic model for how a CPU works Pin
BillWoodruff19-Jan-23 18:08
professionalBillWoodruff19-Jan-23 18:08 
GeneralRe: A basic model for how a CPU works Pin
Calin Negru19-Jan-23 23:49
Calin Negru19-Jan-23 23:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.