The Secret Life of Programs Flashcards
What is the procedure to run a simple function?
1) Compute Address
2) Store Argument
3) Branch to function
4) Return to computed address in Step 1.
How to stacks help?
Stacks aid in mapping memory addresses to appropriate function calls.
What are the benefits of Interrupt handler?
Interrupts happen frequently. Handlers allow state storage and increase response time.
What is the alternative to index registers and relative addressing?
MMU’s isolate programs for protection. They decide between virtual and physical memory addresses.
What are the benefits of virtual memory?
Virtual memory frees up space, leads to caching and swapping.
What is the benefit of a memory hierarchy?
It helps with caching and accessing to avoid performance issues when sapping.
What is the purpose of libraries?
Libraries help to reduce the amount of memory allocated to a single program.
What is lexical analysis?
Lexical Analysis is the first phase of compiler also known as scanner. It converts the High level input program into a sequence of Tokens.
Lexical Analysis can be implemented with the Deterministic finite Automata.
The output is a sequence of tokens that is sent to the parser for syntax analysis
What is assembly language?
In computer programming, assembly language (or assembler language),[1] often abbreviated asm, is any low-level programming language in which there is a very strong correspondence between the instructions in the language and the architecture’s machine code instructions.[2] Because assembly depends on the machine code instructions, every assembler has its own assembly language which is designed for exactly one specific computer architecture.
How does storage in unix work?
The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block locations of the object’s data.
What is garbage collection?
In computer science, garbage collection (GC) is a form of automatic memory management. Garbage collection is essentially the opposite of manual memory management, which requires the programmer to specify which objects to deallocate and return to the memory system.
Who invented garbage collection?
John McCarthy in 1959
What are compound data types?
In computer science, a composite data type or compound data type is any data type which can be constructed in a program using the programming language’s primitive data types and other composite types. It is sometimes called a structure or aggregate data type,[1] although the latter term may also refer to arrays, lists, etc.
What is dynamic memory allocation?
Dynamic memory allocation is the process of assigning the memory space during the execution time or the run time.
What are primitive data types?
In computer science, primitive data type is either of the following:[citation needed]
a basic type is a data type provided by a programming language as a basic building block. Most languages allow more complicated composite types to be recursively constructed starting from basic types.
a built-in type is a data type for which the programming language provides built-in support.