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
What is server-based architecture?
One of the oldest architectures
Predominantly used by accessing Unix based servers through a terminal emulation to access the data
Almost all processes are handled by the server:
- Presentation logic
- Application / business logic
- Data access logic
- Data storage
Client has ‘dumb’ terminal which is used to send keystrokes to the servers and recieves text from the server
PROBLEMS WITH ARCHTECTURE?
- Server can become bottleneck
- Upgrade can be expensive and ‘lumpy’
What is client-based architecture?
All logic/processes handled client side:
Presentation logic
Application/business logic
Data access logic
Data is stored server side
PROBLEMS WITH ARCHTECTURE?
All data must travel back and forth between server and client (NETWORK BOTTLENECK POSSIBLE)
Due to this issue, this model of architecture is not/rarely used.
What is client-server architecture?
This is a balanced architecture.
Good scalability and reliability as clients can handle graphics logic and processing logic whereas servers can focus on data.
Reliable as data only access when needed.
Common architecture
The presentation and application/business logic is handled by the client.
The data access logic and data storage is handled by the server.
What is thin-client architecture?
Client handles presentation logic
Server handles application / business logic, data access logic and data storage
Application must be lightweight
Common applications are web browsers
PROBLEMS WITH ARCHTECTURE?
Server handles MOST application logic, server can be bottleneck
ADVANTAGE?
Ony one server needs updating! There can be high end servers, server farms, cloud based servers
What is multi-tier architecture?
TWO servers and ONE client
Client handles presentation logic
One / middle server handles application / business logic
One / back-end server hands data access logic and data storage
Better for higher loads such as with larger numbers of users as it distributes the load between servers.
60/40 or 40/60 load balancing between servers depending on application
PROBLEMS WITH ARCHTECTURE?
High load on internal network can be bottleneck
What is peer-to-peer architecture?
This is when clients act as BOTH SERVER AND CLIENT
Clients handle all processes and use local logic processes to access stored data on another computer/client.
Used in games/media/file sharing systems.
PROBLEMS WITH ARCHTECTURE?
Bottleneck with network and client computers
What are registers?
They are fast access memory stores where CPUs store data that they are currently working on/instructions that they are currently executing.