CS:APP One Flashcards

(29 cards)

1
Q

What is a computer system?

A

A collection of hardware and software components that work together to run computer programs.

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

What is the source program a sequence of?

A

Bits with a value of 0 or 1

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

What are bits organised into?

A

8 bit chunks called bytes

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

What does each byte have?

A

An integer value that corresponds to a character

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

What are text files?

A

Files that consist exclusively of ACII characters?

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

What are files other than text files called?

A

Binary files

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

What is all information represented as?

A

A bunch of bits

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

What distinguishes different data objects?

A

The context in which we view them. For example, the same sequence of bits may represent an integer and a character.

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

What is a property of a high level program?

A

It can be understood by humans

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

What is required to run a high level program on a computer?

A

They must be translated by programs into a sequence of low level machine language instructions. THese instructions are then packaged in a form called an executable object program and stored as a binary disk file.

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

What is the translation from source file to object file performed by?

A

A compiler

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

What are the four phases of the compilation system?

A

Preprocessor, compiler, assembler, linker

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

What does the preprocessor do?

A

modifies the orginal C program according to directives that begin with the # character

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

What does the compiler do?

A

Translates into a file that contains an assembly language program. Each statement in an assembly language program exactly describes one low level machine language instruction in a standard text form

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

Why is assembly language useful?

A

It provides a common output language for different compilers for different high level languages

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

What does the assembler do?

A

translates the file into machine language instructions and packages them into relocatable object program. The file is a binary file whose bytes encode machine language instructions rather than characters.

17
Q

What does the linker do?

A

Handles the merging between files needed residing in the standard library/other files.

18
Q

What are 3 reasons programmers should know how compilers work?

A

We need to know how to optimise program performance. To understand link-time errors. Avoiding security bugs.

19
Q

What are buses?

A

Buses carry bytes of information back and forth between components.

20
Q

What are i/o devices?

A

I/o devices are the systems connections with the outer world.

21
Q

What is the processor?

A

The CPU is the engine that interprets (executes) instructions stored in the main memeory.

22
Q

What is at the core of a processors

A

A program counter (word sized storage device or register)

23
Q

What is cache?

A

Cache is extra memory that is quicker to read from than main memory.

24
Q

What is an operating system (simply)?

A

A layer of software interposed between the application program and the hardware. All attempts by an application program to manipulate the hardware must go through the operating system

25
What are the two primary purposes of the operating system
TO protect the hardware from misuse. to provide applications with simple and uniform mechanisms for manipulating complicated and different hardware devices.
26
With what 3 abstractions does an operating system perform its purposes?
processes, virtual memory and files
27
What illusions are added by the idea of a process?
The program is te only one running on the system. THe program appears to have exclusive use of the processor, main memory and io devices. One after the other.
28
What is a process?
It is the operating systems abstraction for running a program.
29
What is context switching?
It is how operations of one process are interleaved with each other (concurrency)