Fault Tolerance

Fault Tolerance: The ability of a system to continue to operate properly and without interruption if one or more of its components were to fail.

There are a few factors you need to confirm to decide if a system is fault tolerant or not. Think of each device/point as a pool, and the lines as pipes.

If to answer to all of these are “Yes,” then the system is Fault Tolerant.

Redundancy: Fault Tolerant networks typically have extra components and pathways to ensure reliability, making them have redundancy.

“Essential Knowledges” from College Board

Examples:

image-2.png

image.png

image-3.png

Popcorn Hack #1 (True or False)

image.png

Answer here: No, If the network line were to be cut off at line A, then the network would not reach all devices.

What are the benefits of having a Fault Tolerant Network?

ferferf

Popcorn Hack #2 (Multiple Choice)

image.png

Is this network above Fault Tolerant? If not, what changes can you make that can make this a fault tolerant network?

A is the correct answer.

- A: connection from *A ---> B*
- B: connection from *B ---> D*
- C: connection from *E ---> F*
- D: connection from *B ---> C*

Answer here:

Parallel and Distributed Computing

Computer Tasks: All of the tasks that are operated on the computer has to be handled by the computer. These tasks are scheduled by the operating system.

Because computers have many tasks to manage, they need to balance the tasks so all CPUs are being utilized evenly and fully.

Sequential Computing: Tasks are done one after the other; operations are performed one at a time.

Parallel Computing: tasks are done simultaneously.

image.png

Speedup Time: The speedup of a parallel solution is measured in the time it takes to complete the task sequentially divided by the time it takes to complete the task in parallel. Example Sequential time is 120 ms, parallel time is 60 ms, speedup time is 2 ms

Distributed Computing: sending of tasks from one computer to another; multiple devices are used to run a program. Requires a network.

image.png

For example, when you search something up on google, Google sends the request to thousands of servers in the backround for your answers.

Web Services: Standards on how computers can ask for tast execution over the web, including protocols

Beowolf Clusters: special software grouping different computers together

Essential Knowledges from College Board:

Popcorn Hack #3

Explain the difference between Sequential, Parallel, and Distributive computing in 1-2 sentences. Try to not look at answers above, and put it in your own words.

Sequential: Tasks done one after another

Parallel: Tasks done simultaeneously
Distributive: Tasks done using both parallel and sequential computing by using multiple computers to find the answer # HOMEWORK ## Fault Tolerance: Make two data flowcharts like the examples above, you can use MS paint, canva, any design website. Make one Fault Tolerant and one not fault tolerant, and explain what needs to be changed to the flowchart in order to make the network fault tolerant. Doing these will get you over a .90: - Neat design, easy to understand - real network examples; don't label each point as A-B-C etc. ## Parallel and Distributed Computing: - First make a simple code that runs sequentially, for example loops ten times before stopping. - Then make code that completes the same job quicker by running parallel. ![image.png](image.png) The problem with the not tolerant flowchart is that there is only one route to the router from each device. If one path is cut off, no other device can access the one that was cut off. To fix this, the tolerant one had connections to all devices so if one route was cut off, the data could still get to its destination through the other routes between the devices. ```python # Sequential Computing def sequential_task(): for i in range(10): print(f"This is a sequential task {i}") sequential_task() ``` This is a sequential task 0 This is a sequential task 1 This is a sequential task 2 This is a sequential task 3 This is a sequential task 4 This is a sequential task 5 This is a sequential task 6 This is a sequential task 7 This is a sequential task 8 This is a sequential task 9 ```python from concurrent.futures import ThreadPoolExecutor def parallel_task(i): print(f"Parallel Sequence {i}") def main(): num_tasks = 10 with ThreadPoolExecutor() as executor: # Submit tasks to the executor futures = [executor.submit(parallel_task, i) for i in range(num_tasks)] # Wait for all tasks to complete for future in futures: future.result() if __name__ == "__main__": main() ``` Parallel Sequence 0 Parallel Sequence 1 Parallel Sequence 2 Parallel Sequence 3 Parallel Sequence 4 Parallel Sequence 5 Parallel Sequence 6 Parallel Sequence 7 Parallel Sequence 8 Parallel Sequence 9