Tuesday, July 25, 2023

CST 334 - Week 5 Concurrency

 Throughout my time during this week I learned quite a few things, I will just mention some here below:

-I learned about the concept of concurrency and was introduced to the notion of threads as an abstraction for a single running process. Threads share the same address space, enabling them to access the same data. The state of a thread is similar to that of a process, with its own program counter and private set of registers. 

-There are a few reasons why we use threads. According to OSTEP text, it's for parallelism and avoiding blocking program program progress due to slow I/O. Threads enable multiple computations to be performed concurrently on multiple CPUs and allow for overlap of I/O with other activities in a program. 

-In order to prevent a race condition and therefore indeterminate outcomes, the concepts of critical sections, mutual exclusion, and atomicity are presented to address these challenges.

-I also learned about the pthreads library(POSIX threads). In order to write a multi-threaded program, you need to create threads. The pthread_create() function is used to create threads. This takes four arguments: thread, attr, start_routine, and arg. 

-To wait for a thread to complete, you use the pthread_join() function. 

-To make sure sections of code are mutually exclusive, you use locks. The pthread_mutex_lock() and pthread_mutex_unlock functions are used to acquire and release locks. When you properly initialize the locks, you can avoid issues.

-Condition Variables: These allow threads to signal and wait for events. The pthread_cond_wait() function puts a thread to sleep, waiting for a condition to be met. The pthread_cond_signal() function signals the condition to wake up a waiting thread. 

There was so much more I learned this week, but I hope this shows a bit of what you can learn in concurrency! 

Tuesday, July 18, 2023

CST 334 - Week 4 Journal, Memory Virtualization

During this fourth week of class we delved deeper into the subject of memory virtualization. I learned about paging, segmentation, external fragmentation, internal fragmentation, compaction, coalescing, best fit, worst fit, first fit, next fit, segregated lists, and so much more! One of the very main topics was paging, however. Paging is chopping up the memory space into fixed sized pieces and each fixed-size unit is called a page. We view physical memory as an array of fixed-sized slots called page frames. Each of these frames can contain a single virtual-memory page. Paging definitely improves flexibility as it supports the abstraction of an address space. It also improves simplicity. There is so much more I could talk about what I learned about page tables, different kinds of bits, TLBs, cache replacement, and so much more. However, I hope this gives a brief overview of what I learned up to an extent. 

Tuesday, July 11, 2023

CST 334 - WEEK 3 JOURNAL

In my third week of the operating systems class, we delved into the fascinating realm of memory virtualization, which proved to be both challenging and enlightening. The concept of memory virtualization revolves around the idea of creating an illusion of a larger, more extensive memory space for processes running on a computer system.

One of the key takeaways from this week's lectures was understanding the purpose and benefits of memory virtualization. By using virtual memory, an operating system can provide each process with a virtual address space, independent of the physical memory available. This virtualization allows for efficient memory management, as processes are not restricted by the physical limitations of the hardware. 

Overall, my third week of class in operating systems opened my eyes to the intricacies and advantages of memory virtualization. I am eager to further explore this topic, as it promises to enhance the performance and reliability of modern computer systems, ultimately contributing to the seamless execution of various applications and processes.

CST 462S - Service Learning

Overall, my experience working as a volunteer for NTS was great and I wouldn't have changed it any way! What went well?  I'd say ove...