Question:
Order the following computer operations from slow to fast?
Omrik
2006-08-02 09:42:09 UTC
read cpu registry
disk read
context switch
read from memory
Fifteen answers:
Arkangyle
2006-08-02 10:13:43 UTC
Disk Access (slowest)

Context Switch

Memory Access

Register Access (fastest)





There are some potential variances in these :



Disk access may be significantly faster at times due to caching ... so can memory access (CPUs sometimes manage a caches from main memory to help speed up access and avoid competition for the bus).



Memory access could also be as slow or slightly slower than disk access at times, due to virtual memory page swapping.



Context switching needs to be extremely fast in general ... if it was slow then your CPU could begin to spend more time switching between processes than actually performing meaningful work when several processes are running concurrently.



Register access is nearly instantaneous.
2006-08-02 09:45:11 UTC
1 2 3 4
Plasmapuppy
2006-08-02 09:44:34 UTC
Consider what operations are involved in each case and to what extreme you consider.



Slowest: Context switch. Must make several CPU changes. Can require several CPU cycles. Store state and load new routine. http://en.wikipedia.org/wiki/Context_switch



Next: Read disk (HDD). Must go out to a peripheral device. Disk must spin to access the portion to be read. Data is being duffered to the CPU.



Next: Read from memory. RAM is faster than HDD. Data must be read in.



Fastest: Read CPU registry. This can be done within a single CPU cycle.



It is actually impossible to determine exactly where to place "context switch" since it depends upon your processor and how much change is necessary. In the minimum case, it is generally faster to read one byte from the HDD or memory cache than do a context switch where you store your state and load a new routine.
kurtrisser
2006-08-02 09:49:12 UTC
disk read - if of course the slowest.

context switch - what kind of context switch? are you talking about bank switching?

read from memory - this is a little slower than reading a CPU register.

read cpu registry - if you mean register, this is fastest.
ginger
2016-08-23 07:24:09 UTC
I asked the same question 2 times, and haven't got an answer
sanangel
2006-08-02 09:48:51 UTC
i do not know what you mean but i have a program called tune up your computer and it can do it all.. and it is free for 30 days..it is called tune up utilities..gets rid of mistakes on your computer, optimiser of your computer..tells you how much memory your computer is using..cleans disk and hard drives..defragments your computer ...i think you should check into this...
2006-08-02 09:47:30 UTC
disk read

context switch

read from memory

read cpu registry
Thor
2006-08-02 09:45:09 UTC
disk read

context switch

read cpu registry

read from memory
2006-08-02 09:48:13 UTC
context switch

disk read

read from memory

read cpu registry



... you get the benefit of doubt...
dtstuff9
2006-08-02 09:46:01 UTC
disk read

read from memory

context switch (no clue what this is)

read cpu registry
bloo435
2006-08-02 09:46:18 UTC
disk read => needs mechanical action

context switch => needs to read all registries from memory

read from memory => one memory access

read cpu registry => zero memory access
noreen
2016-09-20 14:24:24 UTC
Haven't thought too much about this
2016-08-08 11:49:42 UTC
Haven't ever thought about it in that way to be honest
self0dest0
2006-08-02 09:45:25 UTC
you frased it as a question but thats not really a question so im not going to answer you
2006-08-02 09:45:21 UTC
1,3,4,2


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...