OS11 Flashcards

(20 cards)

1
Q

Describe the key features of UNIX.

A

Separation of kernel from user space. Processes are units of scheduling and protection. All IO looks like file operations.

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

What is Linux?

A

It is a multiuser, multitasking system with UNIX compatible tools.

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

State the Linux design principles.

A

Main design goals are speed, efficiency and standardisation. POSIX compliant.

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

Describe the 3 components of a Linux system.

A

The kernel for maintaining abstraction of the operating system. System libraries for interacting with the kernel. System utilities for individual management tasks.

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

What are kernel modules?

A

Sections of kernel code that can be compiled, loaded and unloaded independently.

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

What are kernel modules used for?

A

To implement device drivers, file systems or networking protocols.

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

State the benefit of kernel modules.

A

Allow non-GPL compliant code to be distributed. Allows a Linux system to be setup with a minimal kernel, without device drivers compiled in.

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

Why does using kernel modules require conflict resolution?

A

The kernel must manage modules trying to access the same hardware.

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

Describe how to create a new process in UNIX.

A

fork to create a new process. exec to run a new program.

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

Describe the 3 kinds of properties stored about the process in Linux.

A

Identity: the process ID, process credentials (user ID and group IDs), namespace gives specific view of file system hierarchy. Environment: inherited from parent, includes command-line arguments and environment variables. Context: the state of a program at a point in time.

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

What attributes does process context include in Linux?

A

The scheduling context + accounting information. The file system context + file table. Signal handler table for the per-process signal handling routine. Virtual-memory context: the process’ private address space.

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

State the difference between processes and threads on Linux.

A

A thread is a process that shares its parent’s address space.

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

On UNIX

A

what is clone?

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

Describe the 5 process states on UNIX.

A

Running. Uninterruptible sleep (waiting for resource/signal). Interruptible sleep (waiting for resource). Stopped (paused). Zombie (exited).

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

Describe the process scheduling algorithm in traditional UNIX.

A

Round robin within priority level with dynamic priority.

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

Describe completely fair scheduler.

A

The target latency is the interval during which every runnable task should run at least once. vruntime holds the per-task virtual run time, its decay rate depends on the nice value. Scheduler picks task with lowest vruntime.

17
Q

Describe the two ways of requesting kernel-mode execution.

A

Process requests an OS service by a syscall or implicitly when a page fault occurs. Device drivers deliver a hardware interrupt, causing the CPU to execute a kernel-defined handler for the interrupt.

18
Q

Describe how kernel code is guaranteed to run without interruption in Linux.

A

Single processor: disable kernel pre-emption. Multiple processor: acquire spin lock, causing other processes to wait until the lock is available.

19
Q

Compare the top half and bottom half interrupt handlers.

A

Top half are normal interrupt service routines, runs with recursive interrupts disabled. Bottom half is ran with all interrupts enabled, and a mini-scheduler to ensure the bottom half never self-interrupts.

20
Q

Describe the methods of inter-process communication on UNIX.

A

Signals: process-to-process, carry no information other than the signal number. Wait queues: process puts itself to wait queue for an event, then informs scheduler it is no longer running. Pipes: a type of inode in the VFS. Shared memory: fast but no synchronisation mechanism.