Set 1 (random) Flashcards
Define interrupt handling
Transferring control to another routine when a service is required
Define multi-tasking
Managing the execution of many programs that appear to run at the same time
Define paging
Reading/writing same-size blocks of data from/to secondary storage when required
Define scheduling
Managing the process running on the CPU
Define virtual memory
- using secondary storage to simulate additional main memory
- Secondary storage is used to extent the RAM available so the CPU appears to be able to access more memory space than is available in RAM
- Only the data in use needs to be in main memory so data can be swapped between RAM and virtual memory as necessary
-Virtual memory is created temporarily
Describe the purpose of a user-defined data type
- To create a new data type (from existing data types)
- To allow data types not available in a programming language to be constructed // to extend the flexibility of the programming language
Describe what is meant by a declarative programming language
Instructs a program on what needs to be done instead of how to do it using facts and rules using queries to satisfy goals. It can be logical or functional.
Logical - states a program as a set of logical relations
Functional - constructed by applying functions to arguments / uses a mathematical style
Describe what is meant by an imperative (procedural) programming language
- Imperative languages use variables
- which are changed using (assignment) statements
- they rely on a method of repetition/iteration
- The statements provide a sequence of commands for the computer to perform
- in the order written/given
- each line of code changes something in the program run.
Explain how an interpreter executes a program without producing a complete translated version of it [4]
- The interpreter examines source code one statement at a time and checks for errors
- If no errors were found, the statement is executed
- If an error is found, it’s reported and the interpreter halts
- interpretation has to be repeated every time the program runs
Explain the use of graphs to aid Artificial Intelligence (AI)
-Artificial Neural Networks can be represented using graphs
- Graphs provide structures for relationships // graphs provide relationships between nodes
- AI problems can be defined/solved as finding a path in a graph
- Graphs may be analysed/ingested by a range of algorithms
- … eg A* or Dijkstra’s algorithm
- … used in machine learning
- Examples of methods eg Backpropagation of errors/regression methods
Explain why Reverse Polish Notation (RPN) is used to carry out the evaluation of expressions
- RPN provides an unambiguous method of representing an expression
- reading from left to right
- without the need to use brackets
- without the need for rules of precedence / BEDMAS
Give benefits and drawbacks of packet switching
Benefits
- Accuracy - ensures accurate delivery of the message
- Completeness - missing packets can be easily detected and re-send request sent so the message arrives complete
- Resilience - if a network changes the router can detect it and send the data another way to ensure it arrives
- Path also available to other users // Doesn’t use the whole bandwidth // allows simultaneous use of the channel by multiple users
- Better security as packets are hashed and sent by different routers
Drawbacks
- Time delays to correct errors // Network problems may introduce errors in packets
- Requires complex protocols for delivery
- Unsuitable for real-time transmission applications
How can we use a Binary Tree to implement a Reverse Polish Notation (RPN)
A tree allows both infix and postfix to be evaluated (tree traversal)
How can we use a Stack to implement a Reverse Polish Notation (RPN)
The operands are popped from the stack in the reverse order of how they were pushed since it’s a FILO data structure
What is a process control block (PCB) where can this be created
A data structure contains all the data needed for a process to run. This can be created in memory when data needs to be received during execution time
What is stored in the process control block (PCB)
- current process state (ready, running, blocked)
- Process privileges (such as which resources it is allowed to access)
- Register values (PC, MAR, MDR, ACC)
- Process priority and any scheduling information
- The amount of PCU time the process will need to complete
- A process ID which allows it to be uniquely identified
Outline the function of a router in packet switching
- The router examines the packet headers
- It can read the IP address of the destination
- The router also has access to the routing table, containing information about available hops, netmask, gateway used and the status of routes along the route
- The router decides on the next hop/best route and sends the packet to its next hop.
Describe the purpose of the Secure Sockets Layer (SSL) and the Transport Layer Security (TLS) protocols
- The SSL and TLS protocols provide communication security over the internet as they provide encryption
- They enable two parties to identify and authenticate each other and communicate with confidentiality and integrity
Explain how SSL/TSL protocols are used when a client-server communication is initiated
- An SSL/TLS becomes initialised by an application which becomes the client
- The application which receives the connection becomes the server
- Every new session begins with a handshake (as defined by the SSL/TSL protocol)
- The client requests the digital certificate from the server and the server sends it back
- The client verifies the certificate and obtains the public key
- The encryption is agreed and the symmetrical session key is generated
State the reason for having multiple hidden layers in an artificial neural network
- Enables deep learning to take place
- Where the problem you are trying to solve has a higher level of complexity it requires more layers to solve
- To enable the neural network to learn and make decisions on its own
- to improve the accuracy o the result
Explain how artificial neural networks enable machine learning
- Artificial neural networks are intended to replicate the way human brains work
- Weights/values are assigned for each connection between nodes
- The data are input at the input layer and are passed into the system
- They are analysed at each subsequent (hidden) layer where characteristics are extracted/outputs are calculated. This process of training/learning is repeated many times to achieve optimum outputs // reinforcement learning takes place
- Decisions can be made without being specifically programmed
- The deep learning net will have created complex feature detectors
- The output layer provides the results
- Backpropagation (of errors) will be used to correct any errors that have been made
What are the essential features of recursion?
- Must have a base condition/exit condition
- Must have a general case which calls itself recursively // defined in terms of itself
- The state changes and moves toward the base case and unwinding can occur when the base case is reached
Explain the reasons why a stack is a suitable Abstract Data Type (ADT) to implement recursion
- A stack is a FILO data structure so each recursive call/layer is pushed onto the stack and is popped when the function ends
- It enables backtracking to maintain the required order
Define machine learning
a system that learns without being programmed to learn
Define deep learning
- Simulates the data processing capabilities of the human brain to make decisions
- A machine that thinks in a way similar to the human brain.
- They handle huge amounts of data using artificial neural networks.
- The main thing is their application of neural network
Define Labelled data
Data where we know the target answer and the data object is fully recognised
Define Unlabelled data
- Data where objects are undefined and need to be manually recognised
Define Supervised learning
- Enables learning by mapping an input to an output based on examples input-output pairs
- A system which is able to predict future outcomes based on past data.
- It requires both input and output values to be used in the training process
Define Unsupervised learning
Enables learning by allowing the process to discover patterns on its own that were previously undetected
- The system is not trained on the “right” answer
Define Reinforcement learning
- Enables learning in an interactive environment by trial and error using its own experience
- System which is given no training
- Learns on the basis of “reward and punishment”
Define Semi-supervised (active) learning
- A system that interactively queries source data to reach the desired result.
- It sues both labelled and unlabelled data, but mainly unlabelled data on cost grounds
Define Reward and punishment
- Improvements to a model based on whether the feedback is positive or negative
- Actions are optimised to receive an increase in positive feedback
Explain what the link is between artificial intelligence, machine learning and deep learning
- In layers, AI is the outer layer, M/L is the second and D/L is the inner layer
- AI is intelligent machines think and behaves like humans
- M/L is a system that learns without being programmed
- D/L is machines that think in a way similar to the human brain; they handle huge amounts of data using artificial neural networks
Define narrow AI
When a machine has superior performance to a human when doing one specific task
Define general AI
When a machine is similar to its performance to a human in any intellectual task
Define strong AI
When a machine has superior performance to a human in many tasks
Define and describe the functions and capabilities of machine learning
- Its a subset of AI in which the algorithms are trained and learn from their past experiences and examples
- It is possible for the system to make predictions or even take decisions based on previous scenarios
- Due to their powerful processing capability, they can offer fast and accurate outcomes
- One key factor is the ability to manage and analyse considerable volumes of complex data - some that would otherwise take humans years
Define Lexical Analysis
- The first stage in the process of compilation
- Removes unnecessary characters and tokenises the program
Define Syntax Analysis
- The second stage in the process of compilation
- Output from the lexical analysis is checked for grammatical (syntax) errors
Define Code Generation
- The third stage in the process of compilation
- This stage produces an object program
Define Optimisation (Complication)
- The fourth stage in the process of compilation
- This stage creates an efficient object program
Define Backus-Naur Form (BNF)
- a formal method of defining the grammatical rules of a programming language
- Recursion can be used here too
- Eg : ::=
::= |
Define a guest operating system
- This is the OS running in/on a VM
- It contains the virtual hardware during the emulation
- This OS is being emulated by another OS (the Host OS)
- The guest OS is running under the control of the host OS software
Define the host operating system
- The OS that is controlling the actual, physical hardware
- The normal OS for the host machine
- The OS runs/monitors the virtual machine software (the hypervisor)
Define Hypervisor
- It is the emulation engine
- It handles the virtual hardware (CPU, memory, HDD and other devices) and maps them to the physical hardware on the host computer
Describe the tasks performed by a Virtual Machine software
- Create/delete a VM
- Relay request and data between the guest and host OS
- Protect data/instruction from the other OS
Describe what it’s meant by a massively parallel computer
- A massively parallel computer is where a large number of processors work simultaneously on the same program communicating via a messaging interface
- This is subtly different to cluster computers where each computer processor remains largely independent.
- In massively parallel computers, each processor will carry out part of the processing and communication between computer is achieved via interconnected data pathways.
Describe parallel processing system SISD
- Single instruction, single data
- Uses a single processor that can handle a single instruction set to one data source at a time
- Since there is a single processor, this architecture does not allow for parallel processing.
- This is most commonly found in applications such as early personal computers
Describe parallel processing system SIMD
- Single instruction, multiple data
- Uses many processors
- Each processor executes the same instructions but uses different data inputs: they are all doing the same calculation but on different data at the same time
- Eg all doing a fetch but from different data
- SMID is often referred to as an array processor. They are often used in graphic cards
Describe parallel processing system MISD
- Uses several processors, each using a different instruction but using the same shared data source
- MISD is not a commonly used architecture (MIMD tends to be used instead)
Describe parallel processing system MIMD
- Uses multiple processors. Each takes its instructions independently and each can use data from a separate data source (the data may be a single memory unit which has been suitably partitioned)
- The MIMD architecture is used in multicore systems (Eg supercomputers or in the architecture of a multi-core chip)
Define Pipelining
- Pipelining is an instruction-level parallelism
- The instructions are split into different stages and when the first stage of an instruction is completed, the first stage of the next instruction can start executing
- Another instruction can start expecting before the previous one is finished
- Thus processing a number of instructions can be concurrent/simultaneous
What are the 5 stages of the F-E cycle?
- Instruction fetch cycle (IF)
- Instruction decode cycle (ID)
- Operand fetch cycle (OF)
- Instruction execution cycle (IE)
- Writeback result process (WB)
Describe CISC Processors
- Complex instruction set computers
- THey want the emphasis to be on the hardware used
- Makes use of more internal instruction formats than RISC
- They strive to carry out a given task with as few lines of assembly code as possible
- Thus the processor hardware must therefore be capable of handling more complex assembly code instructions
- Essentially, the architecture is based on single complex instructions which need to be converted by the processor into a number of sub-instructions to carry out the required operation
Eg to add A & B, we use ADD A, B (this is a single instruction that requires several sub-instructions/multi-cycle to complete)
Describe the RISC processor
- Reduced instruction set computer
- Has fewer built in instruction formats than the CISC, thus leading to higher processor performance
- Emphasis on software / instruction set to be used; this is driven by ever-faster execution times
- Less complex instructions, which is done by breaking up the assembly code instructions into a number of simpler single-cycle instructions
- Ultimately, this means there is a smaller, but more optimised set of instructions than CISC.
Outline the reasons for using deep learning
- Deep learning makes good use of unstructured data.
- Deep learning outperforms other methods if the data size is large.
- Deep learning systems enable machines to process data with a nonlinear approach.
- Deep learning is effective at identifying (hidden) patterns / patterns that humans might not be able to see / patterns that are too complex / time consuming for humans to carry out.
- It can provide a more accurate outcome with higher numbers of hidden layers.