1. We will be in Read Only mode (no new threads, replies, registration) starting at 9:00 EDT for a number of hours as we migrate the forums to upgraded software.

Conceptual Questions

Discussion in 'Computing and Networks' started by learneros, Dec 13, 2007.

  1. learneros

    Thread Starter Member

    Nov 2, 2007
    Hi All,
    I have couple of conceptual questions.

    1) When we talk about paging in Operating system or Computer Architecture,page size is always in power of 2.Why is it so ?

    2) When we have external fragmentation,in order to combine all free space together we do compressing i.e merge all holes of main mamory together.
    What disadvantages do we have by doing compression.Ofcourse one could be it will make speed slow of other running processes.What other disadvantages we will have becuase of compression?

    Thanks in advance.
  2. Dave

    Retired Moderator

    Nov 17, 2003
    Because its a binary addressing system. Binary = 2.

    The idea of compression is that it prevents subsequent process loaded into memory from become fragmented so easily. Think about it, if you compress a series of processes you create a large contiguous block of free memory. If you now load a large process and data into memory, if you had not compressed the current set then this process and data would fragment - if you have compressed the current set then the process and data is less likely to fragment or will fragment into fewer blocks. It is obviously less of an issue for smaller processes and data sets.

    Why is a fragmented set a problem? At the end of each fragment is pointer to the start of the next fragments - this is redundant data since it does not have anything explicitly important to the process or data. Then there is the switching overhead to the next fragment. These two factors compound to slow the execution down.