Podcast
Questions and Answers
What is a Shell?
What is a Shell?
- Runs under user control
- A program that provides user environment and CLI (correct)
- A command line interface only
- Part of the kernel
What is a Process?
What is a Process?
A running program.
What is a Daemon?
What is a Daemon?
A program that runs in the background, waiting for specific events.
What is a Lightweight Process?
What is a Lightweight Process?
What does the System Call Interface do?
What does the System Call Interface do?
What is a Library Function Call?
What is a Library Function Call?
Linux can run on a processor without a Memory Management Unit.
Linux can run on a processor without a Memory Management Unit.
Linux is the ___ of the OS.
Linux is the ___ of the OS.
UNIX features what two rings of protection?
UNIX features what two rings of protection?
In a 32-bit system, how much memory is reserved for Kernel Mode?
In a 32-bit system, how much memory is reserved for Kernel Mode?
In a 32-bit system, how much memory is reserved for User Mode?
In a 32-bit system, how much memory is reserved for User Mode?
Code running in user mode relies on ___ to access hardware.
Code running in user mode relies on ___ to access hardware.
Crashes in user mode are nearly always ___ .
Crashes in user mode are nearly always ___ .
In kernel mode, the executing code has ___ and ___ access to the hardware.
In kernel mode, the executing code has ___ and ___ access to the hardware.
Kernel crashes are ___ and will ___ the entire PC.
Kernel crashes are ___ and will ___ the entire PC.
Processes and their threads start at ___ mode and hardware requests are handled via the ___.
Processes and their threads start at ___ mode and hardware requests are handled via the ___.
Access to kernel routines is only possible through the ___ ___ ___.
Access to kernel routines is only possible through the ___ ___ ___.
What is Multithreading?
What is Multithreading?
Linux does not distinguish between ___ and ___.
Linux does not distinguish between ___ and ___.
What are user threads mapped into?
What are user threads mapped into?
Each shell has its own specific set of ___ and choice of ___.
Each shell has its own specific set of ___ and choice of ___.
The main difference in a ___ and a ___ is that the latter supports using the computer.
The main difference in a ___ and a ___ is that the latter supports using the computer.
What is the primary function of Kernel Mode?
What is the primary function of Kernel Mode?
What is a Trap?
What is a Trap?
Describe the 5 steps in the System Call Flow.
Describe the 5 steps in the System Call Flow.
What is Process Management?
What is Process Management?
Process management uses a ___ to share CPU time.
Process management uses a ___ to share CPU time.
What is Memory Management?
What is Memory Management?
What is Swapping?
What is Swapping?
What is the Virtual File System (VFS)?
What is the Virtual File System (VFS)?
What is the Network Stack?
What is the Network Stack?
Describe the 3 steps of the network stack data flow.
Describe the 3 steps of the network stack data flow.
What are Board Support Packages (BSPs)?
What are Board Support Packages (BSPs)?
What is the GNU C Library?
What is the GNU C Library?
What are the steps of the Linux System Boot Process?
What are the steps of the Linux System Boot Process?
What are the 3 steps that the BIOS completes during the Linux boot process?
What are the 3 steps that the BIOS completes during the Linux boot process?
What is the step that the MBR completes during the Linux boot process?
What is the step that the MBR completes during the Linux boot process?
What is GRUB?
What is GRUB?
What is initrd?
What is initrd?
What is insmod?
What is insmod?
What are the 2 steps that the GRUB completes during the Linux boot process?
What are the 2 steps that the GRUB completes during the Linux boot process?
What is the path of the GRUB configuration file?
What is the path of the GRUB configuration file?
During the Kernel phase, what does the kernel execute?
During the Kernel phase, what does the kernel execute?
What 2 steps does the kernel phase complete during the Linux boot process?
What 2 steps does the kernel phase complete during the Linux boot process?
What is the /sbin/init Daemon?
What is the /sbin/init Daemon?
What is a Run Level?
What is a Run Level?
What is the default run level in Linux?
What is the default run level in Linux?
What is the default run level in Solaris?
What is the default run level in Solaris?
In Linux, what does init search for in the inittab file?
In Linux, what does init search for in the inittab file?
What does the 0 Run Level in Linux signify?
What does the 0 Run Level in Linux signify?
What does the 1 Run Level represent in Linux?
What does the 1 Run Level represent in Linux?
What does the 2 Run Level indicate in Linux?
What does the 2 Run Level indicate in Linux?
What is the 3 Run Level in Linux?
What is the 3 Run Level in Linux?
What does the 4 Run Level in Linux represent?
What does the 4 Run Level in Linux represent?
What does the 5 Run Level signify?
What does the 5 Run Level signify?
What does the 6 Run Level indicate?
What does the 6 Run Level indicate?
What file describes default run levels?
What file describes default run levels?
A directory for each run level is located in _______ directory.
A directory for each run level is located in _______ directory.
What is the init command used for?
What is the init command used for?
What does the who -r command do?
What does the who -r command do?
The inittab file describes what processes start at bootup and what does the init daemon get?
The inittab file describes what processes start at bootup and what does the init daemon get?
What does a # symbol at the beginning of a line in inittab mean?
What does a # symbol at the beginning of a line in inittab mean?
What line in /etc/inittab can be altered to change the system's default run level?
What line in /etc/inittab can be altered to change the system's default run level?
In Linux, the ______ monitors the tty for a user login request.
In Linux, the ______ monitors the tty for a user login request.
In Solaris, what monitors the tty for user login requests?
In Solaris, what monitors the tty for user login requests?
How many fields are there in the inittab file?
How many fields are there in the inittab file?
Field 1 in inittab is an ID which is a _______.
Field 1 in inittab is an ID which is a _______.
Field 2 in inittab lists the run levels that apply to the entry; if no run level is defined, it runs for all run levels. What is this field called?
Field 2 in inittab lists the run levels that apply to the entry; if no run level is defined, it runs for all run levels. What is this field called?
What does Field 3 in inittab describe?
What does Field 3 in inittab describe?
What are the 6 sub-fields in the Action Field of inittab?
What are the 6 sub-fields in the Action Field of inittab?
What does the sysinit sub-field in Field 4 do?
What does the sysinit sub-field in Field 4 do?
What does the respawn sub-field in inittab ensure?
What does the respawn sub-field in inittab ensure?
What does the boot sub-field in inittab do?
What does the boot sub-field in inittab do?
What does the off sub-field do?
What does the off sub-field do?
What does the wait sub-field represent?
What does the wait sub-field represent?
The initdefault sub-field runs the default run level for the system; what field is this?
The initdefault sub-field runs the default run level for the system; what field is this?
What directory contains master copies of all rc scripts?
What directory contains master copies of all rc scripts?
What does a script that begins with a 'K' do?
What does a script that begins with a 'K' do?
What does a script that begins with an 'S' do?
What does a script that begins with an 'S' do?
How can you stop a file in a script from spawning at boot?
How can you stop a file in a script from spawning at boot?
What is the chkconfig command used for?
What is the chkconfig command used for?
Updates made with chkconfig take effect immediately.
Updates made with chkconfig take effect immediately.
What does chkconfig --list do?
What does chkconfig --list do?
What does the command chkconfig sshd off do?
What does the command chkconfig sshd off do?
What is the service command used for?
What is the service command used for?
Describe four ways that a service can be started/stopped on a Linux system.
Describe four ways that a service can be started/stopped on a Linux system.
Describe two ways that a service can be stopped/started on a Solaris system.
Describe two ways that a service can be stopped/started on a Solaris system.
What is the strace command used for in Linux?
What is the strace command used for in Linux?
What is the truss command used for in Solaris?
What is the truss command used for in Solaris?
What are the options for the Linux strace command?
What are the options for the Linux strace command?
What are the options for the Solaris truss command?
What are the options for the Solaris truss command?
List the System Calls for Low-Level File I/O.
List the System Calls for Low-Level File I/O.
List the System Calls for Process Control.
List the System Calls for Process Control.
List the Common System Calls.
List the Common System Calls.
Child processes that have not been 'wait()ed' for are called ___ processes.
Child processes that have not been 'wait()ed' for are called ___ processes.
The ___ process is in charge of clearing a process table.
The ___ process is in charge of clearing a process table.
If the parent does not clear the table, ___ takes over.
If the parent does not clear the table, ___ takes over.
What are Loadable Kernel Modules (LKM)?
What are Loadable Kernel Modules (LKM)?
What does the lsmod command do?
What does the lsmod command do?
Where are tunable kernel module parameters located?
Where are tunable kernel module parameters located?
What does the sysctl command provide?
What does the sysctl command provide?
Study Notes
Shell
- A program providing a user-customizable environment and command-line interface (CLI) to the kernel.
- Not part of the kernel itself.
Process
- Defined as a running program within the system.
Daemon
- A background program operating without direct user control.
- Activated by specific events or conditions.
Lightweight Process
- Shares logical address space and system resources with other processes, similar to threads in Windows.
System Call Interface
- Acts as the primary interface between applications and the Linux kernel.
- Facilitates function calls from user space to kernel space, transitioning user mode to kernel mode.
Library Function Call
- A wrapper function that facilitates system calls to the Linux kernel.
MMU and Linux
- Linux is capable of running on processors with or without a Memory Management Unit (MMU).
Kernel
- The central component of the operating system, managing operations and resources.
User Mode and Kernel Mode
- UNIX systems feature two protection modes: unprivileged (User Mode) and privileged (Kernel Mode).
Memory Allocation in 32-bit Systems
- In a 32-bit system, 1GB of memory is allocated to Kernel Mode, and 3GB to User Mode.
Access to Hardware
- Code in user mode must rely on APIs or system calls to interact with hardware.
User Mode Crashes
- Crashes occurring in User Mode are generally recoverable.
Kernel Mode Access
- Code in Kernel Mode has full and unrestricted access to hardware resources.
Kernel Crashes
- Crashes in Kernel Mode can lead to catastrophic failures, halting the entire PC.
Process and Threads Initialization
- Processes and threads commence in User Mode, transitioning to Kernel for hardware requests.
Access to Kernel Routines
- Access to kernel routines is exclusively through the System Call Interface.
Multithreading
- User threads can correspond to one or more lightweight processes.
Threads and Processes Relationship
- Linux does not differentiate significantly between threads and processes.
User Threads Categories
- User threads are mapped into kernel processes categorized as Shells, UNIX Commands, Utility Programs, User Application Programs, and Libraries (e.g., GNU C Library glibc).
Shell Functions
- Each shell provides its specific set of functions and distributions.
Command vs Utility
- The key distinction between a command and a utility is that the latter supports computer functionality.
Kernel Mode Functions
- Kernel Mode's primary role is to manage system resources and provide system services.
Trap Function
- Transfers control to the kernel for executing the required system call.
System Call Flow
- The system call flow consists of user-initiated calls, through glibc library and assembly, conveyed to the kernel where execution occurs.
Process Management
- A kernel responsibility dedicated to ensuring timely execution of processes.
Scheduler
- The process management utilizes a scheduler to distribute CPU time among multiple lightweight processes.
Memory Management
- Involves tracking memory page statuses to allow dynamic adjustments according to system requirements.
Swapping
- A mechanism to move pages to disk when memory is under pressure.
Virtual File System (VFS)
- Kernel component that implements file-related interfaces for user programs and supports multiple file systems.
Network Stack
- Kernel component that provides network resource interfaces.
Network Stack Data Flow
- Involves sending socket buffers to user apps, transferring data to kernel memory, and device drivers communicating with NIC protocols.
Board Support Packages (BSPs)
- Necessary elements for specific architecture functionality and efficiency within the Linux kernel.
GNU C Library
- The standard C library implementation used by numerous operating systems and applications.
Linux Boot Process Acronym
- Stages include Big BIOS, Mike MBR, Getting GRUB, Kicked KERNEL, In INIT, Russia RUNLEVEL.
BIOS Boot Process Steps
- Performs POST (Power-On Self Test), constructs a device tree, and executes the MBR (Master Boot Record).
MBR Role
- Executes GRUB or LILO for boot management.
GRUB Characteristics
- Flexibly configurable and critically important for system operation.
Initial Root File System
- The initrd contains core directories and executables needed before the main root file system loads.
Kernel Execution Steps
- Mounts the root filesystem and executes the /sbin/init daemon.
Init Daemon
- The first process started by the system with Process ID 1 (PID 1).
Run Level Concept
- Defined configurations outlining active processes in the system.
Default Run Levels in Linux
- Run Level 5 is set as the default, while Run Level 3 is default in Solaris.
inittab Configuration
- Init consults the inittab file for the run level entry during startup.
Run Levels Characteristics
- Denote specific operational states, such as halting processes (0), single-user tasks (1), multi-user without network support (2), full multi-user with services (3), user-defined tasks (4), multi-user with X-windows (5), and rebooting (6).
Service Management Commands
- chkconfig and service commands manipulate service states in real-time.
inittab Fields
- Define ID, run state, action, process to execute, and more.
Script Execution Order
- Scripts prefixed with 'K' kill processes, while 'S' spawns services.
Kernel Module Management
- Loadable Kernel Modules allow in-kernel operations for device drivers and functionalities.
Kernel Parameters
- Managed via /proc/sys and adjustable in real-time with the sysctl command.
System Calls for File I/O and Process Control
- List includes functions like open(), close(), fork(), and wait() among others.
Zombie Processes
- Child processes not waited on become zombie processes, necessitating cleanup by parent processes or init if they remain unclaimed.
Overall Linux Boot and Service Lifecycle
- Involves security and functionality checks at multiple stages to ensure an operating system is fully operational and configurable.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge of key UNIX concepts with these flashcards. This quiz covers essential terms like shell, process, and daemon, providing a solid foundation for understanding UNIX environments. Perfect for students in the JCAC program!