os211

Top 10 List of Week 04

  1. Introduction to tar Commands
    In one of this week’s task, we are asked to “unzip” a tarball format using tar. Tar (derived from tape archive, according to this page) is a set of commands used to convert a group of files into an archive. This page helps me understand what are the basic commands and syntaxes of tar; such as -x, a tar command flag for extracting archived files, and -t is a tar command to list all of the contents inside an archived files (or a tarball).

  2. What does .c and .h file extension do in C
    This is actually a link to a stackoverflow question, asking the same question written on this number’s title. That was the same question I asked upon encountering this unfamiliar .h file inside the tarball given by Mr. Rahmat. The selected/correct answer on the link offers an easy-to-understand explanation about what .c and .h file extension does in C language. The selected answer also provides an example/use case of .h extension, making it easier for me to understand the purpose of this strange .h file. TL;DR, .h is a header file that contains header (duh), and in the header usually lies the stuff that are meant to be shared with other parts of the C code, such as global variables declaration, #define tags, etc.

  3. Memory Management in OS
    Ah, yes, the boring part: bahasan materi. This week’s topic is about Main Memory, in which one of its subtopic is Memory Management. This article by tutorialspoint explains about what is Memory Management, and how does an operating system manages its memory. Oh, the article also provides some illustrations on the processes of swapping, fragmenting, segmentation, paging, etc. cool beans

  4. How to see/check memory usage on Linux
    So I’ve been having this problem where my laptop suddenly freezes due to running too much application and/or chrome tabs at the same time. and this problem happens quite often, which is a hassle indeed. Since I’m still considered a newbie on this whole Linux thing, I still don’t know how to check ram usage as afaik Linux doesn’t have the windows version of Ctrl+Shift+Esc; which opens a task manager where I can see the ram usage on it. The article gives 5 different methods/commands for checking memory usage on Linux OS.

  5. Wikipedia - Memory Protection
    Memory Protection is a new concept for me, and my impression upon hearing what it is was I thought that memory protection is a very interesting concept. Quoting from this wikipedia page, “Memory protection is a way to control memory access rights on a computer, and is a part of most modern instruction set architectures and operating systems. The main purpose of memory protection is to prevent a process from accessing memory that has not been allocated to it”. What makes it more interesting is the purpose of memory protection, which the purpose is to prevent bug or malware to affect the contents of the memory, the process running inside the memory, and moreover, the OS itself.

  6. Contiguous Memory Allocation Explained
    Well, the title is pretty much a self explanatory. Quoting from the source, “Contiguous memory allocation is a memory allocation method that allocates a single contiguous section of memory to a process or a file”. The type of memory used to allocate space for process/file on this context is RAM (well, duh).

  7. What is a Memory Management Unit (MMU)
    Hey, another self explanatory title! Imma just go ahead and quot the answer to the title then; “A memory management unit (MMU) is a computer hardware component that handles all memory and caching operations associated with the processor. In other words, the MMU is responsible for all aspects of memory management”

  8. What is Makefile and how does it work
    Aside from the strange .h file from inside this week’s tarball, I also found another strange object called Makefile. Since I’m running out the material for this week’s top 10, so I decided to GSGS on this Makefile thing. It turns out that Makefile is a very essential tool/utility (sort of like a bash script from the way I see it) that will shorten your workflow from doing repetitive things. Awesome, right?

  9. Why choose Makefile over bash script
    Knowing that Makefile is quite similar with bash script at a glance, I then have this question popped up on my mind. Quoting from several answers from stackoverflow, Makefile has the upper hand due to its support on minimal rebuilds (something about dependancy in a program, each update will only rebuilds the parts that is being depended), or in a more simpler explanation, Makefile automatically checks which targets need to be remade based on time stamps (last edited time), making it more efficient than bash/shell script.

  10. Examples of Makefile in C and Java
    Having to compile one .c file at a time is indeed very inefficient and time consuming. Worry not, because Makefile will shorten those repetitive task as I previously mentioned. This page offers some of the example/usecase of running/compiling multiple C files, and adding it as a dependency so that it will only re-execute/rebuild the set of commands only on the edited/modified deps.