os202

Logo

OS202 - johanessteven19 - Updated Weekly throughout the semester!

View the Project on GitHub johanessteven19/os202

Back to Home


Top 10 List of Week 04

  1. Memory.
    Memory is one of the most critical parts on a computer system. Memory is defined as the external device used to store information related to the works of a computer. The memory itself is built from a large array of bytes that each will be associated to a certain address. Therefore, if the system would like to retrieve a certain information stored in the memory, the system will proceed to call the address associated to the memory and then retrive the contents of that array.
    Source: OSC Chapter 9.

  2. Memory management.
    Because the memory is such an integral part of the computer, we want the memory to be used as efficiently as possible so that it may store more data and will therefore allow the computer to perform more operations. One way to do so is to allocate the memory space into several parts, each part specific to a different process. By using specialized registers such as the base and limit registers, the memory can be allocated as suitable to the system’s needs. The allocation can be defined in the registers, with the base registers denoting the smallest legal physical memory address, and the limit registers denoting the size of the range.
    Source: OSC Chapter 9.

  3. Address.
    There are two different types of addresses associated with the memory. The first type is the Logical Address, which is generated by the CPU and will then be translated into a physical address, which is where the actual data is stored ‘as seen’ by the memory unit. The logical address is also called a virtual address, because it only appears as if the data is stored there in the ‘virtual world’.
    Source: OSC Chapter 9.

  4. Allocation of memory.
    The memory space can be divided into several parts according to either a) first fit, b) best fit, or c) worst fit. These three ways each have their own advantages and could be strategically used to allow more memory space to be used efficiently. This is called dynamic allocation. For first fit, we allocate a request from a process into the first partition we encounter. For best fit, we allocate it into the smallest possible partition that can fulfill the request. This obviously will need the whole list to be searched first to find a suitable one. The worst fit is the exact opposite, in which the largest partition possible is used. Generally speaking, the first fit and best fit method will perform better in terms of speed and storage usage.
    Source: OSC Chapter 14.

  5. Paging.
    Paging is one of the ways the modern OS performs memory management. In it, a page number and a page offset will be created by splitting the logical address. The page number will serve as the index of a table containing pages of every process. It is the number of bits required for the pages in the Logical Address Space to be represented. Page offset, on the other hand, will serve as the specific location being referenced in the Physical Address Space.

  6. Address translation.
    From the previous point, we have learned that the Logical Address will be translated into a Physical Address. In paging, this can be done by referencing a translation look-aside buffer (TLB), which is a hardware cache of the page table. This process will involve taking the page number from the logical address and checking if the page’s frame is stored in the TLB. If the frame is found, then it is taken from the TLB. If it is not, then the frame must first be retrieved from the page table.
    Source: OSC Chapter 9

  7. Logical Address vs. Physical Address.
    We, as the user of the computer, will only ever deal with the logical address. This address will then be converted by the MMU (Memory Management Unit) into the appropriate physical address, which is where the code/data is located in the RAM. Then, and only then, will the computer know which data is requested by the user.

  8. Address binding.
    Address binding is the process in which an address space is mapped into a separate address space. It can be done by utilizing several ways:
    • Compile Time. During compiling, if it is known where the data is stored in the memory, then the absolute address (physical address bound to the process) can be generated. While this process is fast, it also requires the computer to be unoccupied by other processes.
    • Load Time. If the address is not known during the compiling process, then we can generate a relocatable address, which can be converted by the loader into an absolute address. This method requires the base address of the current process to stay constant so that we do not need to reload it.
    • Execution Time. The process will be executed by the CPU with the instructions that are located in the memory. This method is used if the process involved uses dynamic linking (the process can be moved from one memory to another during the execution).
  9. Swapping.
    Swapping, just like the name, is the process of swapping the process that is temporarily out of memory into a backing store (an appropriately-sized disk enough to accomodate copies of all memory images for all users), before being brought back again to be completed. This concept is important for increasing the degree of multiprogramming. The system will maintain a ready queue of ready-to-run processes which were backed out.
    Source: OSC Chapter 9.

  10. Hiearchical paging.
    Also known as multilevel paging, it is a type of utilizing the concept of paging on more than one level of page tables in a hierarchy. The logical address will be split into multiple parts, each referring to a different level of the hierarchy. Because the typical address in a computer system is 32 bits, we can see that it is able to be split into many parts, thus allowing many levels of page tables to exist. To prevent confusion between levels, we are able to use either hashed page tables (where the virtual page number is hashed, creating a linked list of elements all hashed into the same value of a hash function for distinct page numbers), or inverted page tables (each entry table has their own real page of the memory with the virtual address of the page being stored in that real memory location.)
    Source: OSC Chapter 9.