Posts

CST 334 - Finals Week

Image
 Hello All, CST 334 has been quite the journey, I learned a lot during this semester such as how memory is utilized in operating systems, how locks/unlocks/waits/joins all affect the efficiency and reliability of the OS. By learning the type of bugs that we are bound to encounter. I also learned about deadlocks, which is when two or more threads are in waiting mode. Regarding how the OS is able to detect when it’s time to input or output data, it would utilize Condition Variables, it would do this in order to synchronize thread and have their either sleep until a certain value is true in order to minimize wasted resources.  Semaphores were also another method of synchronization, it was invested by a very intelligent individual that goes by Dijkstra, he designed this to manage multiple addresses in threads. I also got to learn more about APIs and how simple they are to understand now, before this class I thought there were very complex and hard to understand. I’m extremely gl...

CST 334 - Week VII

 Flavio Cervantes CST334-40_2253 August 9th, 2025      This week in CST 334 I have learned about the implementation of file systems using technologies such as Very Simple File systems, these file systems are utilizing for managing file permissions, space utilization and management, methods of accessing files/data, metadata and how data is structured. I also learned about how data structures are organized on physical hard drives, it involves tracks, cylinders, actuators + arm, head and platter. The space in between the head and disk is 5000x tinier than a human hair, it needs this close proximity to be able to read data efficiently and accurately. I also learned how Drive performance involves 3 steps such as waiting for the sector to rotate underneath the head, this is known as rotational delay. Then it seeks by moving the head to the right track, lastly is transfers the data as needed. I also learned the formula for calculating avg. its rotation / min, so for example...

CST 334 - Learning Journal WK VI

       What I learned this week in CST 334 is a topic called “Concurrency Problems”, these are problems that are caused by either in proper locking, unlocking, incorrect atomicity, or deadlocks. To be more specific Non dead lock bugs are very common, they are usually caused by atomicity violation and order violation. On the other hand, there is also dead lock bugs which are less common and more severe and tricky. An atomicity violation is a sequence of operation that should be called or not called at all. If interrupted, this causes unexpected behavior, one can fix atomicity violation by properly utilizing locks+ unlocks. I also learned about yielding, this can help but when used with multi-thread can be resources intensive. Instead, we can use sleeping locks, they put threads to sleep instead of consistency looping. In Linux, they are called futex(). We learned that Semaphores are very useful all-purpose synchronization logics use for locking, ordering, resource c...

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 ...