Requirements

Work through College Board Unit 4… blog, add definitions, and pictures. Be creative, for instance make a story of Computing and Networks that is related to your PBL experiences this year.

How a Computer Works

As we have learned, a computer needs aa program to do something smart. The sequence of a program initiates a series of actions with the computers Central Processing Unit (CPU). This component is essentially a binary machine focussing on program instructions provided. The CPU retrieives and stores the data it acts upon in Random Access Memory (RAM). Between the CPU, RAM, and Storage Devices a computer can work with many programs and large amounts of data.

List specification of your Computer, or Computers if working as Pair/Trio

my PC specs:

Define or describe usage of Computer using Computer Programs. Pictures are preferred over a lot of text. Use your experience.

The Internet

Watch/review College Board Daily Video for 4.1.1

Watch/review College Board Daily Video 4.1.2

ans + review/notes

More lines/connections means more resources are needed, however less lines generally lead to less security against faults.

redundant: the network can allow devices to communicate even if connections fail. also known as fault-tolerant.

more devices = stronger network connections

QUESTION 1:

the network is fault tolerant.

Question 2:

No. Also, you can easily determine fault tolerance by looking at each letter and seeing if there is more than 1 “line” connected to that letter. only 1 line = no fault tolerance.

Question 3:

No.

Question 4 (on 4.2 now):

C is false. C claims data will only take 1 route from 1 device to another. this is not true, the data can travel many different paths based on needs.

Question 5:

A. connect from A-B, as A only has one path right now.

big idea 4 notes

Path

Route

Computer System

Computer Device

Bandwidth

Computer Network

     User Machine  <---> Frontend Server <---> Backend Server
    +-----------+         +-----------+         +-----------+
    |  Browser  |         |  GH Page  |         |   Flask   |
    +-----------+    ^    +-----------+    ^    +-----------+
    |    HTTP   |    |    |    HTTP   |    |    |    HTTP   |
    +-----------+    |    +-----------+    |    +-----------+
    |    TCP    |    |    |    TCP    |    |    |    TCP    |   
    +-----------+    |    +-----------+    |    +-----------+
    |     IP    |    V    |     IP    |    V    |     IP    |
    +-----------+         +-----------+         +-----------+
    |  Network  |  <--->  |  Network  |  <--->  |  Network  |
    +-----------+         +-----------+         +-----------+

The “http” layer is an application layer protocol in the TCP/IP stack, used for communication between web browsers and web servers. It is the protocol used for transmitting data over the World Wide Web.

The “transport” layer (TCP) is responsible for providing reliable data transfer between applications running on different hosts. The TCP protocol segments the data into smaller chunks called “segments”. Each segment contains a sequence number that identifies its position in the original stream of data, as well as other control information such as source and destination port numbers, and checksums for error detection.

The “ip” layer is responsible for packetizing data received from the TCP layer of the protocol stack, and then encapsulating the data into IP packets. The IP packets are then sent to the lower layers of the protocol stack for transmission over the network.

The “network” layer is responsible for routing data packets between networks using the Internet Protocol (IP). This layer handles tasks such as packet addressing and routing, fragmentation and reassembly, and network congestion control.

diagrams

a quick flowchart for basic understanding of what programs do when run, NOT ABOUT NETWORKING

2nd diagram for general networking

Fault Tolerance

Watch both Daily videos for 4.2

ans

Fault tolerance is when the network of computers connected along each other is stable enough so that when a connecton between 2 computers is severed, the other computers in the networ are still able to connect to each other.

in the following example, the connection is not fault tolerant, as the severing of at least 1 connection will cause a computer to be unconnected in the network web.

Parallel and Distributed Computing

Review previous lecture on Parallel Computing and watch Daily vidoe 4.3. Think of ways to make something in you team project to utilize Cores more effectively. Here are some thoughts to add to your story of Computers and Networks…

Last week we discussed parallel computing on local machine. There are many options. Here is something to get parallel computing work with a tool called Ray.

  • Review this article… Can you get parallel code on images to work more effectively? I have not tried Ray.
import ray

# define a simple function that takes a number and returns its square
def square(x):
    return x * x

# initialize Ray
ray.init()

# create a remote function that squares a list of numbers in parallel
@ray.remote
def square_list(nums):
    return [square(num) for num in nums]

# define a list of numbers to square
nums = [1, 2, 3, 4, 5]

# split the list into two parts
split_idx = len(nums) // 2
part1, part2 = nums[:split_idx], nums[split_idx:]

# call the remote function in parallel on the two parts
part1_result = square_list.remote(part1)
part2_result = square_list.remote(part2)

# get the results and combine them
result = ray.get(part1_result) + ray.get(part2_result)

# print the result
print(result)