Week 1 Flashcards
What does it mean when binary is described as base 2?
This refers to how there are two base values in this system, 0 and 1.
What values can a bit be?
0 or 1
How many bits are in a byte?
8 bits in 1 byte
What level language are machine languages/code?
Machine language is the lowest level
This is closest to the hardware
What level language are programming languages?
Programming languages are higher level languages.
Have to be translated into the machine language of the particular processor.
What is Von Neumann architecture?
This is a program model that describes the architecture relevant to instruction operation which in turn describes how computers are created.
What architecture does Von Neumann architecture consist of?
- A single, shared memory for programs and data
- A single bus for memory access
- An arithmetic (logic) unit
- A (program) control unit
When was the Von Neumann model first published and by who?
1945
John von Neumann
What are the key elements of Von Neumann architectures?
Data
Instructions (how instructions interact, fetched and executed)
Storage of Binary Bits
In terms of computers, what are instructions?
Instructions are the part of the code that gets executed whenever an application/program/OS is run. They contain an operation called ‘op code’ and addresses/registers.
What are the THREE concepts that underlie Von Neumann Architecture?
- Program instructions and data are stored in a single read/write store (main memory/storage e.g. SSD/HDD)
- The contents of this memory is addressable by memory location, regardless of the type of data contained at the location
- Execution of program instructions occurs sequentially, unless explicitly modified
What are the components of a central processing unit (CPU)?
- Arithmetic Logic Unit (ALU)
2. Control Unit (CU)
What is the Fetch-Decode-Execute Cycle?
- Cycle
- A processor can have several states which include fetch, decode and execute
- Fetch
- CPU takes instructions and data from main memory and stores it in special memory locations (Registers)
- Decode
- CPU interprets instructions that were fetches
- Execute
- The instruction is carried out on the data and any temporary result is stored in a register
What does a PC use to advance through a program?
CPUs use a program counter (PC). This contains the address of the next instruction to be executed from memory.
What are interrupts?
Modern computer systems are interrupt driven
An interrupt is a signal to the processor to suspend its current tasks and deal with whatever caused.
What are the broad classifications for interrupts?
- Program/Software (generated when executing instruction, often through system calls/soft sys calls)
- Timer (interrupts that occur in regular intervals so sychronise processors)
- I/O (interact with input and output devices)
- Other hardware
What are system calls/soft sys calls?
They are instructions that execute a special subroutine which is called by the CPU to execute, this results in an interrupt.
What key feature of modern computer systems is allowed to be implemented by interrupts?
Multiprocessing is enabled by interrupts
What is multiprocessing?
This is the capacity to have multiple programs in memory and switch the processory between them, gives the illusion of many programs running at the same time.
What are some examples of factors that can determine the order in which programs are executed?
- Priority
- Time-sharing
- I/O interrupts
etc.
What are soft interrupts?
These are interrupts that are generated by instructions that are being executed by the computer. They allow the current execution to be halted so that different instructions can instead be executed instead. After this new instruction has been completed, the original instruction can be resumed.
This allows CPUs to be more efficient at multitasking as they can pause and resume applications that are open without having to completely exit and restart the application every time it isn’t in use by using regular interrupts between applications. This also reduces any waiting that would be required if applications had to be completely closed and opened every time they are not currently in use.
What are hard interrupts?
These are interupts that are generated from physical sources or hardware. They allow the current execution to be halted so that different instructions can instead be executed instead.
This allows CPUs to be more efficient at multitasking as they can pause and resume applications that are open without having to completely exit and restart the application every time it isn’t in use by using regular interrupts between applications. This also reduces any waiting that would be required if applications had to be completely closed and opened every time they are not currently in use.
What are commonly used approaches/patterns for application architecture?
- Client-server architecture
- Three-layer client-server architecture
- Web services architecture
- Internet and web-based application architecture
What are the four important parts of application architecture?
- Presentationm logic - the UI which is used to control the application
- Application/business logic - Defines what the application does
- Data access logic - Defines how the application manages its data
- Data storage - Where the data is kept e.g. files or data base