Linux Flashcards
1
Q
Explain the concept of a “process” in Linux
A
- a process executes an instance of a program
- It has its own memory space, program counter, registers, and system resources.
2
Q
Describe the role of the Virtual File System (VFS) in Linux
A
- The Virtual File System (VFS) is a layer of abstraction that provides a consistent interface for interacting with different file systems.
3
Q
Discuss the Linux I/O model and the role of the I/O scheduler
A
- The Linux I/O model revolves around asynchronous I/O operations.
- The I/O scheduler manages the ordering of I/O requests
4
Q
Explain the Linux memory management system, including virtual memory, paging, and swapping
A
- Linux memory management involves virtual memory, where each process has its own virtual address space.
5
Q
What is the significance of system calls in Linux?
A
- Provide a controlled entry point for user programs to access low-level kernel functionalities, ensuring security and stability.
6
Q
Could you provide examples of common system calls and their role in interacting with the kernel?
A
- fork(): Creates a new process.
- open(): Opens a file and returns a file descriptor.
- read(): Reads data from a file descriptor.
- write(): Writes data to a file descriptor.
- execve(): Executes a new program.
7
Q
How does the kernel manage processes?
A
- The kernel manages processes through the Process Control Block (PCB)
- employs the scheduler to switch between processes, allowing multitasking and efficient resource utilization.
8
Q
How does Virtual File System provide an abstraction layer for various file systems?
A
- VFS abstracts away the underlying details of various file systems like ext4, NFS, and more, allowing applications to use common system calls for file operations.
- VFS uses a set of function pointers to redirect these calls to the appropriate file system driver, ensuring seamless compatibility regardless of the actual file system in use.
9
Q
You have a Linux server with an unknown process listening on a network port. How do you work out which process is listening on the port?
A
- netstat -nlp will show processes listening on ports
- lsof -p PID will show all the files the process has open
- strace -p PID shows what system calls a process is making
- wireshark to show network traffic