nootnoot
Top 10 List of Week 04
Jonathan Amadeus --- Tangerang

Top 10 List of Week 04

  1. What is address binding?
    Computer memory uses logical addresses and also physical addresses. I learned that address binding is needed to allocate a physical address to a logical address. Some types of address binding are compile time, load time, and execution time address binding.

  2. Static and dynamic linking differences
    We often use external programs or libraries in our code. Compiler have to bring these together with the program we write in order to execute it. The process is called linking. There are two types of linking, static and dynamic. Check this website to see the differences between those two.

  3. Contiguous Memory Allocation
    Memory systems have allocation methods that define how files are stored in the disk blocks. In contiguous allocation, each file occupies a contiguous set of blocks on the disk.For example, if a file requires n blocks and is given a block b as the starting location, then the blocks assigned to the file will be: b, b+1, b+2, b+n-1. You can learn about memory management and fragmentation here as well.

  4. Memory Paging
    Have you ever heard about paging? We’re not talking about book pages here, it’s related with memory management in an operating system. Paging is a method of writing and reading data from secondary storage (drive) to be used in primary storage (RAM). Every time an OS translates from logical to physical address, it needs to look up in the page table, which is stored in RAM.

  5. Linux Executable FIles
    Windows have some executable files called .exe. Unlike Windows, Linux doesnt have the concept of file extension based executables. Any file can be executable you just need to have the right permissions. You can use chmod to make changes to the permissions of files. To execute, just specify the complete path to the executable file.

  6. How to handle static and dynamic libraries in Linux?
    If you’re new to Linux-based systems, handling libraries is full of mysteries. Linux is basically a series of static and dynamic libraries that depend on each other. On this site, you can handle static linking, dynamic linking with shared libraries, customizing shared libraries at compile time, and handling multiple architectures.

  7. How to manage memory with malloc, calloc, realloc, and free in C
    When we program in C, there are three main functions to allocate memory which are malloc(), calloc(), free(), and realloc(). malloc() is used to dynamically allocate a single large block of memory with the specified size. calloc() is used to dynamically allocate the specified number of blocks of memory of the specified type. free() is used to dynamically de-allocate the memory. And finally, realloc() is used to dynamically change the memory allocation of a previously allocated memory.

  8. Big vs Little Endian
    Computers store data in memory in binary system. One of the coolest things about binary system is that you can group bits into bytes and words. But we need a system to properly format this bytes and words, with a sistem called endianness. We have two types of this system, called big and little endian. Check this site to see the difference between those two.

  9. Memory Mapping
    When we write a program or data from a file, the location in that file is accessed and transfered from the hard drive to a buffer in memory. Any file reading or writing will make use of some intermediary memory buffers where data is stored after it is read or before it is written. On this site, you can see how memory mapping make these buffers directly accessible to the program, rather than hiding them and only providing some auxiliary functions that expose them.

  10. Using Pointers in C
    In C language, a pointer is similar to references in Java. However, pointers point directly to memory addresses. Pointers also allow you to initalize structs and also arrays. You have to be careful though. If you dont use your pointers correctly you can access garbage data or leave them dangling. Another product of incorrect usage is memory leaks.


© 2021-2021 --- Jonathan Amadeus --- File Revision: 9.1--23-May-2021.