Posts

CST-334 Week 4

 This week I learned more about managing free space in memory, more translation techniques using paging, and the different policies that determine when a page should be swapped out into disk. In memory, external fragmentation will cause free space to be chopped up into little pieces of different sizes. This may cause some requests to fail as there may be no space left to fit the request. To solve this problem, a free list data structure can be used to manage free space in the heap. A free list looks similar to a linked list data structure. Each node contains an address of where space is free and the length of that free space. When requesting in memory that may be smaller than what is available in a free chunk, the allocator will split a free chunk into two so it can satisfy the request. In the opposite case, when a chunk of memory is free, the allocator will coalesce free space. There are different strategies that are used for managing free space, best fit, worst-fit, and first-fit...

CST-334 Week 3

 This week I learned about address spaces, techniques for translating virtual addresses to physical memory, and some C apis for allocating and deallocating memory. An address space is a running program's view of its memory in the system. This program's address space will not be the same as its exact space in physical memory due to virtualization. The purpose of virtualizing the program's memory is that it allows for transparency, efficiency, and protection from other processes or the OS from processes. The program will think its address space starts at 0 (and so will the CPU), but the MMU will translate the program's address space into physical memory by techniques such as, base-and-bounds, segmentation, and paging.  Base-and-bounds translation is a technique for translating virtual addresses into physical ones by having the CPU assign a process a base register and a bounds register. The base register will be its actual location in memory, and the bounds register will b...

CST-334 Week 2

The topics we covered this week are processes, how the OS manages them, and the different schedulers that decide which processes should run at a given time. A process is essentially a running program that executes on the CPU. Processes run in user mode and do not have access to privileged instructions. When a process needs to perform a restricted operation, it makes a system call that triggers a trap, allowing the OS to take control in kernel mode and safely execute the requested task before returning to user mode. The different scheduling algorithms that we studied this week include FIFO, a scheduling program that runs the first process in a queue, SJF, a schedular which run the process with the shortest execution time, and Round Robin, a scheduler that switches between processes based on a time splice. I think one of the more difficult topics for me this week was how to schedule process using the Round Robin scheduler. I was able to understand this conceptually but had some difficult...

CST-334 Week 1

The topics I learned this week are the basic concepts of an operating system, converting from binary to hexadecimal, and using bash scripts to run C programs. One of the uses of an operating system is to allow programs to share memory and enables programs to interact with devices that are in charge of making sure the system operates correctly and efficiently. An important concept in operating systems that I learned this week is virtualization. Virtualization allows the OS to take physical resources and transform them into a more general, powerful, and easy-to-use virtual form of itself (a virtual machine). I was able to practice these concepts through lab 1 and the first homework assignments. In these assignments, we learned to use docker to host a virtual OS so we could build C programs. Through these assignments, I was able to strengthen my understanding of memory allocation. I had some experience with using pointers in C++, but I was somewhat confused on how malloc() worked and why ...

CST-363 Week 8

Briefly summarize what you consider to be the three (3) most important things you learned in this course. Learning MySQL to query/update data from a database. Learning about alternative databases, such as the NoSQL database, and using MongoDB/Java to create a web application. Learning to normalize a database to reduce redundancy in a database by following Third Normal Form or BCNF. 

CST-363 Week 7

Compare MongoDB with MySQL.  What are some similarities?  Both have query projections, unique keys, indexes and explain queries What are some differences?  MongoDB does not have transactions, but they can still be atomic. Both have different languages for querying data. When would you choose one over the other? \ MySQL should be used if your data is mostly relational. MySQL has more support for making more complex queries or joins. If your data is not structured, MongoDB may be more beneficial.

CST-363 Week 6

 This week I learned how to connect to a database using Java via JDBC. A connection must be created using the database's url, username, and password. SQL statements can be executed in Java using Statements or PreparedStatements. Running executeStatement will return a ResultSet which can be used to read from the returned rows. Statements should always be sanitized to prevent SQL Injection and values should never be concatenated into the SQL string. Transactions are committed automatically but can be turned off using setAutoCommit(false)