Unit 1 Flashcards

1
Q

What component of a computer does all the computing work?

A

CPU (Central Porcessing Unit)

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

What is a program?

A

A list of unambiguous instructions meant to be followed mechanically by a computer.

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

What is machine langauge?

A

The language a computer understands. A program can only be executed if matches the computers language, or is translated first.

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

What does main memory consist of?

A

A sequence of locations. Each sequence number is called an address.

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

What is a location?

A

A sequence of addresses that is part of the main memory.

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

What is an address?

A

A single sequence number in a location. Provides a way of picking out one particular piece of information from among the millions stored in memory

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

How does the CPU interact with the Main Memory?

A

It sends the address of information it needs as a signal to the memory; the memory responds by sending back the value contained in the specified location.

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

What is Fetching?

A

When the CPU repeatedly reads an instruction from memory.

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

What is executing?

A

Carrying out an instruction from memory.

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

What is the Fetch-and-Execute Cycle?

A

The process of—fetch an instruction, execute it, fetch another instruction, execute it, and so on forever. This is all the CPU ever does (with 1 exception).

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

What does a multi-core CPU allow the computer to do?

A

Allows the CPU to execute several instructions simultaneously.

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

What does a Memory Cache allow?

A

Allows the computer to store information separate from the main memory, which are meant to hold data and instructions that the CPU is likely to need soon.

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

What does a CPU contain (3 answers)?

A
  1. ALU (Arithmetic Logic Unit)
  2. Multiple Registers
  3. PC
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a General Purpose Register?

A

This is part of the CPU and contains a single number. Machine Language often refers to these. They can be added (by the ALU) and have the result be entered into another one of these.

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

What is the most common Special Purpose Register?

A

The most common is the PC (Program Counter).

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

What is the ALU?

A

A part of the CPU, this is used to add or subtract.

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

What does the PC do?

A

The CPU uses this to keep track of where it is in the program it is executing. It simply stores the memory address of the next instruction that the CPU should execute.

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

What is a transistor?

A

This is how a computer executes programs. It is all done mechanically. When one turns off, it can trigger others to either turn on or off as well based on how they are wired together or based on the program being executed.

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

What is machine language made up of?

A

Binary Numbers

20
Q

What two digits make up all binary numbers?

A

0 and 1

21
Q

What is a bit?

A

A digit in a binary number. Ex. a single 1 or 0.

22
Q

What is a byte?

A

A sequence of 8 bits. This is a single memory location.

23
Q

What does main memory hold?

A

Holds machine language programs and data.

24
Q

How long can the Main Memory hold onto information?

A

Until the power is turned off.

25
Q

What is a device driver?

A

Consists of software that the CPU executes when it has to deal with an external device.

26
Q

What is a Bus?

A

A set of wires that carry various sorts of information between the devices connected to those wires.

27
Q

What is Polling?

A

The CPU polls connected input devices continually to see whether they have any input data to report. Unfortunately, although polling is very simple, it is also very inefficient. The CPU can waste an awful lot of time just waiting for input.

28
Q

What are Interrupts?

A

It is a signal sent by another device to the CPU. The CPU responds to an interrupt signal by putting aside whatever it is doing in order to respond to the interrupt.

29
Q

What is an Interrupt Handler?

A

Part of a device driver software. It holds the instructions for the CPU whenever the device sends an interrupt signal. The last thing it tells the CPU is for it to continue what it was previously doing.

30
Q

What is an asynchronous event?

A

When an interrupt takes the CPU off it’s regular fetch-and-execute cycle, to do something else before continuing it’s fetch-and-execute cycle again. These happen at unpredictable times (unpredictable for the CPU)

Ex. Pressing a button on a keyboard.

31
Q

What is timesharing?

A

When a CPU is multitasking and it is giving fractions of a second to each user at a time. This is a type of mutlitasking only used when multiple users are using a single CPU.

32
Q

What is a thread?

A

An individual task that the CPU is working on.

33
Q

What does a blocked thread mean?

A

It is waiting for something to happen. Either to retrieve data from the hard drive or for the user to input something. This will allow other threads to run until it receives what is requires.

34
Q

What is preemptive Multitasking?

A

A computer needs a special timer device that generates an interrupt at regular intervals, such as 100 times per second. When a timer interrupt occurs, the CPU has a chance to switch from one thread to another, whether the thread that is currently running likes it or not.

35
Q

What type of multitasking do most modern devices use?

A

Preemptive Multitasking

36
Q

What are Event Handlers?

A

They are called asynchronously when specific events occur. Such “event-driven programming” has a very different feel from the more traditional straight-through, synchronous programming.

37
Q

What is the operating system?

A

The software that does all the interrupt handling, handles communication with the user and with hardware devices, and controls which thread is allowed to run

38
Q

What are high-level programming languages?

A

Complex languages that must be translated into simple machine language before a CPU can run them. Most programs use these.

39
Q

What are some examples of high-level programming languages?

A

Java
Python
C++

40
Q

What is a Compiler?

A

Takes a high-level-language program and translates it into an executable machine-language program. It does the entire translation at once.

41
Q

What is an Interpreter?

A

It translate high-level programming languages to simple machine language one instruction at a time.

42
Q

What is an example of an Interpreter, that allows programs meant for one machine language to be run on a different machine language?

A

An Emulator

43
Q

What is the Java Virtual Machine (JVM)?

A

programs written in Java are compiled into A machine language, but it is a machine language for a computer that doesn’t really exist. This is the name of that ‘virtual’ computer.

44
Q

What is a Java Bytecode?

A

This is what the machine language for the Java Virtual Machine is called.

45
Q

What is a major advantage of the JVM?

A

The machine language is uses can be interpreted by any computer. So it is very versatile.

46
Q

What does a Just-in-Time Compiler do?

A

It translates Java bytecode into native machine language. It does this while it is executing the program. This speeds up the process.