From e4fd1284273b4477ba46ed6f8ae190d395056bac Mon Sep 17 00:00:00 2001 From: thing1 Date: Fri, 28 Mar 2025 08:58:00 +0000 Subject: added alot of photos --- comp/work/52/Makefile | 3 +++ comp/work/52/hashing.ms | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ comp/work/52/tcpip.ms | 26 ++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 comp/work/52/Makefile create mode 100644 comp/work/52/hashing.ms create mode 100644 comp/work/52/tcpip.ms (limited to 'comp/work/52') diff --git a/comp/work/52/Makefile b/comp/work/52/Makefile new file mode 100644 index 0000000..2aeb265 --- /dev/null +++ b/comp/work/52/Makefile @@ -0,0 +1,3 @@ +all: hashing.ms tcpip.ms + eqn hashing.ms | groff -Tps -ms | ps2pdf - > hashing.pdf + eqn tcpip.ms | groff -Tps -ms | ps2pdf - > tcpip.pdf diff --git a/comp/work/52/hashing.ms b/comp/work/52/hashing.ms new file mode 100644 index 0000000..89d6b45 --- /dev/null +++ b/comp/work/52/hashing.ms @@ -0,0 +1,54 @@ +.TL +Hashing +.AU +Lucas Standen +.AI +QMC + +.2C + +.EQ +delim @@ +.EN +.EQ +delim @# +.EN + +.NH 1 +Starter (FDE Cycle) +.LP +1) The program counter, Memory address register, Memory data register, Current instruction register, Status register + +2) Control bus, Data bus, Address bus + +3) Arithmetic logic unit + +4) Control unit + +.NH 1 +Hashing +.LP +This is the process of converting data to a internal representation of some data. We can use this to do many things, for example, when using a password, storing the hash can be better for security, as it is keeps the actual password safe while allowing for password checking. + +A hash table is a store of many hashes in a dictionary style data structure. The requirements for a has table are as follows +.EQ +"you should have about a third more spaces avalible than needed" +.EN +This is to avoid crashes/collusions. +.EQ +"you need to automatically resize the dictionary whenever is needed" +.EN +This is to avoid running out of space to store values. +.NH 2 +Hash table collusions +.LP +This is what happens when you have 2 bits of data that produce the same hash, and thus would go in the same slot in the dictionary. To fix this you can store a list in each slot of the dictionary, and put the new element on the end of the list of elements with the same hash. You could also achieve this by putting the data in the next available hash table slot. + +.NH 1 +Exam question on hashing +.LP +1)a)i) This can be faster to retrieve data, as all you need to know is its name, and you can quickly find the hash, and then the full value. + +1)a)ii) This can be easier to manage, as you don't need to worry about hash collusions. + +1)b) 751, 751 diff --git a/comp/work/52/tcpip.ms b/comp/work/52/tcpip.ms new file mode 100644 index 0000000..2f7199b --- /dev/null +++ b/comp/work/52/tcpip.ms @@ -0,0 +1,26 @@ +.TL +TCP/IP stack +.AU +Lucas Standen +.AI +QMC + +.EQ +delim @@ +.EN +.EQ +delim @# +.EN + +.NH 1 +Question +.LP +A hard drive works using spinning platters, read heads, and magnetic tracks and sectors, which has the data laid out in an organised pattern. The hard drives spin the platters and move the read write heads to read and write data to and from the disk. + +The Application layer of the TCP/IP stack is the web server itself, this will take the incoming files and move them onto the drives. + +The Transport layer of the stack, will handle the data being broken up into packets, that can be sent over the network. This will also apply the checksum and other such security and verification steps. + +The Network layer will apply the sender and return IP address onto the packet. + +The Link layer is the physical cables, and other connectivity methods between the 2 machines. -- cgit v1.2.3