Posts

CST 334: Week 8

  Write a 1 - 2 paragraph journal post, of at least 250 words, summarizing what your biggest takeaways from CST334 were, including any major challenges or topics you found particularly interesting.   One of my biggest takeaways from CST 334 is that material is very extensive and it would probably benefit me to take time when I have it to go back over it all at my own pace. I understand that all the material is meant to be covered in less than 8 weeks, but it seemed a bit unrealistic at times to expect us to be working on the weekly average worth of reading, lectures, and assignments while also doing some group work and preparing for the next exam. I need to take at least a week longer or so with all the material than we were given and do at least four more assignments for each module so I practice applying the material I had just learned. Another takeaway I had was that there was so much pre established code in most of the assignments that would have been helped to taken mor...

CST 334: Week 7

This week in CST 334, we learned about how the OS communicates with I/O devices. For example, we learned that devices consist of two components, their interface and their internal structure. Their interface is used by the system software to control it, while their internal structure is implemented to perform their specific utilization. The interface features three registers, the status, command, and data registers. The status register is used to determine whether the device is busy or not. The command register is used to determine what task the device intends to perform. Lastly, the data register is used to pass data in-between the device and the system.  It’s important to note that while the data register is bi-directional, the other two registers are only used by the OS in one direction, out to the command register and in from the status register. Additionally, the OS will utilize two different methods of communicating with a device, polling or interrupts. With polling the OS is ...

CST 334: Week 6

This week we learned about condition variables, semaphores, and common concurrency problems. In terms of conditional variables, they are useful when we want to make a thread sleep rather than spin as it waits to complete its execution. When a thread begins to spin as it waits for its turn with a lock, the thread still utilizes a substantial amount of processing power. To salvage or preserve this power, we can instead teach the thread to sleep rather than spin by applying conditional variables. A thread that chooses or needs to wait for a certain condition to be met will go to sleep using the wait() function, but its not until it is signaled by another thread that the condition has been met and it wakes again. The other thread can signal the initial thread in question by calling the signal() function or signal all threads waiting for the same condition at once by calling the broadcast() function. In terms of semaphores, they are similar to ticket locks as they both track values that det...

CST 334: Week 5

I had not yet received my overall Midterm Exam score when I started writing this post but based on my experience going through the exam problems and the initial score I received on completion shows I need to improve my understanding of the conceptual material in this class. I know I could use some more time to digest the reading material because I tend to go through it once using a read aloud feature because it helps me keep pace rather than getting stuck or distracted. Additionally, I don’t feel like there’s enough time available in my week to do the reading at a slower pace than what I do now. Therefore, I need to find a solution that will allow me to retain more or least track where certain information is so it’s easier to find.  In addition to what I’ve learned from my experience taking the midterm, we learned about concurrency and threads. Threads allow more than one point of execution within a single program, so the program can perform multiple tasks at the same time, which i...

CST 334: Week 4

  Write a 1 - 2 paragraph journal post, of at least 250 words, of what you learned this week in CST 334. As an alternative to base-and-bounds, we learned this week that we can implement a technique called paging. This technique breaks virtual address space up into sections of equal size. In comparison to base-and-bounds, paging is simpler to implement and much more flexible in use and it allows us to avoid fragmentation. On the downside, paging needs larger data structures for translation, so more space is used, and translation info does not fit into the MMU registers, which makes paging slower than using base-and-bounds.  Each process will have a page table, which logs a page frame number, or PFN, that corresponds with a virtual page number, or VPN. Virtual addresses are made up of the VPN and then what is referred to as the offset. During address translation, we retrieve the PFN using the VPN in the page table and replace the VPN in the virtual address with the PFN, and we e...

CST 334: Week 3

Write a 1 - 2 paragraph journal post, of at least 250 words, of what you learned this week in CST 334. This week we learned more about address spaces. For example, we learned that each location in RAM memory has a physical address. When we are working in a code editor, we refer to values with variable names, while when the program is compiled, they are turned into memory addresses. Additionally, each process has its own address space, which is a set of addresses the compiler can use to address memory. Compiled code consists of virtual memory addresses, which are translated into physical addresses if they fit within a designated address space. If a program tries to address memory outside the address space, a trap occurs. The name of the hardware component that is used to implement virtual memory into physical memory is called the memory management unit, or the MMU. As part of the MMU, the base and bounds registers are used to determine the size of a process’ virtual space and the physic...

CST 334: Week 2

Write a 1 - 2 paragraph journal post, of at least 250 words, of what you learned this week in CST 334. This week we developed a deeper understanding about processes. For starters, the OS has data structures to hold information about processes that include their id, their state, their register values, and the size of memory. Additionally, the OS needs to manage each process’ state, which can either be ready, running, or blocked. When a process is in the ready state, it is prepared to run and waiting to be chosen by the OS. Once the process is chosen by the OS, it moves into the running state and begins implementing its instructions. When a process needs to wait for an event (such as I/O completion or a resource to become available), it moves from the running state to the blocked state. Once the event occurs, the process transitions back to the ready state. To ensure all processes are given an opportunity to run through to completion, we will apply scheduling policies to dictate when pro...