In: Computer Science
what is the difference between capacity and size in COA, and what is the formula to calculate them?
Capacity:
=>In computer architecture, Capcity referes to the amount of memory left, (or) The amount of usable memory (or) the amount of unoccupied memory. Capcity may vary from system to system and for different operating systems, different capacities are possible.(eg a 32 bit OS can point to only 4gb of memory, whereas a 64 bit OS can point to unlimited memory spaces)
=> generally speaking about capacity in computer organization, we may calculate the capacity of hard disk, RAM, Cache etc.,
Capacity, can be calculated in different ways.
If we are finding for Hard disk or secondary memory we may use:
Capacity of disk= Total number of surfaces x Number of tracks per surface x Number of sectors per track x Number of bytes per sector.
if we want capacity of cache:
Cache capacity = block size in bytes * blocks per set * number of sets.
Size:
Size refer to the total size(including occupied and unoccupied spaces).
Size is more specific, eg: size of memory occupied by a program, (this may include memory used by the program and the memory wasted(unoccupied) in the program .
so we can say, size of memory taken by the program = ending address - starting address
If we want size of cpu memory or RAM we can just calculate by multiplying the no. of pages or frame and size.
size of memory = Number of frames(or)pages * size of one frame.
HOPE THIS HELPED, DON'T FORGET TO LIKE :-)