Skip to content

Instantly share code, notes, and snippets.

View evscott's full-sized avatar

Eliot V Scott evscott

View GitHub Profile
@evscott
evscott / q1.c
Last active November 14, 2019 03:15
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <pthread.h>
const int CW_TIME = 10000000;
// Threaded task
void *childsWork(void *param) {
@evscott
evscott / sol.c
Last active December 2, 2019 19:56
Short assignment 4 part 1
void copy_loader() {
int dev_addr = START_ADDR;
char *mem_addr = (char *) malloc(length * sizeof(char));
for(int i = 0; i < LOADER_LEN; i++) {
char *byte = dev_read_byte(dev_addr, mem_addr);
dev_write_byte((int) mem_addr, byte);
dev_addr++;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>My Website</h1>
<p>Some text...</p>
#!/usr/bin/python
# receiver.py
#
# Go-Back-N simulation based on the RDT 2.2 protocol described in
# section 3.4.1 of Computer Networking: A Top-Down Approach, Kurose-Ross, 7th edition
#
import sys
from sm import StateMachine
import rdtlib