├── CNAME
├── languages
└── craftinginterpreters
│ ├── jlox
│ ├── .gitignore
│ ├── .idea
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── project-template.xml
│ │ ├── dictionaries
│ │ │ └── sakib.xml
│ │ ├── encodings.xml
│ │ ├── vcs.xml
│ │ ├── modules.xml
│ │ └── misc.xml
│ ├── class-sample.lox
│ ├── src
│ │ └── dev
│ │ │ └── sakib
│ │ │ └── lox
│ │ │ ├── LoxCallable.java
│ │ │ ├── Return.java
│ │ │ ├── RuntimeError.java
│ │ │ ├── Token.java
│ │ │ ├── TokenType.java
│ │ │ ├── LoxInstance.java
│ │ │ ├── Environment.java
│ │ │ ├── LoxClass.java
│ │ │ ├── LoxFunction.java
│ │ │ ├── AstPrinter.java
│ │ │ ├── Lox.java
│ │ │ ├── Stmt.java
│ │ │ ├── Expr.java
│ │ │ └── Scanner.java
│ ├── .run
│ │ └── Template Application.run.xml
│ ├── jlox.iml
│ ├── tool
│ │ ├── tool.iml
│ │ └── src
│ │ │ └── GenerateAst.java
│ └── sample.lox
│ └── hello.lox
├── _config.yml
├── algorithms
├── README.md
└── the-algorithm-design-manual
│ └── programming-challenges
│ ├── uva10137
│ ├── README.md
│ └── uva10137.py
│ ├── uva843
│ ├── README.md
│ └── uva843.py
│ ├── uva10004
│ ├── README.md
│ └── uva10004.py
│ ├── uva10152
│ ├── README.md
│ └── uva10152.py
│ ├── uva850
│ ├── README.md
│ └── uva850.py
│ ├── uva100
│ ├── README.md
│ └── uva100.py
│ ├── uva10010
│ ├── README.md
│ └── uva10010.py
│ ├── uva10038
│ ├── README.md
│ └── uva10038.py
│ ├── uva10041
│ ├── README.md
│ └── uva10041.py
│ ├── uva10142
│ ├── README.md
│ └── uva10142.py
│ ├── uva847
│ ├── README.md
│ └── uva847.py
│ ├── uva10035
│ ├── README.md
│ └── uva10035.py
│ ├── uva10110
│ ├── README.md
│ └── uva10110.py
│ ├── uva10037
│ ├── README.md
│ └── uva10037.py
│ ├── uva10026
│ ├── README.md
│ └── uva10026.py
│ ├── uva120
│ ├── uva120.py
│ └── README.md
│ ├── new_uva.py
│ └── README.md
├── os
└── OSTEP
│ ├── 19-tlb
│ └── homeworks
│ │ ├── chart.png
│ │ ├── chart-aws.png
│ │ ├── chart-thread-affinity.png
│ │ ├── data-v3.csv
│ │ ├── run-tlb.sh
│ │ ├── data-v2.csv
│ │ ├── data-v4.csv
│ │ ├── data-v2-aws.csv
│ │ ├── data-v4-aws.csv
│ │ ├── tlb.c
│ │ ├── README.md
│ │ └── data-v1.csv
│ ├── 21-swapping-mechanisms
│ └── homeworks
│ │ ├── chart.png
│ │ └── README.md
│ ├── 06-limited-direct-execution
│ └── homeworks
│ │ ├── common.h
│ │ ├── system_call.c
│ │ └── context_switch.c
│ ├── 15-address-translation
│ ├── p1.c
│ └── p1.s
│ ├── 22-swapping-policy
│ └── homeworks
│ │ ├── FIFO, RAND, LRU and CLOCK.png
│ │ ├── run.sh
│ │ └── README.md
│ ├── 29-locked-data-structures
│ └── homeworks
│ │ ├── Time vs. Threshold.png
│ │ ├── common.h
│ │ ├── README.md
│ │ ├── counter.c
│ │ └── sloppycounter.c
│ ├── 14-memory-api
│ └── homeworks
│ │ ├── null.c
│ │ ├── array.c
│ │ ├── array3.c
│ │ ├── array2.c
│ │ ├── unfreed.c
│ │ └── vector.c
│ ├── 05-process-api
│ ├── notes.md
│ ├── homeworks
│ │ ├── p3.c
│ │ ├── p2.c
│ │ ├── p1.c
│ │ ├── p5.c
│ │ ├── p7.c
│ │ ├── p4.c
│ │ ├── p6.c
│ │ └── p8.c
│ ├── fork.c
│ ├── wait.c
│ ├── redirect.c
│ └── exec.c
│ ├── 48-distributed-systems
│ └── homeworks
│ │ ├── Makefile
│ │ ├── server.c
│ │ ├── client.c
│ │ └── common.h
│ ├── 13-address-space
│ ├── va.c
│ └── homeworks
│ │ ├── README.md
│ │ └── memory-user.c
│ ├── 45-data-integrity-and-protection
│ └── homeworks
│ │ ├── check-xor.c
│ │ ├── check-fletcher.c
│ │ ├── create-csum.c
│ │ ├── crc.c
│ │ ├── README.md
│ │ └── check-csum.c
│ ├── 04-processes
│ ├── memory.c
│ ├── system_call.c
│ ├── common.h
│ ├── thread.c
│ └── common_threads.h
│ ├── 31-semaphores
│ └── homeworks
│ │ ├── fork-join.c
│ │ ├── rendezvous.c
│ │ ├── mutex-nostarve.c
│ │ ├── common_threads.h
│ │ ├── barrier.c
│ │ ├── reader-writer.c
│ │ └── reader-writer-nostarve.c
│ ├── 27-thread-api
│ ├── thread.c
│ ├── pi.go
│ ├── homeworks
│ │ └── README.md
│ └── pi.c
│ ├── 26-concurrency-and-threads
│ ├── thread.c
│ └── homeworks
│ │ └── README.md
│ ├── 41-fast-fs
│ └── homeworks
│ │ └── README.md
│ ├── 20-advanced-page-tables
│ └── homeworks
│ │ └── README.md
│ ├── 39-files-and-directories
│ └── homeworks
│ │ ├── stat.c
│ │ ├── tree.c
│ │ ├── ls.c
│ │ └── tail.c
│ ├── 10-multi-cpu-scheduling
│ └── homeworks
│ │ └── README.md
│ ├── 38-raids
│ └── homeworks
│ │ └── README.md
│ ├── 18-paging
│ └── homeworks
│ │ └── README.md
│ ├── 44-ssd
│ └── homeworks
│ │ └── README.md
│ ├── 33-event-based-concurrency
│ └── homeworks
│ │ ├── README.md
│ │ ├── tcp.c
│ │ ├── multi-tcp.c
│ │ ├── file-tcp.c
│ │ └── aio-file-tcp.c
│ ├── 37-hard-disk-drive
│ └── homeworks
│ │ └── README.md
│ ├── 32-concurrency-bugs
│ └── homeworks
│ │ └── README.md
│ ├── 28-locks
│ └── homeworks
│ │ └── README.md
│ ├── 17-freespace
│ └── homeworks
│ │ └── README.md
│ ├── README.md
│ ├── 16-segmentation
│ └── homeworks
│ │ └── README.md
│ ├── 42-fsck-and-journaling
│ └── homeworks
│ │ └── README.md
│ ├── 30-condition-variables
│ └── homeworks
│ │ └── README.md
│ ├── 43-lfs
│ └── homeworks
│ │ └── README.md
│ └── 40-fs-implementation
│ └── homeworks
│ └── README.md
├── .gitignore
└── README.md
/CNAME:
--------------------------------------------------------------------------------
1 | cs.sakib.dev
--------------------------------------------------------------------------------
/languages/craftinginterpreters/jlox/.gitignore:
--------------------------------------------------------------------------------
1 | out
2 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-minimal
2 |
3 | title: cs.sakib.dev
4 |
--------------------------------------------------------------------------------
/languages/craftinginterpreters/jlox/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /workspace.xml
--------------------------------------------------------------------------------
/algorithms/README.md:
--------------------------------------------------------------------------------
1 | [Programming challenges](./the-algorithm-design-manual/programming-challenges/)
--------------------------------------------------------------------------------
/os/OSTEP/19-tlb/homeworks/chart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjsakib/cs/HEAD/os/OSTEP/19-tlb/homeworks/chart.png
--------------------------------------------------------------------------------
/os/OSTEP/19-tlb/homeworks/chart-aws.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjsakib/cs/HEAD/os/OSTEP/19-tlb/homeworks/chart-aws.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # ignore all extensionless files
2 | *
3 | !*/
4 | !*.*
5 |
6 | # output files
7 | *.output
8 |
9 | .vscode
10 |
--------------------------------------------------------------------------------
/os/OSTEP/19-tlb/homeworks/chart-thread-affinity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjsakib/cs/HEAD/os/OSTEP/19-tlb/homeworks/chart-thread-affinity.png
--------------------------------------------------------------------------------
/os/OSTEP/21-swapping-mechanisms/homeworks/chart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjsakib/cs/HEAD/os/OSTEP/21-swapping-mechanisms/homeworks/chart.png
--------------------------------------------------------------------------------
/languages/craftinginterpreters/jlox/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/languages/craftinginterpreters/jlox/.idea/project-template.xml:
--------------------------------------------------------------------------------
1 |
2 | IJ_BASE_PACKAGE
3 |
--------------------------------------------------------------------------------
/os/OSTEP/06-limited-direct-execution/homeworks/common.h:
--------------------------------------------------------------------------------
1 | long get_dt(long s1, long us1, long s2, long us2) {
2 | return (s1-s2)*1e6 + (us1 - us2);
3 | }
4 |
--------------------------------------------------------------------------------
/os/OSTEP/15-address-translation/p1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main(int argc, char** argv) {
4 | int x = 10;
5 | x+=2;
6 | return 0;
7 | }
8 |
--------------------------------------------------------------------------------
/os/OSTEP/22-swapping-policy/homeworks/FIFO, RAND, LRU and CLOCK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjsakib/cs/HEAD/os/OSTEP/22-swapping-policy/homeworks/FIFO, RAND, LRU and CLOCK.png
--------------------------------------------------------------------------------
/os/OSTEP/29-locked-data-structures/homeworks/Time vs. Threshold.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjsakib/cs/HEAD/os/OSTEP/29-locked-data-structures/homeworks/Time vs. Threshold.png
--------------------------------------------------------------------------------
/languages/craftinginterpreters/jlox/class-sample.lox:
--------------------------------------------------------------------------------
1 | class DevonshireCream {
2 | serveOn() {
3 | return "Scones";
4 | }
5 | }
6 |
7 | print DevonshireCream;
8 |
9 | print DevonshireCream();
--------------------------------------------------------------------------------
/os/OSTEP/14-memory-api/homeworks/null.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc, char **argv) {
5 | int *x = NULL;
6 | printf("%d\n", *x);
7 | return 0;
8 | }
9 |
--------------------------------------------------------------------------------
/os/OSTEP/05-process-api/notes.md:
--------------------------------------------------------------------------------
1 | ## How do we run a program?
2 |
3 | So, we evoke programs in a shell, the the shell uses `fork`, `exec`, `wait` etc to run the program. But how does the shell itself starts?
4 |
--------------------------------------------------------------------------------
/os/OSTEP/48-distributed-systems/homeworks/Makefile:
--------------------------------------------------------------------------------
1 | all: server client
2 |
3 | server: server.c common.h
4 | gcc server.c -o server -Wall
5 |
6 | client: client.c common.h
7 | gcc client.c -o client -Wall
8 |
--------------------------------------------------------------------------------
/os/OSTEP/14-memory-api/homeworks/array.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc, char **argv) {
5 | int *x = malloc(10 * sizeof(int));
6 | x[10] = 0;
7 | return 0;
8 | }
9 |
--------------------------------------------------------------------------------
/os/OSTEP/14-memory-api/homeworks/array3.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc, char **argv) {
5 | int *x = malloc(10 * sizeof(int));
6 | free(x + 5);
7 | return 0;
8 | }
9 |
--------------------------------------------------------------------------------
/languages/craftinginterpreters/jlox/.idea/dictionaries/sakib.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | sakib
5 |
6 |
7 |
--------------------------------------------------------------------------------
/languages/craftinginterpreters/jlox/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/os/OSTEP/19-tlb/homeworks/data-v3.csv:
--------------------------------------------------------------------------------
1 | Pages, Accessing all of them 100000 times
2 | 1, 398
3 | 2, 203
4 | 4, 197
5 | 8, 192
6 | 16, 475
7 | 32, 929
8 | 64, 845
9 | 128, 853
10 | 256, 818
11 | 512, 810
12 | 1024, 823
13 | 2048, 628
14 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva10137/README.md:
--------------------------------------------------------------------------------
1 | # 10137 - The Trip
2 |
3 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva10137/uva10137.py)
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva843/README.md:
--------------------------------------------------------------------------------
1 | # UVa 843 - Crypt Kicker
2 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva843/uva843.py)
3 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva10004/README.md:
--------------------------------------------------------------------------------
1 | # UVa 10004 - Bicoloring
2 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva10004/uva10004.py)
3 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva10152/README.md:
--------------------------------------------------------------------------------
1 | # UVa 10152 - ShellSort
2 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva10152/uva10152.py)
3 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva850/README.md:
--------------------------------------------------------------------------------
1 | # UVa 850 - Crypt Kicker II
2 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva850/uva850.py)
3 |
--------------------------------------------------------------------------------
/languages/craftinginterpreters/jlox/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/os/OSTEP/14-memory-api/homeworks/array2.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc, char **argv) {
5 | int *x = malloc(10 * sizeof(int));
6 | free(x);
7 | printf("%d\n", x[5]);
8 | return 0;
9 | }
10 |
--------------------------------------------------------------------------------
/os/OSTEP/14-memory-api/homeworks/unfreed.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc, char **argv) {
5 | int *x = (int*) malloc(sizeof(int));
6 | *x = 10;
7 | printf("%d\n", *x);
8 | return 0;
9 | }
10 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva100/README.md:
--------------------------------------------------------------------------------
1 | # UVa 100 - The 3n + 1 problem
2 |
3 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva100/uva100.py)
4 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva10010/README.md:
--------------------------------------------------------------------------------
1 | # UVa 10010 - Where's Waldorf?
2 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva10010/uva10010.py)
3 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva10038/README.md:
--------------------------------------------------------------------------------
1 | # UVa 10038 - Jolly Jumpers
2 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva10038/uva10038.py)
3 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva10041/README.md:
--------------------------------------------------------------------------------
1 | # UVa 10041 - Vito's Family
2 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva10041/uva10041.py)
3 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva10142/README.md:
--------------------------------------------------------------------------------
1 | # UVa 10142 - Australian Voting
2 |
3 | [Python code](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva10142/uva10142.py)
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva847/README.md:
--------------------------------------------------------------------------------
1 | # UVa 847 - A Multiplication Game
2 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva847/uva847.py)
3 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva10035/README.md:
--------------------------------------------------------------------------------
1 | # UVa 10035 - Primary Arithmetic
2 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva10035/uva10035.py)
3 |
--------------------------------------------------------------------------------
/algorithms/the-algorithm-design-manual/programming-challenges/uva10110/README.md:
--------------------------------------------------------------------------------
1 | # UVa 10110 - Light, more light
2 | [Python solution](https://github.com/sjsakib/cs/blob/master/algorithms/the-algorithm-design-manual/programming-challenges/uva10110/uva10110.py)
3 |
--------------------------------------------------------------------------------
/languages/craftinginterpreters/jlox/src/dev/sakib/lox/LoxCallable.java:
--------------------------------------------------------------------------------
1 | package dev.sakib.lox;
2 |
3 | import java.util.List;
4 |
5 | public interface LoxCallable {
6 | int arity();
7 | Object call(Interpreter interpreter, List