diff --git a/.zk/notebook.db b/.zk/notebook.db index b58e678..ddddef7 100644 Binary files a/.zk/notebook.db and b/.zk/notebook.db differ diff --git a/zk/Call_stack.md b/zk/Call_stack.md index f80297c..805e7fa 100644 --- a/zk/Call_stack.md +++ b/zk/Call_stack.md @@ -1,13 +1,13 @@ --- -tags: [] +tags: [memory, javascript] --- # The call-stack -A [stack](Stacks.md) data structure that holds the information -of the functions called within a program that allows transfer of the application -control from these functions to the main process after code inside the functions -has been executed. +A [stack](Stacks.md) data structure that holds the information of the functions +called within a program that allows transfer of the application control from +these functions to the main process after code inside the functions has been +executed. ## Example @@ -31,3 +31,7 @@ console.log("Bye"); function: the `console.log("bye")` 6. Executes 7. Returns to line that called it. Finds nothing else to do. Exits program. + +## Related notes + +![Stack memory](Stack_memory.md) diff --git a/zk/Processes.md b/zk/Processes.md index 18cfdb0..3a93e92 100644 --- a/zk/Processes.md +++ b/zk/Processes.md @@ -5,7 +5,7 @@ tags: [operating-systems] created: Friday, June 21, 2024 --- -# Processes and threads +# Processes Programs are sequences of machine instructions stored in a file. However they do not work by themselves. Something needs to load the file's intructions into diff --git a/zk/Stack_memory.md b/zk/Stack_memory.md index 7eddc47..1a05667 100644 --- a/zk/Stack_memory.md +++ b/zk/Stack_memory.md @@ -11,7 +11,7 @@ created: Tuesday, April 16, 2024 - Along with [[Heap_memory|heap memory]] heap memory, programs make use of _stack memory_ during runtime. -- [ ] + - Best suited for small-sized singular values that are temporary/ephemeral rather than large or complex data types that need to persist for a longer time. diff --git a/zk/Threads.md b/zk/Threads.md new file mode 100644 index 0000000..39407f4 --- /dev/null +++ b/zk/Threads.md @@ -0,0 +1,19 @@ +--- +id: zadl +title: Threads +tags: [] +created: Wednesday, June 26, 2024 +--- + +# Threads + +A process is a running instance of a given program. A program runs sequentially +handling one task at a time, however we may need to run certain tasks in +parallel. + +For example think of a program that is downloading a resource from the internet +and wants to update the UI at the same time to show the download process. + +## Related notes + +![Processes](Processes.md)