The Secret Life of Programs Flashcards

1
Q

What is the procedure to run a simple function?

A

1) Compute Address
2) Store Argument
3) Branch to function
4) Return to computed address in Step 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to stacks help?

A

Stacks aid in mapping memory addresses to appropriate function calls.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the benefits of Interrupt handler?

A

Interrupts happen frequently. Handlers allow state storage and increase response time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the alternative to index registers and relative addressing?

A

MMU’s isolate programs for protection. They decide between virtual and physical memory addresses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the benefits of virtual memory?

A

Virtual memory frees up space, leads to caching and swapping.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the benefit of a memory hierarchy?

A

It helps with caching and accessing to avoid performance issues when sapping.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the purpose of libraries?

A

Libraries help to reduce the amount of memory allocated to a single program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is lexical analysis?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is assembly language?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does storage in unix work?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is garbage collection?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Who invented garbage collection?

A

John McCarthy in 1959

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are compound data types?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is dynamic memory allocation?

A

Dynamic memory allocation is the process of assigning the memory space during the execution time or the run time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are primitive data types?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are bitmaps?

A

A bitmap is a type of memory organization or image file format used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits, a spatially mapped array of bits. Now, along with pixmap, it commonly refers to the similar concept of a spatially mapped array of pixels. Raster images in general may be referred to as bitmaps or pixmaps, whether synthetic or photographic, in files or memory.

17
Q

What are sine waves?

A

A sine wave or sinusoid is a mathematical curve that describes a smooth periodic oscillation. A sine wave is a continuous wave. It is named after the function sine, of which it is the graph. It occurs often in pure and applied mathematics, as well as physics, engineering, signal processing and many other fields.

18
Q

How do packet-switches work?

A

Packet switching breaks data into a number of parts that are packaged in specially formatted units called packets. These are typically routed from the source to the destination using network switches and routers, then the data is reassembled at the destination.

19
Q

What is an interpreter?

A

In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program.

20
Q

What is a compiler?

A

A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or “code” that a computer’s processor uses. Typically, a programmer writes language statements in a language such as Pascal or C one line at a time using an editor.