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