Week 1 Flashcards

(38 cards)

1
Q

What is an OS?

A

An OS is a software that manages computer resources and offers abstractions

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

What is the Kernel?

A

Central part of OS

Runs all time on the computer

Functionality depends on OS design

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

What is the Kernel Mode? (Or privileged mode)

A

Where the kernel runs

CPU has full access to system resources

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

What is User Mode?

A

It’s where applications run

CPU has restricted access to system resources

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

How does the OS switch between kernel and user mode

A

To switch to kernel mode the trap mode bit is triggered and set to 0, after the task has been performed in kernel mode the return mode bit is set to 1 which brings it back to OS

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

What is a Monolithic Structure?

A

Large kernel with most of OS services run in kernel mode

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 structure?

A

Pros:

Fast performance

Cons:

Stability and Security

Maintenance and Debugging

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

What is are the pros and cons of a Microkernel Structure?

A

Pros:

Stability and Security

Cons:

Poor Performance

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 Microkernel Structure?

A

Pros:

Stability and Security

Cons:

Poor Performance

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

What is a Layered Structure?

A

OS broken into hierarchy layers

Communication with above and below

Implemented into computer networks (TCP/IP)

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

What are the pros and cons of a Layered Structure?

A

Pros:

Easy to maintain debug and test

Security and Stability

Cons:

Poor performance

Design challenges

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

What is a Modular Structure?

A

Combines aspects of Monolithic and Microkernels

Start with small kernel

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 Structure?

A

Pros:

Fast Performance

Flexibility and Extensibility

Cons:

Monolithic as more modules loaded

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

Fact

A

OS’s combine different structures

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 data stored on non-volatile storage

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

What are magic numbers in files?

A

Sequence of bytes at beginning of file

17
Q

What are examples of meta data?:

A

Name

Identifier

Type

Location

Size

Timestamps

Permissions

18
Q

Where is Meta Data stored in linux?

19
Q

What are the 2 features of Linux Files?

A

Everything is a file

Files represented by tree-like inode pointer structures

20
Q

What are some examples of Linux file types?

A

Regular files

Special files (character of block)

Directories

Pipes

Links (soft or hard)

21
Q

What is a hard link?

A

Another name for an existing file

points directly to inode of file

If file is moved/deleted the link will still work

22
Q

what is a soft link?

A

A pointer to filename

If file is moved/deleted, the link will not work

23
Q

How is the storage space divided for files?

A

Filesystems divide storage space into fixed-size blocks

Typical block size is 4096 bytes (4KB)

24
Q

What can a file be broken down into?

A

into chunks that fit into blocks

25
What are magnetic disks?
Use magnetic fields to store data eg. HDD or floppy disks
26
What are magnetic disks organised into?
Platters - Circular disks Read/Write Heads For reading and writing the head senses/ changes the magnetism of a sector At bit level: magnetism in one direction represents a 1 magnetism in other direction represents a 0
27
How are the platters of a Magnetic Disk organised?
Each platter is divided into circular tracks Each track is divided into sectors - each sector has fixed size Set of all tracks are immediately above one another make up a cylinder
28
How does a magnetic disk work?
Read/ Written by moving the arms in and out of required cylinder All heads/ arms move together Platters rotate; rotation speed is related to data transfer rate
29
What is a Solid State Disk?
No moving parts and instead stores data using flash memory
30
What are the components in an SSD?
Controller (embedded processor) Buffer memory (volatile memory) Flash Memory - divided into pages that are grouped into blocks
31
What are the read, write and erase speeds of an SSD?
Read - Fast Write to empty drive - Fast Erase - Slow
32
How is an SSD read?
1. Copying flash memory page into the buffer 2. Reading data from the page in the buffer
33
How is an SSD overwritten?
1. Copying memory block into buffer 2. Erasing block in the flash memory 3. Modifying block in the buffer 4. Writing block from the buffer to the flash memory
34
What are the Pros and Cons of SSDs compared to magnetic?:
Pros: SSDs are faster SSDs more reliable SSDs are more power efficient Cons: SSDs more expensive SSDs deteriorate with every write
35
What is a wear levelling?
A process that is designed to extend the life of solid state devices
36
What is dynamic wear levelling?
New data written to least-recently-used block Avoid wearing out certain blocks by writing to the same ones again and again problem: "cold" data is not moved
37
What is Static-wear-levelling?
Same as dynamic besides: Periodically moves existing data to least-recently-used block Therefore we avoid wearing out certain blocks while blocks with cold data is never moved
38
What is the benefit of wear levelling?
A block will fail once it reaches a critical amount of writes Thanks to wear-levelling, we spread the writes evenly among the blocks