Computers & The Internet Flashcards

1
Q

What is an OS?

A

An operating system (OS) is a program that controls the execution of application programs and acts as an interface between applications and the computer hardware.

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

What are the objectives of an OS

A

It needs to be convenient, efficient, and have the ability to evolve.

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

What services do the operating system provide?

A

File management, input/output management, process management, memory management, and multiprocessor management.

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

What is the kernel?

A

The most central part of the OS. Its functionality depends on the OS design.

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

What is a kernel context switch?

A

Transition between user mode and kernel mode, they are computationally expensive (i.e. require a lot of CPU usage) therefore an OS tried to limit the number of context switches.

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

What is a monolithic OS structure?

A

All services are implemented by a large kernel, any new feature is added to the kernel, “everything is connected to everything”.

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

What are the pros and cons of a monolithic OS structure?

A

Pros – Communication with kernel is fast; Cons – Difficult to understand, difficult to modify, lack of security.

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

What is a layered OS structure?

A

Services are implemented by a large kernel which is organised into layers. Each layer can only communicate with adjacent layers, and any given layer only needs to know the functionality of adjacent layers.

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

What are the pros and cons of a layered OS structure?

A

Pros – It is easy to debug; Cons – Poor performance due to requiring traversal through multiple layers to obtain a service.

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

What is a microkernel OS structure?

A

Services are implemented by servers, and a small kernel delivering messages between them.

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

What are the pros and cons of microkernel OS structure?

A

Pros – Secure and reliable; Cons – Poor performance due to increased system-function overhead.

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

What is a modular OS structure?

A

Starts with a small kernel and additional services are loaded on demand via modules.

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

What are the pros and cons of a modular OS structure?

A

Pros – Fast because we don’t load unnecessary services and any module can directly communicate with any other module; Cons – As more modules are loaded it becomes similar to monolithic structure.

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

What is a virtual machine?

A

A host operating system provides virtual hardware to one or multiple guest OS’s. Enables multiple environments with different OS’s on one machine.

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

What is a file?

A

A file is a named collection of related information that is recorded on secondary storage (non-volatile memory). File extensions help the OS determine how to interpret the file.

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

What are the attributes of a file?

A

Typical file attributes include: The name of the file, the identifier of the file, the location of the file on a storage device, the size of the file, the protection mode of the file (permissions), and the times when the file was created, accessed and modified.

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

How does file management work in linux?

A

In Linux everything is represented by a file in the file system. There are six types of files: Regular files, directories, special files, pipes, links, and symbolic links. There is also a tree-like inode pointer structure.

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

What are hard and soft links?

A

Hard links – point to a file via its inode, this means if the file is moved/deleted the link will still work. Soft (symbolic) links – pointer to a filename, this means if the file is moved/deleted the link will still work.

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

What are blocks?

A

In Linux, files are allocated in blocks, with each block typically being 4096 bytes.

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

What is the Inode Pointer Structure?

A

This is used by the inode of a file to list the addresses of files data blocks. This consists of fifteen pointers, twelve of which point directly to blocks of the file’s data (direct pointers). Then there is a single indirect pointer (a pointer that points to a block of pointers that then point to blocks of the file’s data), a doubly indirect pointer (a pointer that points to a block of pointers that point to other blocks of pointers that then point to blocks of the file’s data), and a triply indirect pointer (a pointer that points to a block of pointers that point to other blocks of pointers that point to other blocks of pointers that then point to blocks of the file’s data).

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

What are magnetic disks and how do they work?

A

These are primarily HDD’s but also floppy disks. A magnetic disk has a number of spinning circular platters, over which hover some heads attached to a movable arm. The magnetic disk is read/written by having the head sense/change the magnetism of a sector. At a bit level magnetism in one direction represents a one, and magnetism in the other direction represents a zero. Each platter is divided into circular tracks, and each track is divided into sectors. A set of tracks across different platters at a given position make up a cylinder. Each sector has a fixed amount of data (usually 512 bytes), which is the smallest unit of data you can transfer to or from a disk. A magnetic disk is read/written by moving the arms in/out to the requires cylinder. All heads/arms move together. The platters rotate; the rotation speed is related to the data transfer rate.

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

What are SSDs’ and how do they work?

A

A SSD has no moving parts and instead stores data using flash memory. A SSD has a controller (an embedded processor), buffer memory (volatile memory), and flash memory. A typical SSD might have 4 kB pages and a 512kB block size, which means each block has 128 pages. The act of erasing flash memory requires a high amount of voltage, is rather slow, and can only be done on block level. Reading and Writing is done on page level and is fast to do. Overwriting requires an erase operation, and is therefore slower than reading or writing to an empty drive. A SSD is read by: copying a flash memory page into the buffer and reading data from the page in the buffer. A SSD is written by copying a memory block into the buffer, erasing the block in flash memory, modifying the block in the buffer, and writing the block from the buffer to the flash memory.

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

What are the pros and cons of SSDs’ over Magnetic Disks?

A

SSDs are faster, more reliable, more expensive, and more power efficient than magnetic disks. However SSD’s deteriorate with every write process.

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

What is Wear-Levelling?

A

A block will fail once it reaches a critical number of writes. Wear-levelling spreads out the writes evenly among the blocks. There are two types: Dynamic and Static. It is applied by the controller.

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

What is Dynamic Wear-Levelling?

A

One type of wear-levelling is dynamic wear-levelling. New data is written to the least-recently-used block. Thereby we avoid wearing out certain blocks by writing to the same block again and again. The issue with this is that cold data is not moved.

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

What is Static Wear-Levelling?

A

This does the same as dynamic wear-levelling, but also periodically moves existing data to the least-recently-used block. Thereby we avoid wearing out certain blocks while blocks with cold data that is never moved.

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

What is an I/O device?

A

I/O devices enable computers to receive or output information to humans or devices. Examples include human interface devices such as monitors and keyboards, storage devices such as SSD’s and HDD’s, and transmission disks such as network cards. The communication with I/O devices is performed over a bus, and the I/O devices are operated using controllers.

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

What are controller registers?

A

The processor communicates with the controller by reading and writing to the controller registers. There is the data-in register, which is data coming from the device; the data-out register, which is data going to the device; the status register, which indicates the status of the device; and the control register, which commands the device.

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

What is Port-Based I/O?

A

The CPU uses special instructions for sending and receiving data to and from an I/O port.

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

What is Memory-Mapped I/O?

A

The CPU treats the device “as memory”; control registers are mapped to specific memory addresses. This is more commonly used nowadays than port-based I/O.

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

What is polling?

A

An approach to control. The CPU repeatedly checks the controller’s status register to see whether the controller is busy. When the controller is ready and the CPU wants to give new instructions, the CPU writes to the data-out register and signals that it has done so to the control register.

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

What are Interrupts?

A

An approach to control. The CPU regularly senses an interrupt-request line. When the CPU gets an interrupt signal through the interrupt-request line, it stops the current process and initiates a response.

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

What are the differences between Polling and Interrupts?

A

Interrupts can monitor the status of several devices at the same time and serve them based on priority. Polling needs to check each device individually in a round-robin fashion. Interrupts are much more commonly used since this frees the CPU from polling devices that do not need service. Polling may be efficient if the controller and the device are fast, the I/O rate is high, some I/O data can be ignored, and the CPU has nothing better to do.

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

What are large data transfers?

A

Some devices such as disk drives will often do large data transfers. The transfer will inefficient if the CPU has to feed data, byte to byte, to the controller’s registers. A better approach is to offload this work to a special-purpose processor (a DMA controller).

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

How does Direct Memory Access work?

A

The CPU writes a command block into memory, specifying the source and destination of the transfer. The DMA can then perform multiple transfers via a single command. When the transfer is complete, the CPU receives an interrupt from the DMA controller. This enables to CPU to spend more resources on other tasks.

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

What is a device driver?

A

A device driver hides differences between various device controllers by defining an interface between the OS and I/O devices for a specific class of I/O devices.

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

What is a system call?

A

A system call is a request of kernel service. For example, you can have system calls for character I/O, block I/O and network I/O.

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

What happens in a system call for character I/O?

A

A character device transfers bytes one by one. Characters must be processed in the order that they arrive in the stream. The interface includes the get operation, to return the next character in the stream; the put operation, to add a character to the stream; and libraries for line-by-line access, with integrated editing services (such as backspace to remove the preceding character from the stream.

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

What happens in a system call for block I/O?

A

Block devices (typically non-volatile mass storage devices such as HDD’s) are used to transfer blocks of data. The interface includes a read operation, for reading blocks of data; and a write operation, for writing blocks of data. Block devices are high volume devices.

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

What happens in a system call for memory-mapped I/O?

A

Layered on top of block device drivers. Rather than read and write operations, a memory-mapped interface provides access to disk storage via a location in main memory; there is a system call that maps a file on the device into memory. The OS deals with transferring data between memory and the device and can perform transfers when needed. Accessing memory-mapped files is generally faster than using read/write operations since it does not require a context switch. Memory-Mapped files are not the same as memory-mapped IO.

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

What happens in a system call for network I/O?

A

A network socket interface has system calls for:
- Creating and connecting sockets
- Sending and receiving packets over the connection
- The select function, for determining the status of one or more sockets (whether the socket is ready for reading and writing).
- Checking whether a transfer was successful
- Recovering gracefully from unsuccessful transfers.
The main difference between network and other I/O devices is that things regularly go wrong with network I/O devices.

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

What is a program?

A

A set of instructions for performing a specific task. It is stored on disk.

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

What is a process?

A

A program in execution. It requires CPU resources, primary memory and I/O. There may be multiple processes executing a single program.

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

Why do we need processes?

A

It makes it easier to build and and maintain the OS as modules can be improved 1 by 1. We can build methods for organising and executing a large number of concurrent processes. It means we can execute tasks in parallel which is faster.

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

What are the elements of the process lifecycle?

A

Born: A process has been created but not admitted to the pool of executable processes.
Ready: When the OS is ready, the process is transferred to the ready state.
Running: The process is executed by a processor. It may go back and forth between running and ready depending on priority.
Waiting: The process has made a request it has to wait for, such as an input or access to a file.
Died: The process has been completed or aborted

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

What is a process control block?

A

Each process is represented by a PCB. It is stored in memory. It contains the process number (its identity), the process state (its registers; stores temporary results, the next instruction etc), the process address space (its memory) and the process I/O (I/O devices and files allocated to the process).

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

What is a process context switch?

A

When one process is stopped and another is started. It changes the process scheduling state of A, saves the context of A, loads the context of B, changes the process scheduling state of B. It is pure overhead and the time depends on several factors.

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

What are the issues with process context switches?

A

With too few of them, there is no fairness between processes and some processes have to wait for a long time. With too many, the processor has to spend too many resources on overhead. The aim is to optimise the number of switches.

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

What does the process address space contain?

A

A stack for temp data, a heap for dynamically-allocated data, a data section for static data, a text section for program code. The data and text sections are fixed size, while the stack and heap sections can shrink and grow.

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

What is the stack in the process address space?

A

Whenever a function is called, temporary variables are added to the top of the stack. When exiting a function they are removed from the top of the stack. Push adds a variable and Pop removes a variable. Last in - First out.

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

What is the heap in the process address space?

A

It is dynamically allocated. Blocks are allocated and removed in an arbitrary order. It’s used to store a large block of memory for a longer period of time, and variables that can change size dynamically.

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

What is process spawning?

A

A process is created at the request of a different process. The first process is called the parent process, and the second is the child process. In linux there are four system calls for process spawning.

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

What is Fork?

A

Fork creates a child process with a unique process ID. The child is given a copy of the process address space of the parent process. The processes know whether they are child/parent.

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

What is Exec?

A

Exec runs an executable file that overwrites the process’s address space with a new program. This is usually used after the fork process. The use of fork then exec allows the parent and child to communicate but go their separate ways.

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

What is Exec?

A

Exec runs an executable file that overwrites the process’s address space with a new program. This is usually used after the fork process. The use of fork then exec allows the parent and child to communicate but go their separate ways.

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

What is Wait and Exit with parent/child processes?

A

The parent process is put in a waiting state until the child process has finished. When done the child process issues the exit system call, and the parent process resumes.

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

What is shared memory?

A

Shared memory is a memory management technique in which multiple processes can access the same block of memory. Memory space from within one processes address space is shared between them. The processes read or write to the shared region. Both processes must make system calls to make the shared space available to both processes.

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

What is message passing?

A

Processes communicate by sending messages
to each other. The messages are sent to/received from an
agreed “mailbox” that is not part of the
address space of any of the processes.

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

What are the advantages of shared memory and message passing?

A

Shared memory: faster than message passing because message passing requires system calls. Message Passing: Good for small amount of data, as it avoids setting up the shared space.

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

What is First Come First Served?

A

The first-come-first-served scheduling algorithm allocates the processor on the
basis of creation time (like you queue at a shop with a single queue).

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

What are the pros and cons of First Come First Served?

A

Pros: No unnecessary switching between processes. You will eventually always provide processing time to a given process. Cons: Long average waiting time.

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

What is Round Robin?

A

Identical to first come first served, except that no process can occupy the
processor longer than a predefined time length (the time quantum). After a arriving at a processor, a process will either 1) be interrupted and placed
at the end of the (circular) queue, or 2) complete before it runs out of time.

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

What are the Pros and Cons of Round Robin?

A

Pros: Distributes resources fairly and quick processes can pass through quick. Cons: Long waiting time when processes require multiple time quanta. Performance depends on time quantum.

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

What is Shortest Process Next?

A

The shortest process next scheduling algorithm shares the processor on the basis
of shortest predicted execution time. It can be preemptive or non-preemtive.

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

What are the pros and cons of Shortest Process Next?

A

Pros: Gives the minimum average waiting time for a given set of processes. Cons: Execution time has to be estimated, and long processes may have to wait ages.

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

What is multilevel queuing?

A

It organizes processes into different priority levels or queues, and processes are scheduled for execution based on their priority level. For example there could be specific queues for interactive processes (lots of I/O), normal processes (system services), and batch processes (processes without I/O). Fixed Priority scheduling gives some processes priority. Time slicing gives different CPU time to different processes. Different algorithms may be used for different processes.

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

What are the pros and cons of multilevel queuing?

A

Pros: Can accommodate a range of different performance objectives. Cons: Complex and difficult to calibrate.

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

What is User-Oriented Criteria?

A

Focus of performance as perceived by an individual user. This can include turnaround time (time between submission of a process and its completion), and response time (the time between the submission of a process and the first response from the process).

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

What are system oriented criteria?

A

Focus on efficient utilization of the processor. For example: Throughput (the number of completed processes per unit time) and Processor Utilization (The percentage of time that the processor is busy).

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

What is a multi-core processor?

A

A processor with several cores/processors. Each core has its own cache memory.

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

What are the two approaches to Multi-Processor Scheduling?

A

A common ready queue: When a processor comes available it chooses a new process from a common queue. Private queues: When a processor becomes available, it chooses a new process from its own private queue.

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

What is load balancing?

A

A method of improving the performance of multiprocessor scheduling. It balances processes evenly among processors. Common ready queues automatically have this.

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

What is Processor Affinity?

A

A method of improving the performance of multiprocessor scheduling. It keeps a process running on the same processor to keep the cache warm. Private queues automatically have this.

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

What are the Memory Management Tasks?

A

Ability to relocate a process, Protection from other processes and Sharing of data.

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

What is Fixed Partitioning?

A

Memory is divided into partitions
of a fixed size; the size may vary
between partitions. A process can be loaded into any
partition whose size is equal to or
greater than the size of the
process. One-to-one mapping between
partitions and processes. Suffers from Internal Fragmentation.

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

What is Internal Fragmentation?

A

When space is wasted
inside partitions because the size of the process is smaller than the size of the partition.

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

What are the pros and cons of Fixed Partitions?

A

Pros: Easy to understand and implement. Cons: Internal Fragmentation, a pre specified limit on the number of processes and the largest process.

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

What is Dynamic Partitioning?

A

The partition sizes adjust to the
sizes of processes. One-to-one mapping between
partitions and processes. Suffers from External Fragmentation.

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

What are External Fragmentation and Compaction?

A

External fragmentation is when space is wasted between partitions. Compaction is when processes are shifted so all the free memory is gathered in one continuous block. This takes a lot of time.

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

What are the pros and cons of Dynamic Partitioning?

A

Pros: No internal fragmentation. No limit on the number of
processes or on the size of the
largest process. Cons: External fragmentation. Time is wasted on compaction.

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

What is Simple Segmentation?

A

Each program is divided into
segments (e.g., text and data
segments). Segments are loaded into memory
as in dynamic partitioning. All segments need to be loaded
into memory, but they do not
need to be contiguous.

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

What are the pros and cons of Simple Segmentation?

A

Pros: Easier to fit processes in memory
than with dynamic partitioning. No internal fragmentation. No limit on the number of
processes or on the size of the
largest process. Cons: External fragmentation (less than dynamic partitioning). Time is wasted on compaction.

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

What is Virtual Memory Segmentation?

A

Use disk storage
as if it was main memory.
Segments are loaded into memory
as in dynamic partitioning, except
that not all segments need to be
loaded at the same time.

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

What are the pros and cons of Virtual Memory Segmentation?

A

Pros: Easier to fit processes in memory
than with simple segmentation. No internal fragmentation. No limit on the number of
processes or on the size of the
largest process. Cons: External fragmentation (less than dynamic partitioning). Time is wasted on compaction.

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

What is Simple Paging?

A

Memory is divided into fixed-size
frames of equal size. Each process is divided into pages
of the same size. Internal fragmentation is small.

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

What are the pros and cons of Simple Paging?

A

Pros: No external fragmentation. All pages fit perfectly into frames. Cons: Small internal fragmentation. Each process requires a page
table (which consumes memory).

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

What is Virtual Memory Paging?

A

Pages are loaded into frames as in simple paging, except that not all pages
need to be loaded at the same time.

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

What are the pros and cons of Virtual Memory Paging?

A

Pros: Easier to fit processes in memory
than with simple paging. No external fragmentation. All pages fit perfectly into frames. Cons: Small internal fragmentation. Each process requires a page
table (which consumes memory). More overhead required for
virtual memory.

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

What is the CPU?

A

The CPU controls the execution of instructions. A CPU will use a specific instruction set architecture, such as ARM or x86.

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

What are Registers?

A

The CPU stores temporary results
in internal registers. When executing a given process,
that process’s registers are loaded
into the CPU. Some registers are
interchangeable general-purpose
registers.

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

What are Special-Purpose Registers?

A

CPU registers used for specific tasks like instruction tracking and memory management. Examples include program counter, stack pointer, link register, and base pointer.

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

What are Base and Stack Pointers?

A

The base pointer points to the base of the current stack frame, while the stack pointer points to the top of the stack. Together, they are used to keep track of the location of variables and data on the stack.

93
Q

What is the Link Register and Program Counter?

A

The link register stores the
address where to return to when
the current function call has
completed. The program counter stores the
address of the next instruction to
be executed.

94
Q

What is the ALU?

A

The ALU performs simple
operations between two input
registers (operands) and puts the
result in an output register.

95
Q

What is the Status Register?

A

The current program status register
contains status and control bits
indicating, for example, the output
of the ALU and the mode of the
CPU.

96
Q

What is Assembly Language?

A

Assembly language is a low-level programming language that is used to program a computer’s CPU directly. It uses simple instructions but is a difficult programming language.

97
Q

What is branching?

A

Branch instructions will “jump”
to a different instruction. They do so by changing the
program counter.

98
Q

What is a word?

A

A word is 2, 4 or 8 bytes. Each register is word sized. On a 64 bit machine a word is 8 bytes. A byte is 8 bits.

99
Q

What is the Memory Hierarchy?

A

From fastest to slowest, and smallest to biggest: Registers, Cache, Main Memory, Disks.

100
Q

What is the Main Memory?

A

When we need more storage than registers we use the main memory (RAM).

101
Q

What are Memory Addresses?

A

The minimum addressable unit of
memory is typically 1 byte (8 bits). A memory with 2n
addressable
units will need n-bit addresses. Memory addresses are often
written in hexadecimal form.

102
Q

What is Cache?

A

A high-speed memory that stores frequently accessed data for quick retrieval, improving device performance by reducing CPU access to main memory.

103
Q

What is Temporal Locality?

A

A method for deciding what to store in cache. If an item in memory is
referenced, then it is likely to be referenced again soon. When a cache needs to discard data, it tends to first discard data that has not
been requested in a long time.

104
Q

What is Spatial Locality?

A

A method for deciding what to store in cache. If an item in memory is
referenced, then it is likely that those nearby will be referenced soon. When a specific memory block is referenced, the cache will often also bring in
additional memory blocks located at similar addresses.

105
Q

What are Cache Hits and Misses?

A

A cache hit is when the data requested is in the cache. A cache miss is when it is not in the cache, so it has to be read from the main memory.

106
Q

What is Direct-Mapped cache?

A

A memory address is mapped to exactly one cache
address.

107
Q

What are the pros and cons of Direct-Mapped Cache?

A

Pros: Easy to search. Cons: Inefficient use of the cache space.

108
Q

What is Fully-Associative Cache?

A

In a fully-associative cache, a memory address is mapped to the
least-recently-used cache address.

109
Q

What are the pros and cons of Fully-Associative Cache?

A

Pros: Flexible, can fill the cache with any combination of memory addresses. Cons: Takes a long time to search.

110
Q

What is the S-Way Set-Associative Cache?

A

The cache is divided into N cache sets. Each cache set can store S memory addresses data. A memory address is mapped to exactly one cache set, and to the
least-recently-used cache line in that set.

111
Q

What is the relationship between the different cache designs?

A

A fully-associative cache with S slots is an S-way set-associative cache — there
is 1 set of size S. A direct-mapped cache with S slots is a 1-way set-associative cache — there are
S sets of size 1.

112
Q

What is a Write Hit and Miss?

A

A write hit — the address we want to write to is present in the cache.
A write miss — the address we want to write to is not present in the cache.

113
Q

How do you deal with Write Hits?

A

Write-back — write into cache only. This is faster, but you still need to write to memory before cache data is removed.
Write-through — write into both cache and memory. Slower, but means the cache and memory is in sync.

114
Q

How do you deal with Write Misses?

A

Write around — write into memory only. Avoids unnecessary cache access, but does not use temporal locality.
Write allocate — write into memory and read into cache. Uses temporal locality, but potential unnecessary cache access.

115
Q

What is Virtual Memory?

A

Uses disk storage as if it was main memory.

116
Q

What is Demand Paging?

A

Only load a page when there is a request for it. More processes can be loaded into memory. However the processor spends most of its resources on swapping pages.

117
Q

What is Pre-Paging?

A

Guess which pages will be requested and pre-load them. There is less overhead when page predictions are accurate, but resources are wasted on loading unused pages.

118
Q

What is the fetch decode execute cycle?

A

Fetch — read an instruction from memory
Decode — identify the instruction
Execute — carry out the instruction

119
Q

What is the difference between pipelined and non-pipelined cycles?

A

With a non-pipelined fetch-decode-execute cycle, the time required to execute
an instruction is the sum of the time required by each stage. With a pipelined fetch-decode-execute cycle, the rate of instruction execution is
multiplied by the number of stages.

120
Q

What are Clock Cycle Time, Clock Rate, and Execution Time?

A

The clock cycle time of a CPU is the time it takes to complete one pipelining
stage. Clock speed = 1/clock cycle time. Execution time = Clock cycles for program × Clock cycle time.

121
Q

What is a Control Hazard?

A

A control hazard occurs when a (conditional) branch instruction changes the
next instruction. There are four ways to deal with control hazards:
(a) stall the pipeline
(b) assume branch not taken
(c) branch prediction
(d) branch delay slots

122
Q

What is Stalling the Pipeline?

A

The processor may stall the pipeline; when we realize that the next instruction is
a branch instruction, stop the next instructions. We don’t need to guess the next instruction, but time and resources are wasted.

123
Q

What is Assuming Branch Not Taken?

A

The processor may assume branch not taken, squashing instructions if wrong. We don’t need to guess the next instruction, but time and resources are wasted whenever the branch is taken.

124
Q

What is Branch Prediction?

A

The processor may try branch prediction based on past branches. If the
prediction is incorrect, instructions are squashed. This can significantly reduce the number of wasted clock cycles, but there is overhead associated with branch prediction.

125
Q

What are Branch Delay Slots?

A

A branch instruction may be followed by delay slots (these are always executed). May find useful instructions, e.g., when paths (taken/not taken) join, but if no useful instruction is found, fill the slot with “No operation”

,

126
Q

What are Data Hazards?

A

A data hazard occurs when an instruction requires a result from a previous
instruction before that result has been computed/written.

127
Q

What are the solutions to Data Hazards?

A

Stalling the Pipeline and Out-of-order execution.

128
Q

What are the effects of more pipeline stages?

A

A larger penalty for incorrect
branch predictions and a bigger risk of data hazards.

129
Q

How does the Spectre attack work?

A

To start, array1 is in memory, next to private data belonging to a different process. array1 [ x ], where x is large, is private information. Normally, attempted access to array1 [ x ] will trigger a fault. x is chosen by the attacker, array1_size is uncached, array1[ x ] is cached, array2 is uncached, and a mistrained branch predictor will predict that x < array1 size. Reading array1_size results in a cache miss. While waiting for array1 size, reading array1[ x ] results in a cache hit (validity isn’t checked). Reading array2[ array1[ x ] * CACHE LINE SIZE ] results in a cache
miss. Once array1 size arrives, the register changes made during speculative
execution are rewinded, However, array2[ array1[ x ] * CACHE LINE SIZE ] is left in the
cache. A specific element of array2 will be placed in the cache (array1 [ x ]
determines which element). Read all memory blocks storing array2, one by on, The block that is accessed quickly is in the cache, the blocks that take a
longer time to access are in memory. The location of the cache data is array1[x].

130
Q

What is Meltdown?

A

To start array1 is in memory, next to private information belonging to a different
process or to the kernel. array1 [ x ], where x is large, is private information. Normally, attempted access to array1 [ x ] will trigger a fault. array2 is not in memory (but on disk). The computer is made to do speculative execution. array1 [ x ] is found in memory (validity is not checked), array2[ array1[ x ] * PAGE SIZE ] is not in memory and has to be
loaded into memory from disk. array2[ array1[ x ] * PAGE SIZE ] will be left in memory when the exception is caught. Read all pages storing array2, one by one, the page that is accessed quickly is in memory, the pages that take a
longer time to access are on disk. The location of the page in memory is array1[x].

131
Q

What are the differences and similarities with Spectre and Meltdown?

A

Similarities:
Exploit built-in vulnerabilities, not bugs.
Require attacker to execute on system.
Differences:
Spectre reads memory from other processes, Meltdown can also read kernel
memory from user space.

132
Q

What is parallel computing?

A

The idea of parallel computing is to increase performance by performing multiple computations in parallel.Parallel computing on multiple levels:
Pipelining
Threads
Multi-core processors
Multiprocessors
Multicomputers

133
Q

What is a SISD computer?

A

A Single Instruction, Single Data
(SISD) computer has a single instruction stream working on a single data
stream.

134
Q

What is a MISD computer?

A

A Multiple Instruction, Single Data
(MISD) computer has multiple instruction streams working on a single data
stream. This is not found in modern computers.

135
Q

What is a SIMD computer?

A

A Single Instruction, Multiple Data
(SIMD) computer has a single instruction stream working on multiple data
streams. SIMD computers are good for vector
operations, including image and audio
processing.

136
Q

How does a GPU work?

A

A Graphics Processing Unit (GPU) utilizes a large number of ALUs to perform
parallel processing. A GPU is based on a SIMD architecture. In comparison to CPUs, GPUs have more ALUs and and rely less on cache
memories. Therefore, in comparison to CPUs, GPUs have a high throughput and a high
latency.

137
Q

What are Threads?

A

GPUs hide latency by utilizing
threads. A process may be subdivided into
multiple threads, and threads within a process share
data, heap, and code, but have
their own registers and stack. A threaded processor runs a thread until blocked by a memory access request,
when it switches to another ready thread. Thread switches tend to be faster than process switches.

138
Q

What is a MIMD computer?

A

A Multiple Instruction, Multiple Data (MIMD) computer has multiple instruction
streams working on multiple data streams. This is mainly used in supercomputers.

139
Q

What is a multi-core processor?

A

A multi-core processor puts multiple CPU cores on one chip. Each core has its own L1 and L2 cache, and they all share L3 cache.

140
Q

What is a multiprocessor?

A

A multiprocessor puts two or more chips on a board. The processors communicate through shared memory variables. Whenever a
processor wants to modify a shared variable, the processor locks the variable so
that no other processor can modify it.

141
Q

What is a multicomputer?

A

A multicomputer puts two or more multiprocessors in a rack. Each multiprocessor has its own copy of the operating system.

142
Q

What is shared and distributed memory?

A

In shared memory, processors communicate through
the shared memory, which is fast. In distributed memory, processors communicate by passing messages which allows for higher bandwidth.

143
Q

What is a sleep state?

A

Ideally has: Low power consumption and
quick recovery to active state based on user input.

144
Q

What is The Advanced Configuration and Power Interface?

A

Different modes of operation that use different amounts of energy. This can be used for systems, devices and processors.

145
Q

What are the global states?

A

G0; Powered on; S0; Standard Operation
G1; Sleeping; S1; CPU stops running. CPU caches are shut down. Lower power states of hardware devices.
G1; Sleeping; S2; CPU powered off.
G1; Sleeping; S3; Shut down more devices. Make it harder for devices to wake the system.
G1; Sleeping; S4; Save memory to disk and shut down memory.
G2; Powered of; S5
G3; Unplugged

146
Q

What are the device states?

A

D0; Fully operational
D1, D2; Intermediate states (optional)
D3; Device is off.

147
Q

What are the processor states?

A

C0; Fully operational
C1; The processor stops executing instructions. Caches are maintained. Short wake time. Must wake when receiving an interrupt.
C2, C3; Similar to C1 but deeper sleep and longer wake time (optional states).

Processor states are applied to individual cores

148
Q

What are the performance states?

A

A processor could save energy by scaling down the power and clock frequency
(P0 ⇒ P1, . . . , P15).

149
Q

What is the issue with Traditional Cloud Data Centres?

A

Traditional cloud data centres using off-the-shelf components have a Power
Usage Effectiveness (PUE) of 2.0, far from a perfect 1.0.

150
Q

What are Hyperscale Cloud Data Centres?

A

The Open Compute Project is driven by large companies that have an interest in
building more efficient data centres. The project shares designs and best
practices on data centres at no cost.
Hyperscale cloud data centres using Open Compute Project components have a
Power Usage Effectiveness (PUE) of 1.2, close to a perfect 1.0.
One Open Compute Project server replaces 3.75 traditional ones.

151
Q

What are the five elements of the TCP/IP stack in order?

A

Application Layer, Transport Layer, Internet Layer, Network Layer, Physical Layer.

152
Q

What are payloads and headers?

A

Network packets (payload) traverse the protocol stack on each host. Many of the layers add their own headers to the payload which contain supplemental data.

153
Q

What is a host?

A

A host is a computer connected to a computer network.

154
Q

What is a LAN?

A

A local area network (LAN) consists of a switching device, to which hosts are
directly connected. The risk of failure is relatively small.

155
Q

What is a WAN?

A

A wide area network (WAN) consists of connected switching devices, to which
local area networks are directly connected. The risk of failure is larger than in a LAN.

156
Q

What are switches?

A

A switch is a special-purpose hardware device dedicated to interconnecting hosts
on a wired LAN. Switches route packets based on the media access control (MAC) addresses of
the connected devices.

157
Q

What is a MAC address?

A

A 6 byte long identifier for each device connected to the internet. Every device has a unique permanent address. The first 3 bytes are unique to the manufacturer, and the last 3 are unique to the device.

158
Q

What is MAC address spoofing?

A

The apparent MAC address may be changed for reasons of privacy, to bypass
firewalls, etc.

159
Q

What is a router?

A

A router is a special-purpose hardware device dedicated to interconnecting
networks that may use different technologies. Routers periodically exchange routing protocol messages which contain routing
metrics. Based on these routing metrics, each router computes a forwarding
table which contains a valid next hop route for each possible destination address.

160
Q

What are the differences between switches and routers?

A

Connectivity: Switches - Wired, Routers - Wired/Wireless.
Network: Switches - LAN, Routers - LAN/WAN.
Host identifier: Switches - MAC address, Routers - IP addresses.
TCP/IP layer: Switches - Network layer, Routers - Internet layer.

161
Q

What is the difference between MAC addresses and IP addresses?

A

A MAC address stays fixed no matter your location on the network. An IP address makes it possible to deliver a packet to a host.

162
Q

What is a Twisted-Pair Cable?

A

A twisted-pair cable consists of four pairs of copper wires twisted together in a
shielded cable. The direction of the interference changes with “each twist”, thereby reducing
the interference at one pair from other nearby pairs.

163
Q

What is a Fibre-Optic Cable?

A

A fibre-optic cable consists of a bundle of light-conducting fibres in a shielded
cable.

164
Q

What are the differences between Fibre and Twister-Pair cables.

A

In comparison to twisted-pair cables, fibre: has a higher bandwidth, maintains its signal strength better over longer distances, is not affected by electromagnetic interference,
and has lower security risks. However fibre also: has a higher installation cost and is more brittle.

165
Q

What are Terrestrial Radio Channels?

A

A terrestrial radio channel links two-or-more mobile stations via a base station. This includes Wi-Fi and cellular communication. It is convenient, but has struggles with path loss, interference, obstructions and low security.

166
Q

What are satellite radio channels?

A

A satellite radio channel links two-or-more ground stations via a geostationary
satellite. It has high geographical availability and quick recovery time post-disaster, but high latency.

167
Q

What protocols are on the application layer?

A

Examples of application layer protocols are the Hypertext Transfer Protocol
(HTTP), File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP),
Secure Shell (SSH), and Domain Name System (DNS).

168
Q

What is a client-server protocol?

A

In a client-server protocol, a client sends a request to a server and receives a
response back from it

169
Q

What is a peer-to-peer protocol?

A

In a peer-to-peer protocol, one peer sends a request to another, and receives a
response back from it.

170
Q

How does HTTP work?

A

In the Hypertext Transfer Protocol (HTTP), a client sends a request for a web
page to a server and receives the page as a response back from it. HTTP combines hypertext with methods for sending this hypertext between
clients and servers.

171
Q

What does a HTTP request consist of?

A

The request line, the request headers, and the request body.

172
Q

What does the request line consist of?

A

A method (such as GET, HEAD, POST, PUT, DELETE), a resource (for example /images/logo.png), and a version (such as HTTP/1.1).

173
Q

What do the request headers consist of?

A

The request headers consist of (name, value) pairs on separate lines. For example:
Content-Length : 324

The most important request headers are: Host (domain name of server), Connection (keep alive/close), Content-Length, Cookie, Date, User-Agent (browser), Accept-Charset (character encodings).

174
Q

What does the request body consist of?

A

A body which is empty except for POST and PUT requests.

175
Q

What does a HTTP response consist of?

A

The status line, the response headers, and the response body.

176
Q

What does the status line consist of?

A

A version, code and reason. For example HTTP/1.1 200 OK

Some of the most important codes and reasons are 200: OK; 301: Moved Permanently; 404: Not Found; 500: Internal Server Error.

177
Q

What do the response headers consist of?

A

A name and a value. The most common names are Cache-Control (caching allowed), Expires, Connection, Content-Type, Content-Length, Server, Set-Cookie (set cookie id).

178
Q

What does the response body consist of?

A

Contains a body, usually filled with HTML text.

179
Q

How is a web page loaded?

A

A client examines a received HTML file and looks for references to other files,
and then sends HTTP requests for these as well.
Files that are found in the web cache do not need to be requested.

180
Q

What does HTTP 2.0 do that 1.1 does not?

A

In HTTP 2.0, a response or request is subdivided into frames and thereby enables frames from
different streams to be interleaved and then reassembled by the receiver.

181
Q

What does HTTPS do?

A

With HTTPS, all requests and responses are encrypted.
Authentication proves that the server is the legitimate host of the website.

182
Q

What is the DNS?

A

In the Domain Name System (DNS), a client sends a request for the IP address
of a specific web address to a server and receives the IP address as a response
back from the server.

183
Q

What is a web address?

A

A web address, also known as a Uniform Resource Locator (URL), consists of
three parts: a protocol identifier, a host name, and a subdirectory. for example https:// (protocol) computersceience.exeter.ac.uk (host name) /research/ (subdirectory). Only the host name maps to an IP address.

184
Q

How does the DNS achieve Scalability?

A

The DNS must be scalable — it must cope with all hosts. The DNS achieves scalability by organizing a large number of servers in a
hierarchical fashion. There are thirteen root servers at the top of hierarchy. There are many top-level domains servers for country-based (.cn, .us, .de, .uk,
.nl, .ru, …) and generic (.com, .net, and .org, …) top-level domains. Top-level domains are managed by ICANN. Web addresses may utilise multiple subdomains separated by periods
(pronounced “dot”) in a hierarchical fashion, e.g., computerscience.exeter.ac.uk.

185
Q

How does the DNS achieve efficiency?

A

DNS must be efficient — it must not delay any host. The DNS achieves efficiency by local server caching. Clients and routers may
also use their own DNS caches.

186
Q

How does the DNS achieve reliability?

A

The DNS must be reliable — there must not be a single point of failure. There are thirteen Root Servers, [A..M], distributed throughout the world.

187
Q

How does the DNS achieve maintainability?

A

The DNS must be maintainable — it is constantly updated. The IP address
associated with a website can change due to changes in the web server, in the
network configuration, or in the internet service provider. Authoritative domain servers can be registered, updated and deregistered
automatically. These changes then propagate upwards through the tree.

188
Q

How does the Domain Name System Security Extensions (DNSSEC) work?

A

It uses asymmetric encryption and hash functions. When a DNS server sends a message, it attaches the hash encrypted with its private key, along side the message. The client can decrypt the hash with the public key, and compare it with the hash of the message.

189
Q

What two protocols are provided in the Transport Layer?

A

The Transmission Control Protocol (TCP) and The User Datagram Protocol (UDP).

190
Q

What are TCP and UDP?

A

Transport layer protocols that chop up data and apply headers with data such as source and destination ports.

191
Q

What are the source port and destination port in a TCP header?

A

The source port is the port number of the sender, and the destination port is the port number of the destination. Ports are used to map data to the correct process.

192
Q

What is the sequence number and acknowledgement number in a TCP header.

A

The sequence number is a number that identifies the current byte of data being sent. The acknowledgement number is a number that is used to acknowledge receipts of data.

193
Q

What is the Window Size, Checksum and Urgent Pointer in a TCP header?

A

The window size is the number of bytes that the receiver is willing to accept. The checksum is a value used to detect errors in the header and data. The urgent pointer indicates urgent data.

194
Q

What are the seven TCP services?

A

Connection-oriented communication (An application sets up a connection, uses it, and tears it down)

End-to-End communication (A connection has exactly two endpoints)

Complete reliability (Data will be received exactly as sent)

Full-Duplex communication (Data may be sent and received simultaneously)

A Stream Interface (A continuous stream of data is sent and received)

Reliable Connection Startup (provided via a 3 way handshake so communication always starts properly)

Graceful Connection Shutdown (provided via a 4 way handshake so communication always finishes properly)

195
Q

What are the four parts of a UDP header?

A

Source Port - Port number of the sender
Destination Port - Port number of the destination
Length - Total length of the packer
Checksum - Detects errors

196
Q

What are the four UDP services?

A

Connectionless Communication (An application does not set up or tear down a connection)
End-to-End Communication (A connection has exactly two endpoints)
Best-Effort Reliability (Data may be lost, duplicated, or delayed)
A message interface (Individual data items are sent and received)

197
Q

What are the advantages of TCP and UDP?

A

TCP: Full reliability, but high latency
UDP: Minimal latency, but only has best-effort reliability
TCP is used when the whole file needs to reach its destination, and UDP when latency is more important.

198
Q

What is IPV4?

A

The fourth edition of the Internet Protocol, found on the Internet Layer.

199
Q

How is an IPv4 address formatted?

A

4 bytes data. Uses a dotted decimal notation. This means 10010000 10101101 00000110 10001001 becomes 144.173.6.137. It is divided into a network prefix and host suffix.

200
Q

What is CIDR notation and Subnet masking?

A

CIDR is a method of writing the IP address and the number of bits in the network prefix. for example 10.1.1.1/8 has 8 bits in the network prefix. CIDR notation is an alternative way of representing a subnet masks. Subnet masks look like IP addresses, but a 1 means prefix, and a 0 means not prefix. For example 255.255.255.252 is a 30 bit network prefix.

201
Q

What is subnetting?

A

Organizations will use subnetting to divide large networks into smaller, more
efficient subnetworks. Part of the host suffix is used to identify individual subnets.

202
Q

What are the four services provided by IPv4?

A

Addressing - It gives every host and router network interface an address.

203
Q

What are the four services provided by IPv4?

A

Addressing - It gives every host and router network interface an address.
Forwarding - A router forwards packets on the appropriate interface according to their
addresses.
Routing - This is where the best path for the data to take is determined. A router stores a forwarding table which specifies an interface for each possible
destination address.
Reporting - The Internet Control Messaging Protocol (ICMP) allows hosts and routers to
communicate (often error) information to each other.

204
Q

What is IPv4 Space Exhaustion?

A

In October 2015, the American Registry for Internet Numbers (ARIN) announced
that it had exhausted its pool of addresses; other registries are exhausted too. There are only 2^32 addresses which is 4.2 billion, way less than the global population.

205
Q

What are the two methods of conserving IPv4 addresses?

A

Network Address Translation - A Network Address Translation (NAT) box maps many “inside” addresses to a single “outside” address, using port numbers to resolve ambiguity.
Classless Inter-Domain Routing - Allows for any size of subnet, reducing waste of IP addresses.

206
Q

How does IPv6 provide a larger address space?

A

IPv6 consists of 128 bits, meaning it allows for 2^128 addresses, which is a massive amount. IPv6 addresses use eight 16 bit words, which can be written as eight groups of four hex symbols.

207
Q

How can IPv6 addresses be abbreviated?

A

Remove any leading 0s within each group of four hex symbols. One string of one or more groups consisting of all zeros can be replaced with a double colon.

208
Q

How is an IPv6 address structured?

A

Usually has a 48 bit site prefix and a 16 bit subnet ID, followed by a 64 bit interface ID.

209
Q

What is EUI-64?

A

EUI-64 allows each host to give themselves a unique interface ID based on its MAC address. This is no longer used because of security issues. Instead we now use random and temporary interface identifiers.

210
Q

How does IPv6 provide built-in security?

A

Every IPv6 packet has a fixed header, some optional headers, that may be used for security features, and a payload. An optional authentication header has an SPI for encryption, and some authentication data for signing.

211
Q

What does a jumbogram do?

A

Allows for a larger maximum transmission size, which reduces the communication overhead.

211
Q

What does a jumbogram do?

A

Allows for a larger maximum transmission size, which reduces the communication overhead.

212
Q

What is CSMA/CD?

A

Used in wired networks. All computers are attached to a shared cable, and any computer may transmit if the cable is unused. While transmitting, a computer may detect that it is receiving a message, after detecting a collision, a computer waits for a random interval (chosen from an exponentially-doubling range), and then tries again. It is barely used nowadays.

213
Q

What is CSMA/CA?

A

All computers use a shared frequency, and any computer may transmit if the frequency is clear. A computer finding the frequency clear, transmits after an instant. A computer finding the frequency busy counts down from a random value, and if the channel is clear tries to transmit and hopefully receives an acknowledgement.

214
Q

What is the hidden node problem and how is it solved?

A

The hidden node problem is when a computer may be in range of the base station, but out of range of another computer. The hidden node problem may be solved by reservation using ready to send and clear to send messages.

215
Q

What is the Token Ring protocol?

A

In a token ring wired network, a token continuously circulates, to which messages may be attached, and from which they may be removed.

216
Q

What is the Bit-Map protocol?

A

In a bit-map protocol, host n may announce that it has a frame to send by inserting a 1 bit into slot n. Following this, hosts begin to transmit frames in numerical order.

217
Q

What is the Binary countdown protocol?

A

Hosts that wish to transmit broadcast their binary address. Hosts with ”1”s in their address get priority. The winner of the bid gets to transmit a frame.

218
Q

What can a firewall do?

A
  • Restrict both incoming and outgoing traffic
  • Use both positive and negative filters
  • Consider both the payload and different TCP/IP headers
  • Consider packets individually or as part of a flow
219
Q

What can a firewall do?

A
  • Restrict both incoming and outgoing traffic
  • Use both positive and negative filters
  • Consider both the payload and different TCP/IP headers
  • Consider packets individually or as part of a flow
220
Q

What is a Packet-Filtering firewall?

A

A packet-filtering firewall filters individual packets on the basis of packet headers (up to the transport layer) and packet payloads. It may filter based on port numbers, IP addresses, filetypes and malware signatures.

221
Q

What is a wildcard mask?

A

A wildcard mask indicates which bits of an IP address a particular rule is concerned with during IP address matching. A 0 means the corresponding but must match, and a 1 means it does not matter. This can be used to allow or deny specific IP addresses.

222
Q

What is a stateful firewall?

A

A stateful firewall reviews the same packet information as a packet filtering firewall, but also filters packets on the basis of a directory of established transport-layer connections. It can track TCP and UDP connections.

223
Q

What is an Application-Level Gateway?

A

An application-level gateway filters packets based on applications. An application-level gateway sets up two TCP connections: one from the trusted network to the firewall, and one from the firewall to the untrusted network. This can be used to block specific websites.

224
Q

What is a Circuit-Level gateway?

A

A circuit-level gateway determines which TCP connections will be allowed. Just as the application-level gateway, a circuit-level gateway sets up two TCP connections. The circuit-level gateway approves or denies the TCP connection based on IP addresses, port numbers, user authentication, etc.

225
Q

What is a Single Firewall inline?

A

A single firewall inline puts a firewall between an external and internal router.

226
Q

What is a Double Firewall inline?

A

A double firewall inline puts a demilitarized zone (DMZ) between an external and internal firewall. The DMZ is a network for systems that must be externally accessible (e.g., e-mail, DNS, web), but still need some protection.

227
Q

What is a VPN?

A

A virtual private network (VPN) uses encryption and authentication (provided by, for example, IPsec) to provide a secure connection through an otherwise insecure network, typically the Internet.

228
Q

What are the pros and cons of a VPN?

A

Pros: A VPN can be used to bypass firewalls and other restrictions, and to increase privacy and security. Cons: Using a VPN may result in a lower connection speed, blocks from certain internet services, and resale of your data to third parties.