set 3 (random) Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Describe what happens, in relation to the storage or retrieval of a record in the file when the calculated hash value is a duplicate of a previously calculated hash value for a different record key

A
  • If a collision occurs when the record key doesn’t match the stored record key this means that the determined storage location has already been used for another record.
  • If the record is to be stored, it searches the file linearly to the next available storage space (closed hash) or searches the overflow area linearly to find the next available storage space (open hash)
  • If the record is to be found, it searches the overflow area linearly (open hash) until the matching record key is found or searches linearly from where you are (closed hash) until the matching record key is found.
  • If not found record is not in file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

State, with a reason, where it would be appropriate to use circuit switching

A
  • Circuit switching is used where a dedicated path needs to be sustained throughout the call where the whole bandwidth is required // when real time communication is used
  • A typical application is standard voice communication, video streaming or private data networks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the benefit of circuit switching

A
  • Whole bandwidth available
  • Data transmitted with a fixed data rate
  • no waiting time at switches
  • suitable for long continuous communication
  • data arrives in same order as it was send, so easier method of data transfer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the drawbacks of circuit switching

A
  • A dedicated connection makes it impossible to transmit other data even if the channel is free
  • Not very flexible
  • The time required to establish the physical link between the two stations can be too long
  • No alternative route in case of failure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Outline the characteristics of massively parallel computers.

A
  • A large number of computer processors / separate computers connected together
  • simultaneously performing a set of coordinated computations // collaborative processing
  • Communicate using a message interface / by sending messages.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain how a new element can be added to the queue if it is implemented using two stacks.

A
  • (Two stacks are required) so that the second stack can reverse the order of the first stack.
  • Stack 1 operates as the queue with the newest elements at the bottom. Stack 2 is empty.
  • To add an element, pop all the elements from stack 1 and push onto stack 2.
  • Push the new element onto either stack. Pop all the elements of stack 2 back onto stack 1.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe what is meant by recursion.

A
  • A process using a function or procedure defined in terms of itself / calls itself.
  • A recursive process must have a base case (which is a way to return without making a recursive call) // terminating solution // concept of unwinding described
  • There must (also) be a general case where the recursive call takes place.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Define encapsulation

A

putting properties and methods inside a class // ensures sensitive data is hidden from users by hiding values of a structured data object inside a class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define OOP

A

a programming
methodology that uses self-contained objects, which
contain programming statements (methods) and data, and which communicate with each other.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define Polymorphism

A

allows the same method to take on different behaviours depending on which class is instantiated // methods can be redefined for derived classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe the purpose of quantum cryptography

A
  • To produce a virtually unbreakable encryption system using the laws of quantum mechanics
  • It can detect eavesdropping because the properties of photons change to protect security of data transmitted over fibre optic cables
  • To enable the use of longer keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is meant by the term Enumerated data type

A

A user defined non composite data type with an ordered list of possible values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is meant by the term pointer data type

A

A user defined non composite data type used to reference a memory location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define what an Instance is

A

an occurrence of an object // a specific object based on the class // an instantiation of a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define inheritance

A

the capability of defining a new class of objects that has all the attributes and methods from a parent class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Define getter and setter

A

Getter – method that is used to return the value of a property.

Setter – method that is used to update the value of a property.

17
Q

Explain the need for scheduling in process management.

A
  • Process scheduling allows more than one program/task to appear to be executed at the same time / enables multitasking / multiprogramming.
  • To allow high priority jobs to be completed first.

To keep the CPU busy all the time to ensure that all processes execute efficiently and to have reduced wait times for all processes / to ensure all processes have fair access to the CPU / prevent starvation of some processes.

18
Q

Describe shortest job first and a benefit for it

A

Process are executed in ascending order of the amount of CPU time required // Short processes are executed first and followed by longer processes.

  • Leads to an increased throughput (because more processes can be executed in a smaller amount of time).
19
Q

Describe round robin and a benefit for it

A

Each process is served by the CPU for a fixed time/time slice (so all processes are given the same priority).

Starvation doesn’t occur (because for each round robin cycle, every process is given a fixed time/time slice to execute).

20
Q

Describe round robin and a benefit for it

A

No complex logic, each process request is queued as it is received and executed one by one.

Starvation doesn’t occur (because every process will eventually get a chance to run) // less processor overhead.

21
Q

State the purpose of a flip flop

A

To store a binary digit / a single bit

22
Q

Describe what is meant by a virtual machine.

A
  • The emulation of a computer system - hardware and software
  • Using a host computer system
  • Using guest operating system for emulation
23
Q

What are benefits of a VM

A
  • Multiple guest operating systems / VMs can be used on the same computer.
  • Different instruction set architectures can be emulated on a single computer.
  • A virtual machine can crash without affecting the host machine.
  • There are security benefits // Trying a piece of suspicious software and if it is / has a virus, it will only infect the virtual machine.
  • Cost savings due to not needing to purchase extra hardware.
  • Can run legacy applications that are currently incompatible.
24
Q

what are the drawbacks of a VM

A
  • A virtual machine is less efficient / has poorer performance than real machines because of extra load on the host computer
  • Performance of the guest system cannot be adequately measured.
  • A virtual machine may be affected by any weaknesses of the host machine.
  • Costly and/or complex to maintain / implement / manage.
  • Cannot emulate some hardware.
25
Q

Define properties

A
  • The data items / attributes
  • The data types // characteristics
  • defined in a class
26
Q

Define Methods

A

The procedures/ functions in a class implementing the behaviours that act on the properties / attributes Inheritance

27
Q

State the reasons for including exception handling routines when writing a program.

A
  • To trap (some) runtime errors To prevent a program halting unexpectedly
  • To produce meaningful error messages for these errors
  • Example divide by zero // end of file // file not found
28
Q

Compare sequential and serial methods of file organisation.

A
  • In both serial and sequential file records are stored one after the other and need to be accessed one after the other
  • Serial file are stored in chronological order
  • Sequential files are stored with ordered records and stored in the order of the key field
  • In serial file, new record are added in the next available space
  • In sequential files, new records are inserted in the correct position