Mock Revision Flashcards
What is a FAT?
A map of where files are stored. Also contains various metadata, such as file names, access rights, and file sizes. It is used by the operating system when files are saved, deleted and accessed
What is a BIOS? What does it do?
BIOS (basic input/output system) is the program a personal computer’s microprocessor uses to get the computer system started after you turn it on. It also manages data flow between the computer’s operating system and attached devices such as the hard disk, video adapter, keyboard, mouse and printer.
What is a TCP/IP
Transmission Control Protocol/Internet Protocol
TCP governs how messages are prepared and, once they’re received, it governs how they are decoded.
Steps for sending data:
- Divide the message into chunks of data called “packets”.
- Add a sequence number to each packet. This lets the receiving computer know what order the packets are supposed to be re-assembled in.
- Add error-correction data, so errors introduced during transmission can be spotted and fixed
Steps for receiving data:
- Examine each packet for errors by using the extra information that was added to it
- Fix errors (if possible) or request that the packet be re-sent
- Identify missing packets and request them to be re-sent
- Reassemble the message in the correct order, using the sequence number of each packet
- Send the message on to the correct application. Emails go to the email application, web pages go to the browser, etc.
What is an interrupt and what does it do?
Interrupts are used to tell the processor to stop what it is doing because there is something more important which needs dealing with.
Before FDE Cycle, CPU checks contents of interrupt register. If there is an interrupt in the IR with higher priority than the current task, then the interrupt is processed.
What are the goals of a scheduler?
- To make efficient use of processor time
- To make efficient use of resources
- To maximise the number of users without apparent delay
- To maximise the throughput of the CPU
How does Round Robin Scheduling work?
Each task is given a small “time slice” - perhaps of a few milliseconds. After the time is up, the processor moves on to the next task.
How does Shortest Job First work?
The shortest job is processed first. Although this leads to lots of jobs being done quickly, it can lead to some longer jobs never getting processed.
How does Shortest Time Remaining work?
The job with the least time remaining is processed first. This is similar to shortest job first, although it is considered sightly superior because long jobs will slowly “bubble up” until they have the shortest time remaining.
How does First Come First Served the first work?
The first job to be ready for processing is processed.
How does Multi-Level Feedback Queues
A number of queues are set up. If a task actively uses large amounts of processor time, it is placed in a lower priority queue, until it reaches the “base” queue, which operates in a round robin fashion.
What is Machine Code?
Machine code consists of all the possible instructions for a particular processor. The code is often very hard for humans to understand and write without mistakes, because it is encoded in binary.
What is an assembler?
An assembler then “assembles” the program from assembly language into machine code. One assembly language instruction is translated into one machine code instruction. A symbol table is created to match labels to addresses. Finally, the syntax is checked, and diagnostics are offered for errors (if any).
What is lexical analysis?
Lexical analysis takes the source program, strips out comments and whitespace, and replaces reserved words and symbols used in the program with tokens (fixed length strings of binary digits). Variable names are stored for later use and error messages are output if necessary.
What is syntax analysis?
Syntax analysis is where the token stream is verified against the syntax rules of the programming language. Consider the token stream above. It reads:
What is code generation?
Code generation is where code is actually converted into machine code (which can be executed).
During code generation, the code can be optimised - either for smallest code size, or fastest performance, or to improve some other aspect of the code.
Array
An array processor has a number of Arithmetic Logic Units (ALU) that allows all the elements of an array to be processed at the same time.
What is a register?
A register is a discrete memory location within the CPU designed to hold temporary data and instructions
What does the Program Counter do? (PC)
Contains the memory address of the next instruction to be executed. It is automatically incremented.
What does the Current Instruction Register do? (CIR)
This holds the current instruction to be executed, having been fetched from memory.
What does the Memory Address Register do? (MAR)
Contains the memory address of the next piece of memory to be fetched.
What does the Arithmetic Logic Unit do? (ALU)
It allows for logical decisions to be made.
What does the Accumulator do? (ACC)
The accumulator is a section of the arithmetic unit where intermediate arithmetic and logic results are stored.
What is the Von Neuman Architecture?
It consists of a single processor which fetches, decodes, and executes instructions one at a time (the “FDE cycle”).
Current Instruction Register (CIR) - contains the instruction currently being executed.
Fetch: The PC holds the address of the next instruction. This address is copied to the MAR, and the contents of that address are copied to the MDR and the CIR. The PC is then incremented.
Decode: The contents of the CIR are “decoded” into instructions which the control unit can interpret, so that the processor “knows” what to do.
Execute: The memory address of any data needed to execute the instruction is copied from the CIR to the MAR. The data found at this address is copied to the MDR, and then the data is used.
The three busses?
Data bus - carries data from one part of the computer to another.
Address bus - carries the address to which the data (in the data bus) should be delivered. Both the address and the data travel together until the correct component identifies its address, and collects the data being transported.
Control bus - carries commands from the control unit to other devices.