Podcast
Questions and Answers
What is a Shell?
What is a Shell?
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?
Signup and view all the answers
What does the System Call Interface do?
What does the System Call Interface do?
Signup and view all the answers
What is a Library Function Call?
What is a Library Function Call?
Signup and view all the answers
Linux can run on a processor without a Memory Management Unit.
Linux can run on a processor without a Memory Management Unit.
Signup and view all the answers
Linux is the ___ of the OS.
Linux is the ___ of the OS.
Signup and view all the answers
UNIX features what two rings of protection?
UNIX features what two rings of protection?
Signup and view all the answers
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?
Signup and view all the answers
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?
Signup and view all the answers
Code running in user mode relies on ___ to access hardware.
Code running in user mode relies on ___ to access hardware.
Signup and view all the answers
Crashes in user mode are nearly always ___ .
Crashes in user mode are nearly always ___ .
Signup and view all the answers
In kernel mode, the executing code has ___ and ___ access to the hardware.
In kernel mode, the executing code has ___ and ___ access to the hardware.
Signup and view all the answers
Kernel crashes are ___ and will ___ the entire PC.
Kernel crashes are ___ and will ___ the entire PC.
Signup and view all the answers
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 ___.
Signup and view all the answers
Access to kernel routines is only possible through the ___ ___ ___.
Access to kernel routines is only possible through the ___ ___ ___.
Signup and view all the answers
What is Multithreading?
What is Multithreading?
Signup and view all the answers
Linux does not distinguish between ___ and ___.
Linux does not distinguish between ___ and ___.
Signup and view all the answers
What are user threads mapped into?
What are user threads mapped into?
Signup and view all the answers
Each shell has its own specific set of ___ and choice of ___.
Each shell has its own specific set of ___ and choice of ___.
Signup and view all the answers
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.
Signup and view all the answers
What is the primary function of Kernel Mode?
What is the primary function of Kernel Mode?
Signup and view all the answers
What is a Trap?
What is a Trap?
Signup and view all the answers
Describe the 5 steps in the System Call Flow.
Describe the 5 steps in the System Call Flow.
Signup and view all the answers
What is Process Management?
What is Process Management?
Signup and view all the answers
Process management uses a ___ to share CPU time.
Process management uses a ___ to share CPU time.
Signup and view all the answers
What is Memory Management?
What is Memory Management?
Signup and view all the answers
What is Swapping?
What is Swapping?
Signup and view all the answers
What is the Virtual File System (VFS)?
What is the Virtual File System (VFS)?
Signup and view all the answers
What is the Network Stack?
What is the Network Stack?
Signup and view all the answers
Describe the 3 steps of the network stack data flow.
Describe the 3 steps of the network stack data flow.
Signup and view all the answers
What are Board Support Packages (BSPs)?
What are Board Support Packages (BSPs)?
Signup and view all the answers
What is the GNU C Library?
What is the GNU C Library?
Signup and view all the answers
What are the steps of the Linux System Boot Process?
What are the steps of the Linux System Boot Process?
Signup and view all the answers
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?
Signup and view all the answers
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?
Signup and view all the answers
What is GRUB?
What is GRUB?
Signup and view all the answers
What is initrd?
What is initrd?
Signup and view all the answers
What is insmod?
What is insmod?
Signup and view all the answers
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?
Signup and view all the answers
What is the path of the GRUB configuration file?
What is the path of the GRUB configuration file?
Signup and view all the answers
During the Kernel phase, what does the kernel execute?
During the Kernel phase, what does the kernel execute?
Signup and view all the answers
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?
Signup and view all the answers
What is the /sbin/init Daemon?
What is the /sbin/init Daemon?
Signup and view all the answers
What is a Run Level?
What is a Run Level?
Signup and view all the answers
What is the default run level in Linux?
What is the default run level in Linux?
Signup and view all the answers
What is the default run level in Solaris?
What is the default run level in Solaris?
Signup and view all the answers
In Linux, what does init search for in the inittab file?
In Linux, what does init search for in the inittab file?
Signup and view all the answers
What does the 0 Run Level in Linux signify?
What does the 0 Run Level in Linux signify?
Signup and view all the answers
What does the 1 Run Level represent in Linux?
What does the 1 Run Level represent in Linux?
Signup and view all the answers
What does the 2 Run Level indicate in Linux?
What does the 2 Run Level indicate in Linux?
Signup and view all the answers
What is the 3 Run Level in Linux?
What is the 3 Run Level in Linux?
Signup and view all the answers
What does the 4 Run Level in Linux represent?
What does the 4 Run Level in Linux represent?
Signup and view all the answers
What does the 5 Run Level signify?
What does the 5 Run Level signify?
Signup and view all the answers
What does the 6 Run Level indicate?
What does the 6 Run Level indicate?
Signup and view all the answers
What file describes default run levels?
What file describes default run levels?
Signup and view all the answers
A directory for each run level is located in _______ directory.
A directory for each run level is located in _______ directory.
Signup and view all the answers
What is the init command used for?
What is the init command used for?
Signup and view all the answers
What does the who -r command do?
What does the who -r command do?
Signup and view all the answers
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?
Signup and view all the answers
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?
Signup and view all the answers
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?
Signup and view all the answers
In Linux, the ______ monitors the tty for a user login request.
In Linux, the ______ monitors the tty for a user login request.
Signup and view all the answers
In Solaris, what monitors the tty for user login requests?
In Solaris, what monitors the tty for user login requests?
Signup and view all the answers
How many fields are there in the inittab file?
How many fields are there in the inittab file?
Signup and view all the answers
Field 1 in inittab is an ID which is a _______.
Field 1 in inittab is an ID which is a _______.
Signup and view all the answers
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?
Signup and view all the answers
What does Field 3 in inittab describe?
What does Field 3 in inittab describe?
Signup and view all the answers
What are the 6 sub-fields in the Action Field of inittab?
What are the 6 sub-fields in the Action Field of inittab?
Signup and view all the answers
What does the sysinit sub-field in Field 4 do?
What does the sysinit sub-field in Field 4 do?
Signup and view all the answers
What does the respawn sub-field in inittab ensure?
What does the respawn sub-field in inittab ensure?
Signup and view all the answers
What does the boot sub-field in inittab do?
What does the boot sub-field in inittab do?
Signup and view all the answers
What does the off sub-field do?
What does the off sub-field do?
Signup and view all the answers
What does the wait sub-field represent?
What does the wait sub-field represent?
Signup and view all the answers
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?
Signup and view all the answers
What directory contains master copies of all rc scripts?
What directory contains master copies of all rc scripts?
Signup and view all the answers
What does a script that begins with a 'K' do?
What does a script that begins with a 'K' do?
Signup and view all the answers
What does a script that begins with an 'S' do?
What does a script that begins with an 'S' do?
Signup and view all the answers
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?
Signup and view all the answers
What is the chkconfig command used for?
What is the chkconfig command used for?
Signup and view all the answers
Updates made with chkconfig take effect immediately.
Updates made with chkconfig take effect immediately.
Signup and view all the answers
What does chkconfig --list do?
What does chkconfig --list do?
Signup and view all the answers
What does the command chkconfig sshd off do?
What does the command chkconfig sshd off do?
Signup and view all the answers
What is the service command used for?
What is the service command used for?
Signup and view all the answers
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.
Signup and view all the answers
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.
Signup and view all the answers
What is the strace command used for in Linux?
What is the strace command used for in Linux?
Signup and view all the answers
What is the truss command used for in Solaris?
What is the truss command used for in Solaris?
Signup and view all the answers
What are the options for the Linux strace command?
What are the options for the Linux strace command?
Signup and view all the answers
What are the options for the Solaris truss command?
What are the options for the Solaris truss command?
Signup and view all the answers
List the System Calls for Low-Level File I/O.
List the System Calls for Low-Level File I/O.
Signup and view all the answers
List the System Calls for Process Control.
List the System Calls for Process Control.
Signup and view all the answers
List the Common System Calls.
List the Common System Calls.
Signup and view all the answers
Child processes that have not been 'wait()ed' for are called ___ processes.
Child processes that have not been 'wait()ed' for are called ___ processes.
Signup and view all the answers
The ___ process is in charge of clearing a process table.
The ___ process is in charge of clearing a process table.
Signup and view all the answers
If the parent does not clear the table, ___ takes over.
If the parent does not clear the table, ___ takes over.
Signup and view all the answers
What are Loadable Kernel Modules (LKM)?
What are Loadable Kernel Modules (LKM)?
Signup and view all the answers
What does the lsmod command do?
What does the lsmod command do?
Signup and view all the answers
Where are tunable kernel module parameters located?
Where are tunable kernel module parameters located?
Signup and view all the answers
What does the sysctl command provide?
What does the sysctl command provide?
Signup and view all the answers
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!