心得分享

Card image cap

王同學 報告/作業 分享經驗 10/14 10/8 OS作業

10/14 10/8 OS作業
名稱 10/8 OS作業
日期 10/14
課程名稱 作業系統
指導教師 劉艾華

1.caches simply solves the problem of time causing loading the files or application , because cache can load up much faster then our HDD or SSD or even ram , the computer can pre load in stuffs to the cache so that when we need it we can use it immediately without waiting too long

cache also causes problem sometime , we know that when browsing websites , cache will save the website information to the cache so that next time when you load up the website again , it can be done much faster . But this is also the thing that may cause problem , if you load up the page while you aren’t connecting to the internet , the error page will be saved to the cache ; Next time when you open up the same website , the computer loads up the web from the cache ,which is the error page instead of the correct page from the internet ;To solve the problem is simply by cleaning the cache and you can get the website back to normal .

if we can make our cache as big as possible , of course we can load up all our application and files in an insane speed , but the cost of it will be really high . Second if we make it as big as possible, cpu speed also have to be upgraded to keep up with the speed if cache. Third , if we are assessing files from the external hard drive, hard drive simply don't have to speed of the cache , so the computer speed will still be slower down . To conclude building a cache as bis as possible is currently meaningless .

2.interrupt happens when it need to solve some sudden important tasks.
a interrupt usually happens on hardware , for example our devices like using the mouse or keyboard. a trap usually happens with software triggered by the cpu , it happens due to a command that shouldn’t be executed or a miscalculation appears .

a trap can be generated intentionally by a user program to stop a program from it to ruin the computer system, for example stopping a program from calculating a answer that never can be generated .

3.CPU is the main controller of a computer , it arranges the tasks generated by device , it makes decision of what should be done first what should be done later device.

Device controller is a part of a computer system that makes sense of the signals going to, and coming from the CPU. Any device connected to the computer is connected by a plug and socket, and the socket is connected to a device controller.

device controller sometimes can even have their own memory and their own CPU so the similarity between CPU and device controller is that cpu can be in a device controller instead of only having one in a computer .

4.when a hardware or software makes a interrupt , the cpu stops working and start executing the interrupt routine , when finishing the routine , the cpu will resume the task it is doing before the interrupt.

更新日期:2015/10/14 下午 08:54:51