operating system - About CPU operation and I/O processing -
my question why want have cpu's operation overlap of i/o processing. have been thinking optimization , such yet arrive @ conclusion.
if able answer question, great. :d
i/o slow compared operating frequency of cpu.
suppose have 1ghz cpu that's capable of executing 1 instruction every clock cycle. means cpu able execute 1 instruction every nanosecond.
now let's assume want fetch data hard drive. disk operations take place in milisecond scale, , we'll assume drives fast enough fetch data in 1ms.
if cpu sit around , wait disk fetch data, cpu waste 1 million nanoseconds doing nothing, whereas executing 1 million instructions task. when program has lot of io access, wasted cycles stacks , become noticeable if let cpu wait , nothing. why it's idea overlap computation io cpu cycles aren't wasted.
this why computer becomes super unresponsive when main memory full, , cpu has page disk. cpu cannot perform useful task unless data needs has been retrieved disk main memory, must sit around , wait ios complete.
Comments
Post a Comment