This commit is contained in:
Medium Fries 2018-12-10 17:29:54 -08:00
parent 78533cca9e
commit c319e77f12
16 changed files with 345 additions and 3 deletions

48
cst311/lec/lec20.md Normal file
View File

@ -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

47
cst311/lec/lec21.md Normal file
View File

@ -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.

33
cst311/lec/lec22.md Normal file
View File

@ -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.

38
cst311/lec/lec23.md Normal file
View File

@ -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.

15
cst337/lec/lec16.md Normal file
View File

@ -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

29
cst337/lec/lec17.md Normal file
View File

@ -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.

4
cst337/lec/lec18.md Normal file
View File

@ -0,0 +1,4 @@
# lec18
At this point its all reference sheets
_except its mips so only pdf's are available_

3
cst337/lec/lec19.md Normal file
View File

@ -0,0 +1,3 @@
# lec19

View File

@ -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 # Subject - Computer Architecture & Assembly with MIPS
Material on the hardware side of this course covers everything from transistors up to logic gates. Material on the hardware side of this course covers everything from transistors up to logic gates.

View File

@ -14,12 +14,12 @@ _pretty formatting on diagrams means stuff_
* solid lines * solid lines
* many * many
* contributer [solid] contribution [solid] candidate * Contributer [solid] contribution [solid] candidate
* dotted lines * dotted lines
* only one * only one
Say we have solid/arrow Let's say we have solid/arrow
``` ```
student{id/name} --- [advisor] --> instructor{id/name} 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 ## 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: Say then we have:
``` ```

41
cst363/lec/lec23.md Normal file
View File

@ -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`

27
cst363/lec/lec24.md Normal file
View File

@ -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.

40
cst363/lec/lec25.md Normal file
View File

@ -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

0
cst363/project/report.md Normal file
View File

3
cst363/project/todo.md Normal file
View File

@ -0,0 +1,3 @@
# report
should describe each relationship that entities participate in

9
table.sh Normal file
View File

@ -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