Click here to Skip to main content
15,898,588 members
Home / Discussions / Hardware & Devices
   

Hardware & Devices

 
QuestionHow can load a driver in quiet mode-no system event log for the driver? Pin
chenayang29-Jul-08 22:26
chenayang29-Jul-08 22:26 
AnswerRe: How can load a driver in quiet mode-no system event log for the driver? Pin
vikas amin4-Aug-08 7:34
vikas amin4-Aug-08 7:34 
GeneralRe: How can load a driver in quiet mode-no system event log for the driver? Pin
chenayang4-Aug-08 14:32
chenayang4-Aug-08 14:32 
QuestionSoftware to scan for my maximum memory Pin
Mekong River29-Jul-08 18:45
Mekong River29-Jul-08 18:45 
AnswerRe: Software to scan for my maximum memory Pin
Dan Neely30-Jul-08 2:33
Dan Neely30-Jul-08 2:33 
GeneralRe: Software to scan for my maximum memory Pin
Mekong River5-Aug-08 17:11
Mekong River5-Aug-08 17:11 
QuestionCache or stack? Pin
MarkB77726-Jul-08 21:34
MarkB77726-Jul-08 21:34 
AnswerRe: Cache or stack? Pin
Luc Pattyn27-Jul-08 1:31
sitebuilderLuc Pattyn27-Jul-08 1:31 
Hi Mark,

cache and stack are completely different things.

A stack is a data structure intended to keep historic information, things get pushed on it, later on
popped from it, in reverse order.

Microprocessors typically contain the required logic in hardware to have an execution stack,
where each call of a subroutine/function/method (CALL, JSR, or whatever the assembly instruction is called)
automatically pushes the "program counter" (and possibly a bit more) onto the stack, and when
returning from the subroutine (RETURN, RTS, ... instruction) automatically pops the same information
from stack and restores it in the appropriate registers, so normal program flow can continue
where it left of before.

A cache is a data structure intended to keep a copy of existing information at hand, typically
to boost performance. Caches operate on a statistical basis; if they contain what is needed,
then all is good; if not, data is loaded from elsewhere, probably main memory.

Modern processors have an on-chip "level 1" cache (typically two, one for
data, one for code), and a "level 2" cache and sometimes the control logic for a "level 3" cache.
Each level has different sizes and speeds, level 1 being the smallest but fastest.
A typical example would be a CPU running at say 1 GHz, requiring 1 cycle to access one of its
registers, 2 cycles to read from its level 1 cache, 4 cycles to read from its level 2 cache,
and hundreds of cycles to read from main memory (main memory works at microsecond speeds, not
nanoseconds).


Conclusion: a stack is a logical entity, it holds specific information that is necessary for
correct execution; a cache holds a copy, and is used to speed up things.


BTW: extra stacks can be implemented by software (e.g. each thread in a system needs its own
stack); extra caches can also be implemented by software (e.g. results of a long computation may
be stored in a cache, so if they happen to be required again later on they might be found there).
Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Voting for dummies? No thanks. Dead | X|


GeneralRe: Cache or stack? Pin
MarkB77727-Jul-08 2:09
MarkB77727-Jul-08 2:09 
GeneralRe: Cache or stack? Pin
Luc Pattyn27-Jul-08 2:23
sitebuilderLuc Pattyn27-Jul-08 2:23 
QuestionPrinter Windows Spooler watch using c#.net Pin
CMC Ravi23-Jul-08 4:11
CMC Ravi23-Jul-08 4:11 
AnswerRe: Printer Windows Spooler watch using c#.net Pin
vikas amin24-Jul-08 10:55
vikas amin24-Jul-08 10:55 
QuestionPC restarts itself out from nowhere Pin
lahom22-Jul-08 9:34
lahom22-Jul-08 9:34 
GeneralRe: PC restarts itself out from nowhere Pin
launchck22-Jul-08 18:15
launchck22-Jul-08 18:15 
GeneralRe: PC restarts itself out from nowhere Pin
lahom24-Jul-08 12:08
lahom24-Jul-08 12:08 
AnswerRe: PC restarts itself out from nowhere Pin
launchck24-Jul-08 17:16
launchck24-Jul-08 17:16 
AnswerRe: PC restarts itself out from nowhere Pin
Mike Dimmick23-Jul-08 0:39
Mike Dimmick23-Jul-08 0:39 
GeneralRe: PC restarts itself out from nowhere Pin
belose_abhi24-Jul-08 21:56
belose_abhi24-Jul-08 21:56 
QuestionDetect Hardware changes in Windows Service. Pin
launchck20-Jul-08 18:49
launchck20-Jul-08 18:49 
AnswerRe: Detect Hardware changes in Windows Service. Pin
killabyte20-Jul-08 19:22
killabyte20-Jul-08 19:22 
GeneralRe: Detect Hardware changes in Windows Service. Pin
launchck20-Jul-08 19:31
launchck20-Jul-08 19:31 
GeneralRe: Detect Hardware changes in Windows Service. Pin
killabyte21-Jul-08 1:43
killabyte21-Jul-08 1:43 
GeneralRe: Detect Hardware changes in Windows Service. Pin
launchck21-Jul-08 1:55
launchck21-Jul-08 1:55 
GeneralRe: Detect Hardware changes in Windows Service. Pin
killabyte21-Jul-08 2:19
killabyte21-Jul-08 2:19 
GeneralRe: Detect Hardware changes in Windows Service. Pin
launchck21-Jul-08 2:43
launchck21-Jul-08 2:43 

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.