Posts

Showing posts from July, 2025

Learning Journal - CST 334

  What I learned this week in CST 334 is about the different types of lock and how they operate, some are more straight forward and others can be more complex and keep track of the CPU threads. I also learned about the decision process when it comes to utilizing locks appropriately. One must first start w/ a single lock, if its too slow then locking per bucket or node. 2 nd , for counters use approximately however many CPU it has. 3 rd , for List, hard locking is rarely faster than single lock. 4 th , for queues one should separate head & tail locks to improve throughout. Lastly, for hash tables one should use per bucket locks. With all that said, we must keep in mind that we want to start basic and work our way upwards in complexity to ensure we don’t optimize prematurely.   I also learned about PThread api, they also use locks known as mutexes; these functions lock and unlock the section by have a reference pointer at that certain value such as: pthread_mutex_lock (...

CST 334 - Learning Journal Week IV

  Flavio Cervantes CST334-40_2253 This week I learned what swapping entails; it is used when insufficient memory for all the active processes. The mechanism involves raising a page fault if the page table detects the page isn’t present in memory. The page fault handler of the operating system is able to swap the page from the disk. By following a specific policy such as First in first out, random, least recently used it is able to control the method in which it swaps by following a specific algorithm. Each replacement policy has pros and cons that should be used properly to achieve great efficiency.   I also learned about the different technologies that are involved with physical memory such as cache management, optimal replacement policy, First in first out, random, and workload. I found random policy very interesting because it doesn’t follow an order and replaces a random page to replace pressurized memory.   I also found the simplicity of FIFO interesting, whi...

CST 334 - Learning Journal Week III

 Flavio Cervantes CST 334 What I learned t his week in CST 334 is how virtual address work, I learned that it’s a piece of memory allocated and reserved for that specific virtual address. On certain designs, RAM can utilize the HDD for extra usage if needed. There are certain factors to be wary of when addressing memory, one must be careful and initialize them properly to avoid problems such as BSOD, logical errors, or even security vulnerabilities. Garbage collection is used to ensure that the memory is being reclaimed properly so that future commands or applications have sufficient memory to run, this allows the developer to focus on the application by not having to manually free memory, this helps preventing memory leaks. With modern day garbage collectors, it is able to achieve this with minimal overhead on resources.   I also learned about SED and AWK, these are used for data manipulation, for example in SED, one can modify text by finding and replacing the respective...

CST 334 - Learning Journal Entry Week II

  Flavio Cervantes July 3, 2025 Journal Entry Week II In CST 334, this week I learned the importance regarding why the OS is in charge of communicating with the physical hardware utilizing trap handlers, to achieve this the mechanism of a CPU utilizes a user mode (restricted and a kernel mode (non-restricted). The typical app. Run in user mode, and with a system call they are able to trap the non-restricted (kernel) to communicate directly with the services the OS provides. Regarding C API’s, one can utilize fork (), exec (), or wait () for the ability to manage and perform certain task.   In order to create new processes, one can use the system call: fork (). For each process, they are tagged with a PID (process identifier), these PIDS can be utilized for specific actions against the respective PID such as kill PID , which sends a termination command to the PID. The underlying functions that support multi-programming are interesting in general, it takes more than the ...