package sexpr import ( “fmt” “math/big” ) // SExpr defines the struct of an S-expression. // 1. If this S-expression is `NIL`: all `atom`, `car`…
;; You may define helper functions here (defun reachable (transition start final input) ;; TODO: Incomplete function ;; The next line should not be in…
Cryptography basics – Integrity: Hashes and MACs ECEN 4133 Jan 19, 2021 Alice and Bob Alice wants to send message m to Bob ◦ Can’t…
#include #include int a = 42; int main(int argc, char *argv[]) { int b = 23; printf(“Hello world! ”); fork(); printf(“My favorite number is %d.…
#include #include #include int main(void) { if (fork() > 0) /* Forces parent to wait for child * to force scheduling order */ wait(NULL); printf(“My…
#include #include #include int main(int argc, char *argv[]) { struct stat sb; stat(argv[1], &sb); printf(“File type: “); switch (sb.st_mode & S_IFMT) { case S_IFDIR: printf(“directory…
#include #include #include #include int main(void) { pid_t pid; char *cmd = “/bin/echo”; char *args[] = { cmd, “ECS150”, NULL}; pid = fork(); if (pid…
ECS 150 – OS Structure Prof. Joël Porquet-Lupine UC Davis – 2020/2021 Copyright © 2017-2021 Joël Porquet-Lupine – CC BY-NC-SA 4.0 International License / 1…
Cryptography Basics – Block ciphers and modes ECEN 4133 Jan 26, 2021 Alternative to stream cipher: Block Ciphers Today’s most common block cipher: AES (Advanced…
#include #include #include int i = 1; int main(void) { int j = 10; int *k = malloc(sizeof(int)); *k = 4; if (fork()) { i…