This website houses notes from my studies at the University of Liverpool. If you see any errors or issues, please do open an issue on this site's GitHub.
Virtual Memory The logical address space doesn’t have to match the address space of physical memory. This allows us to allocate more memory to processes than there is physical memory in the system. This is possible by using paging: Not all pages need to be in memory. Unneeded pages can...
Paging is the physical division of a program’s (or segment’s) address space into equal-sized blocks, called pages. Each page resides within a page frame in the real memory. Pages which are consecutive in the address space (virtual memory) need not occupy consecutive page frames in real memory. Very similar to...
Consider the following assembly line: 2 assembly lines, each with $n$ stations ($S_{i,j}$: line $i$ station $j$). $S_{i,j}$ and $S_{2,j}$ perform the same task by time taken is different. $a_{i,j}$ - Assembly time at $S_{i,j}$. On the node. $t_{i,j}$ - Transfer time from $S_{i,j}$. On the arrow. graph LR subgraph...
Segmentation is splitting up chunks of a process into logical parts. The compiler will indicate which segment represents which logical part of the code. Each segment has its own partition. Segments need not be contiguous. These segments are able to be organised by the memory manager to fit where space...
This makes memory usage more efficient by only loading what part of a program is needed at any time. The program image could consist of the following parts: Main program Different routines, classes Error routines Dynamic loading allows only parts of the image to be loaded, as necessary. When a...
Dynamic programming allows for more efficient implantation of divide and conquer algorithms. Fibonacci Numbers This is the definition for the Fibonacci numbers: \[F(n)=\begin{cases} 1 & \text{if } n=0\text{ or } 1\\ F(n-1)+F(n-2) & \text{if } n> 1 \end{cases}\] and the code that we had before: Algorithm F(n) if n ==...
Simple Memory Management Memory is allocated to program in contiguous partitions from one end of the store to the other. Each process has a base, or datum (where it starts). Each process also has a limit (length). Filling Empty Memory With this method you are unable to move existing programs...
Memory Addressing The memory inside RAM can be viewed as a linear sequence of bytes, each with its own address. Addresses range from 0 up to the number of bytes available. Since addresses are stored in register and other variables, addressable space will depend on the bit-length of the CPU....
A full textbook on git as available called: ProGit. Local Setup The bare minimum of setup is to set the user.name and user.email: $ git config --global user.name "Ben Weston" $ git config --global user.email sgbweso@liverpool.ac.uk Creating a Repository To initialise a new repository you can do the following inside...
There are many I/O classes, view the full Oracle I/O tutorial here. Scanner java.util.Scanner splits up an input into tokens that can be read one at a time. You can scan through these using the has.Next() and look for specific types using other methods: double sum = 0; try (Scanner...