Computer Science Questions and Answers: Computer virus -and cache memory Part - 4

1. Write a note on Computer virus.
Viruses are collection of coded instructions which are self replicating. When a virus attaches  itself to another file it infects it. They are normally inactive until infected program is run.  They are broadly classified into three categories.
a. Boot infectors
b. System infectors
c. Executable program infectors
Boot infectors: Create bad sectors. They remain in the memory until the system is shutdown.
System infectors It infects the hard disk or: bootable floppies which may contain system files.
Executable program infectors: These are dangerous and devastating. They spread to almost any executable program attaching themselves to programming files.

2. Explain the cache memory in detail.
Cache memory is a small and fast memory between CPU and main memory. It is extremely fastcompared to normal memory. Transferring data between main memory and CPU causes delay because RAM is slower than CPU. Cache memory stores copies of data from most frequently used main memory locations. When processor needs to read from or write to a location in main memory, it first checks whether a copy of data is in the cache. If so processor immediately reads or writes to cache. Computers use multilevels of cache such as Level1(smallest)and Level2 cache.CPU resident cache is known as L1 or primary cache (16 to 32 KB) to 512 KB.Cache is also added to mother board also known as L2 cache (512 KB to 1024 KB). Higher end systems can have as much as 2 MB of L2 cache on mother board.