diff --git a/cst311/lec/lec20.md b/cst311/lec/lec20.md new file mode 100644 index 0000000..ac2e069 --- /dev/null +++ b/cst311/lec/lec20.md @@ -0,0 +1,48 @@ +# lec20 + +Link Layer(is it cool or is it whack) + +_Frame_: packets on link layer i.e. layer-2 packet + +MAC addresses are used at this layer more often since we don't assume that we'll ever have millions/thousands of people connecting to one network. + +## Services + +* Framing and link access + +Yet another header is added at this point + +* Reliable delivery + +* Flow control + +Receiver can report lower send rates + +* Error Detection + + * Retransmission signals + * checksums yo + +## where tho + +usually this is in hardware/firmware + +Typically theres a microcontroller next to the some bus reading in and out whatever it can + +Sender usually tacks on header + +Receiver will take take analyze things then send it back up across the apic etc etc, it usually comes right back to another controller to write out onto a different bus. + +## Checksum? more like check this parity + +physical world is full of noise so basic checksums won't do shit anymore. +This is why use things like parity checks. +Pretty much we take some stream, push it into a grid of n by m size +Add 1 to n & m. Where the tall side get filled with the parity of each row and the low side is filled with columns' parity. +Send this result to receiver who verifies this stuff, and we can determine single bit errors. + +## Cyclic redundancy check + +_even more techniques for error detection_ + +View a bit stream as some size\_t binary value diff --git a/cst311/lec/lec21.md b/cst311/lec/lec21.md new file mode 100644 index 0000000..828b0b6 --- /dev/null +++ b/cst311/lec/lec21.md @@ -0,0 +1,47 @@ +# lec21 + +_Recall CRC_: Basically long division but with xor's instead of repeated subtractions + +## Multiple Access Protocols + +* point to point link + +One machine on each end of the link + +* broadcast + +----- +Ideallly: +* we would make sure each node could send at whatever rate they needed to +* decentralized +* simple to implement + +## MAC protocols + +Three main classes of protocols methods: +1. channel paritioning + * time muxing, frequency muxing etc + +2. Random access + * allow collisions and just try to recover on the fly + +3. Taking turns + * nodes take turns doing things + + +## Random Access + +Basically whenever there's a collision we would retransmit. + +### ALOHA + +Partially time slotted technique. +This means it helps us to have an accepted frame size. + +Once a node is transmitting it can transmit at its full bandwidth. +There is tons of collision however, which means we have to recover a ton as well. + +Pure unslotted ALOHA we basically transmit a frame as soon as is arrives which means frames can overlap. +Putting these frames into slots allows us to reduce this collision probability overall raising our efficiency. + + diff --git a/cst311/lec/lec22.md b/cst311/lec/lec22.md new file mode 100644 index 0000000..c9889e0 --- /dev/null +++ b/cst311/lec/lec22.md @@ -0,0 +1,33 @@ +# lec22 + +_This is continuation of previous lecture where MAC protocols are covered in brief._ +## Taking turns + +Let's now describe various methods to achieve turn taking. + + +1. _polling_: + + * master invites slaves to transmit data + +2. _token rings_: + + * control token passed from node to node +## ARP: Address Resolution Protocol + +Protocol to determine MAC address on a given device in a network. + +Upon association the protocol will emplace an entry into the target device's `arp table` where we record MAC and IP address associations. + +# Wireless links + +Interference: everything will cause interference which means we expect interference. + +Primarily for wireless connections: _Code Division Multiple Access_(asynchronus kinda) + +### CDMA + +Each node receives a code which it uses to splice transmissions across the wireless link. +Each node may transmit data at an arbitrary rate since the transmissions splice into each other forming a consistent signal cumulatively. + + diff --git a/cst311/lec/lec23.md b/cst311/lec/lec23.md new file mode 100644 index 0000000..b8c007d --- /dev/null +++ b/cst311/lec/lec23.md @@ -0,0 +1,38 @@ +# lec23 + +Wifi stuff in this lecture... jk its cellular shit wew lad + + +## Pieces + +* base station + +covers an area for users + +* users + +yea + +* air interface + +most(all) of this based on air to air connections + +## Dividing up signals + +Either we use _TDMA_ or _FDMA_ at the cell tower level. + +## Mobility + +Since we're dealing with dealing with literally moving targets now we have to consider a few new things, like handling how cell tower's deal with people connecting and disconnecting all the time. +Moving from access point to access point we must somehow maintain connections. + +To route this kind of thing we have two options: + +1. Let routing handle it + +Just like previous lectures, send off some data and hope that the data gets to the right place + +2. End system offloading + +Let end systems deal with it via direct or indirect routing. + diff --git a/cst337/lec/lec16.md b/cst337/lec/lec16.md new file mode 100644 index 0000000..95bf8e4 --- /dev/null +++ b/cst337/lec/lec16.md @@ -0,0 +1,15 @@ +# lec16 + +_recall this is mips centric_ + +## Overflow + +Dealing with signed values + +## Carry + +Dealing with unsigned values + +## floats + +using the IEEE-754 format diff --git a/cst337/lec/lec17.md b/cst337/lec/lec17.md new file mode 100644 index 0000000..537e993 --- /dev/null +++ b/cst337/lec/lec17.md @@ -0,0 +1,29 @@ +# floating point + +mips uses ieee754 + +## parts of floats + +1. Sign bit +2. Exponent +3. Mantissa + +_32-bit floats btw_ + +## Sign + +bruh + +## exponent + +This is coming from scientific notation so we have `2.0E3` + +This means our 8 bit exponent is `0000 0011` + `0111 1111` + +## Mantissa + +let's roll with `2.0E3` + +Mantiss of 2.0 = 0 <- 23 times + +We have 23 `0`'s because the decimal portion of our number `2.0E3` is 0. diff --git a/cst337/lec/lec18.md b/cst337/lec/lec18.md new file mode 100644 index 0000000..fb4846d --- /dev/null +++ b/cst337/lec/lec18.md @@ -0,0 +1,4 @@ +# lec18 + +At this point its all reference sheets +_except its mips so only pdf's are available_ diff --git a/cst337/lec/lec19.md b/cst337/lec/lec19.md new file mode 100644 index 0000000..a82a509 --- /dev/null +++ b/cst337/lec/lec19.md @@ -0,0 +1,3 @@ +# lec19 + + diff --git a/cst337/readme.md b/cst337/readme.md index c4aa828..3937c58 100644 --- a/cst337/readme.md +++ b/cst337/readme.md @@ -1,3 +1,8 @@ +bruh + +get a mips vm and start messing with it +because otherwise we're not going to get anywhere useful never + # Subject - Computer Architecture & Assembly with MIPS Material on the hardware side of this course covers everything from transistors up to logic gates. diff --git a/cst363/lec/lec21.md b/cst363/lec/lec21.md index 78bd4da..07a66c7 100644 --- a/cst363/lec/lec21.md +++ b/cst363/lec/lec21.md @@ -14,12 +14,12 @@ _pretty formatting on diagrams means stuff_ * solid lines * many - * contributer [solid] contribution [solid] candidate + * Contributer [solid] contribution [solid] candidate * dotted lines * only one -Say we have solid/arrow +Let's say we have solid/arrow ``` student{id/name} --- [advisor] --> instructor{id/name} @@ -32,7 +32,7 @@ We can do this because each student will only every 0,1 instructor's in an adivs ## Composite Structures -Logically compositing makes sense but sql doesn't like much aside from primitives so we can't really do that +Logically compositing makes sense but SQL does not like much aside from primitives so we can't really do that Say then we have: ``` diff --git a/cst363/lec/lec23.md b/cst363/lec/lec23.md new file mode 100644 index 0000000..8c51ae7 --- /dev/null +++ b/cst363/lec/lec23.md @@ -0,0 +1,41 @@ +# lec23 + +_More on stuff about building a usable model for given data; more specifically BCF(Boyce Codd Normal Form)_ + +BCNF : any table where the are no redundancies based on functional dependancies + +> + +## Lossless Decomposition + +If we split a table that isn't in BCN form so that the new tables are in BCN form we should be able to natural join them back to the original state. + +## Normalization 3: Third Normal Form + +Take everything out from the original table which is part of a functional dependancy. + +Example: + +original: `id name office` {id -> name} + +Table 1: `id name` [functional dependancy participants] + +Table 2: `id office` [everything else + root of FD] + +This may be more expressive but the problem is then performance takes a hit because if we want to look for all the information from the first table we have to do a bunch of joins. +This means going off to disk a bunch of times and back to memory bleh its slo. + +Let's say we have the following table(text view pls): + +student-id | dept-name | instructor-id +------------|---------------|---------------- +1 | Biology | 10 +1 | Chemistry | 20 +2 | Biology | 10 + + +## Lab Excercise + +1. BCNF: the form a table follows if it doesn't have redundancy which comes from functional dependency +2. `order(CustID, CustName, ItemNum, Date)`: no because name depends on id? + * close: No. we can still create one more table aside with `id name`. we can create `id itemNum date` diff --git a/cst363/lec/lec24.md b/cst363/lec/lec24.md new file mode 100644 index 0000000..9a9fa91 --- /dev/null +++ b/cst363/lec/lec24.md @@ -0,0 +1,27 @@ +# lec24 + +## NoSQL + +Why NoSQL is a thing + +1. Scaling + +Scaling demands more computing power over time. +Relational databases require more vertical scaling where machines must be upgraded constantly. + +Alternatively horizontal scaling allows for clustering computing style upgrades where computational power can be cheaper for upgrades maintaining support for large userbase. + +2. Data Migration + +If you change a schema then you have to painfully move everything over with the new schema. +This means downtime in some cases, no matter how small the change. + +3. OOP + +`Rows != Objects`: the key distinction here is that objects can contain other objects while SQL rows can not. + +4. Open Source + +Many of the more popular NoSQL database systems happen to be open source and have permissive licensing. + +Getting started can suck though because you have sometimes have to implement certain features with something like _MySQL_ already have. diff --git a/cst363/lec/lec25.md b/cst363/lec/lec25.md new file mode 100644 index 0000000..04c0360 --- /dev/null +++ b/cst363/lec/lec25.md @@ -0,0 +1,40 @@ +# lec25 + +## Master-Slave + +Here we'll have a master node which handles updating data, but the slaves only deal with reads. + +## Peer to Peer + +In this case we still have a reverse sink where things are input and then sent through some pipes to all the other nodes on that network. + +## Redundancy + +Apart from being redudant with data we can also do the same thing with workloads. + +## CAP Theorem + +* consistency +* availability +* partition tolerance + +Definition: You can't have all of these without some large tradeoffs.(shit happens all the time) + +If you optimize for accessability then you may not be able to optimize for consistency without sacrificing for one or the other. +Say we have the following constraints: + +* n = number of replicas +* w = number of nodes that must ack a write +* r = number of nodes that must ack a read + +If you optimize for reads: r=1 w=n + +Then reading is quick, meaning your data is more accessible, but it's also less reliable. + +## Pessimistic Replication + +Traditional strategy: + +* block access to data until it is up to date + + diff --git a/cst363/project/report.md b/cst363/project/report.md new file mode 100644 index 0000000..e69de29 diff --git a/cst363/project/todo.md b/cst363/project/todo.md new file mode 100644 index 0000000..6e972d9 --- /dev/null +++ b/cst363/project/todo.md @@ -0,0 +1,3 @@ +# report + +should describe each relationship that entities participate in diff --git a/table.sh b/table.sh new file mode 100644 index 0000000..d02b078 --- /dev/null +++ b/table.sh @@ -0,0 +1,9 @@ +#/bin/sh + +# because tables in markdown succ really fucking hard + +# \tablestart +# random shit here +# \tableend + +# first row always taken as header field