Operating Systems Flashcards

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

What is an operating system?

A

The program that manages a computer’s resources, especially the allocation of those resources among other programs (CPU)

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

Purpose of operating system

A

Running several applications at the same time. The Operating System needs to manage the use of hardware resources amongst several applications

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

Definition of a process

A

A program in memory that is in execution.
Several processes can be in memory at the same time.
Processes can be run through several threads.
Consists of code (machine code instructions) and data in memory

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

Layered Architecture of an OS

A

Kernel + libraries + tools

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

Advantages of UNIX

A

Highly modular– includes only features you need
Highly scalable and portable– from mobile phones, desktops to supercomputer
Highly reliable– update mechanism, desktop, servers and cloud
Highly cost-effective – Linux and Android are free

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

Describe the five different states a process can obtain during its lifespan

A
running- a process currently has CPU
ready- process is ready to get CPU
blocked- process is waiting for some event
new- created but not admitted
exit- process destruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a message identifier?

A

Named constant that identifies the purpose of the message

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

What are message parameters?

A

Specify data or the location of data used by a window procedure when processing a message

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

How are threads and processes scheduled?

A

CPU priority. They wait in a queue for their turn on the CPU. A process/thread can be in different states, i.e. waiting or running. The OS scheduler determines how long each process/thread can run before it is taken off the CPU.

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

How is the memory managed?

A

All memory areas, allocated or available, are preceded and followed by structures known as memory links. These links contain information about the area that they enclose. Using this information, the operating system can determine if the area is available or in use. If the area is currently in use, the operating system can also decide whether the area can be moved to virtual memory or moved to another location in the main memory.

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

How is the address translation performed?

A

When the system allocates a frame to any page, it translates this logical address into a physical address and creates an entry into the page table to be used throughout the execution of the program. When a process is to be executed, its corresponding pages are loaded into any available memory frames

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

How is the disk space for files organised?

A

divide files into blocks of fixed size

file is stored as blocks that are not necessarily adjacent

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

Explain the FAT file system

A

The FAT file system divides the disk space into
blocks. Pointers to each block are used in the File Allocation Table. Files are broken up into many blocks which are linked together. The entries in the File Allocation Table are the block number of the next linked block. The directory entry contains a pointer to the first file block.

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

Characteristics of process

A

Process environment- lives in a protected (memory) environment. No interference between processes. But communication between processes is possible (IPC - inter-process communication)
Resource Ownership- allocated virtual address space
(protected memory). Assigned from main memory. Control of I/O channels. Files
Code Execution- Single thread (classic process). Multi-threaded (modern process)

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

What are threads?

A
A sequence of instructions which exist 
within the same process. 
Every process has at least one thread.
Threads of the same process share the same process resources, including memory and file access. 
Threads can run in parallel.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is multiprocessing?

A

Method to run several processes and threads

17
Q

What is a scheduler?

A

Part of the OS kernel process management that decides which processes to run next.

18
Q

What is the purpose of a memory manager?

A

Ensures that the available memory is used effectively

19
Q

What are the roles of the memory manager?

A

allocate memory (RAM) to processes during execution
de-allocates memory when no longer needed
re-locates memory
prevent processes from running into each other’s
memory space (security/protection)
virtualise memory
swapping process memory between RAM and disk
when memory cannot hold all process(es)

20
Q

What is monoprogramming?

A

Only one process runs at a time
At any given moment, the operating system and one user program reside in RAM
MS-DOS

21
Q

Explain the virtual memory process

A

Each process gets its own (virtual) linear address space but only the used elements need to be available in physical memory
combined with paging which reduces memory fragmentation

22
Q

What is paging?

A

Process of breaking up the memory into much smaller

blocks (pages)

23
Q

What is a page frame?

A

A page in physical memory

24
Q

What is a page table?

A

Contains the mappings between the virtual address and physical address for each process
Every process has their own page table

25
Q

Describe the address translation steps

A

Take the 4 higher-order bits (HOB) of the virtual address
Convert HOB into a decimal number. This is the page number
The page number is used as an index into the page table (as with arrays)
Obtain the corresponding page frame from the page table in physical memory
At position 4 of the page table, there are 3 Higher-Order Bits of the new physical address
New Physical address = 3 HOB + 12-bit offset

26
Q

What is a page fault?

A

Occurs if a program attempts to access an unmapped page (virtual page) that is not in memory

27
Q

What are the file management tasks?

A
To organise the file data in an efficient way
Hard disk partitioning
Block allocation
Free space allocation
File system layout organisation
Security (file access control)
28
Q

What are file operations?

A

Allow data to be stored and retrieved

29
Q

Describe linked list allocation

A

each file is kept as a link list of disk blocks
the first word of each disk block contains a pointer to next
disk blocks are no longer consecutive

30
Q

Advantages of linked list allocation

A

only internal fragmentation

directory entry stores the first block address

31
Q

Disadvantages of linked list allocation

A

random access is slow

some disk space is used for pointer and not for data

32
Q

Advantages of linked list with index

A

the entire block is available for data

single address entry for the file

33
Q

Disadvantages of linked list with index

A

The entire table must be brought into memory

potentially high overhead (disk space for tables)