Week 6: System Calls + Kernel Flashcards

1
Q

What are some of the services system calls provide?

A
File manipulation.
Process control.
Device management.
Information maintenance.
Communications.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the file manipulation modes?

A

Read: 4
Write: 2
Execute: 1

Read + Execute = 5

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

What are the four groups found in permission?

A
OUGO
O: Special flag
U: User
G: User group
O: Other users
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the two system calls for opening and closing files?

A
int open(char * path, int flags, mode u mode): Opens/creates file
int close(fd):
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What type of OS is Linux?

A

Monolithic, meaning entire OS (drivers, file system and application IPC) is working in kernel space.
And modular.

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

What are the two main modes for kernel code?

A

Process Context: Working for user programs by executing a system call.
Interrupt Context: Handling an interrupt, preempted by higher priority interrupt.

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

What are the main functions of the Linux kernel?

A
Device drivers.
File systems.
Scheduling and process management.
Memory management.
Networking.
Architecture specific, low level code (e.g. assembly).
Include-files.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the proc file system?

A

A virtual file system that provides a way to interact with kernel space from user space.

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

What are the advantages of kernel modules?

A
Save memory.
Error in module does not affect kernel.
Faster to maintain and debug.
Easier to maintain multiple machines on a single code base.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the disadvantages of kernel modules?

A

Size: Consumes unpagable memory.

Security.

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

What are the types of module in the kernel?

A

In-Source Tree: Present in source code.

Out-of-Tree: Not present in source code.

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

What two functions are needed for every module?

A
Initialize: Module loaded into kernel.
Cleanup: Just before module is removed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly