Looks like no one added any tags here yet for you.
What is a directory?
A directory is a file system structure that contains references to other files and directories.
What is a thread?
A thread is the smallest unit of processing that can be scheduled by an operating system.
What information is stored in /etc/passwd?
The /etc/passwd file stores user account information including username, password, user ID, group ID, and home directory.
What are the permission bits of a file?
Permission bits of a file determine the access rights for the owner, group, and others, including read, write, and execute permissions.
What is a child process?
A child process is a process created by another process (the parent) during execution.
What is a kernel?
The kernel is the core component of an operating system that manages system resources and communication between hardware and software.
Name three types of files in Unix.
Regular files, directories, and special files (such as device files).
What is a shell?
A shell is a command-line interface that allows users to interact with the operating system.
What is an i-node?
An i-node is a data structure on a filesystem that stores information about a file or directory, including its size, ownership, and location on disk.
What is a process?
A process is an instance of a program in execution, which includes the program code and its current activity.
What is a umask?
A umask is a default file permission setting that determines the permissions assigned to newly created files and directories.
What are some ways an open call can fail?
An open call can fail due to reasons such as the file not existing, insufficient permissions, or reaching the maximum number of open files.
What does read return when at the end of a file?
When read reaches the end of a file, it returns 0 bytes, indicating that there is no more data to read.
What is a hole?
A hole in a file is a region that has not been allocated any data, resulting in a sparse file.
What are the three ways lseek can use to adjust the file offset?
lseek can adjust the file offset using SEEK_SET, SEEK_CUR, and SEEK_END.
What are the benefits of providing system calls in Unix?
System calls provide a controlled interface for user programs to request services from the kernel.
How do most system calls behave during a failure?
Most system calls return -1 and set the errno variable to indicate the error.
What are some appropriate error handling mechanisms?
Appropriate error handling mechanisms include checking return values, using errno, and implementing retries.
What is the difference between a file descriptor and an open file description?
A file descriptor is a unique identifier for an open file, while an open file description contains the actual file state and attributes.
What are the mandatory flags for opening a file?
Mandatory flags include O_RDONLY, O_WRONLY, and O_RDWR.
What is synchronous IO?
Synchronous IO is a type of input/output operation where the execution of the program is blocked until the operation completes.
What is synchronized IO?
Synchronized IO refers to operations that ensure data is fully transferred or processed before the program continues.
What information does ls with the long option provide?
The ls -l command provides detailed information about files, including permissions, number of links, owner, group, size, and modification date.
What can be found in the /var/log directory?
The /var/log directory contains log files generated by the system and applications.
What type of entries can be found in section 5 of the man pages?
Section 5 of the man pages contains file formats and conventions.
What unix command is used to modify file permissions?
The chmod command is used to modify file permissions.
What is the difference between du and df?
du reports the disk usage of files and directories, while df reports the available disk space on filesystems.
What is in /etc/issue?
The /etc/issue file contains a message or system identification to be printed before the login prompt.
What is the path variable used for in Unix?
The path variable specifies the directories in which the shell looks for executable files.
What Unix program can tell you how to use the cp command?
The man command can be used to access the manual pages for the cp command.
What is in /etc/fstab?
The /etc/fstab file contains information about filesystems and their mount points.
What unix command will search a file system for files?
The find command is used to search a file system for files.
What is double buffering?
Double buffering in terms of reading refers to using two buffers to manage data input: one buffer is actively used for reading data, while the other buffer is being filled in the background. Once the active buffer is full, it is processed, and the second buffer becomes the active one, ensuring continuous reading without delays or interruptions.
What happens when unlink deletes a file?
When unlink deletes a file, it removes the directory entry and decreases the link count; if the count reaches zero, the file is deleted from the filesystem.
What type of entries can be found in section 2 of the man pages?
Section 2 of the man pages contains system calls.
What is a unit test?
A unit test is a type of software testing that focuses on verifying the functionality of a specific section of code.
What is an integration test?
An integration test checks the interaction between different components or systems to ensure they work together correctly.
What does make do?
The make command automates the process of building and managing dependencies in software projects.
What program will check for style compliance?
The lint program checks for style compliance in code.
What is an implicit rule in make?
An implicit rule in make is a predefined rule that specifies how to build a target from its source files.
What is in /dev/zero?
/dev/zero is a special file that provides as many null bytes (zeroes) as are read from it.
What modes can raw file system data can be accessed?
Raw file system data can be accessed in character mode and block mode.
What is in /etc/sudoers?
The /etc/sudoers file contains configuration settings that define which users or groups have permission to execute commands with elevated privileges using sudo.
What type of entries can be found in section 4 of the man pages?
Section 4 of the man pages contains special files and drivers.
What functionality does the mount command provide?
The mount command attaches a filesystem to a specified mount point in the directory tree.
What is the difference between a hard link and a symbolic link?
A hard link points directly to the inode of a file, while a symbolic link is a reference to another file by its pathname.
Why must maximum path length be dynamically calculated?
Maximum path length must be dynamically calculated to accommodate varying filesystem structures and configurations.
What are some information stored in an i-node?
An i-node stores information such as file type, permissions, ownership, size, and pointers to data blocks.
How do you process a directory?
To process a directory, you typically open it, read its entries, and perform actions based on those entries.
What type of entries can be found in section 6 of the man pages?
Section 6 of the man pages contains games and demonstrations.
What is a tech lead?
A tech lead is a senior engineer responsible for guiding the technical direction of a project and mentoring team members.
What is a project manager?
A project manager is responsible for planning, executing, and closing projects, ensuring they meet deadlines and budgets.
What is a stand up meeting?
A stand up meeting is a brief daily meeting where team members share updates on their work and any obstacles they face.
What is a sprint?
A sprint is a set period during which specific work has to be completed and made ready for review in Agile project management.
What does sed do?
sed is a stream editor used to perform basic text transformations on an input stream.
What is a superblock?
A superblock is a data structure that contains information about a filesystem, such as its size, status, and location of the i-node table.
What does mount do?
The mount command attaches a filesystem to the directory tree, making it accessible to the system.
What command will report i-node usage?
The df -i command reports i-node usage on filesystems.
What is i-node 2 reserved for?
i-node 2 is typically reserved for the root directory in a filesystem.
What is in /dev/random?
/dev/random is a special file that provides random bytes generated from environmental noise.
What is a group?
A group is a collection of users that can be assigned permissions collectively.
How do you change the owner of a file?
You can change the owner of a file using the chown command.
How do you test if you can use a file?
The access() system call checks a process's permissions for a specified file.
What does the last command do?
The last command displays a list of the most recent user logins.
What are the two areas we can get dynamic memory from?
Dynamic memory can be allocated from the heap or the stack.
What Unix command will tell us how memory is currently used?
The free command provides information about memory usage.
What is the program break?
The program break is the end of the process's data segment, indicating the limit of dynamically allocated memory.
What is a memory block used by malloc?
A memory block used by malloc is a contiguous section of memory allocated for use by the program.
What is coalescing?
Coalescing is the process of merging adjacent free memory blocks to create larger contiguous blocks.
What does calloc do?
calloc allocates memory for an array of elements and initializes all bytes to zero.
What does realloc do?
realloc changes the size of previously allocated memory, preserving the contents.
What does alloca do?
alloca allocates memory on the stack that is automatically freed when the function returns.
How does the malloc strategy first fit work?
The first fit strategy allocates the first block of memory that is large enough to satisfy the request.
What type of entries can be found in section 1 of the man pages?
Section 1 of the man pages contains user commands.
What are the four ways to terminate a process?
A process can be terminated by exit, abort, kill, or returning from main.
What happens when a process exits via system call?
When a process exits via a system call, it performs cleanup and releases resources before terminating.
What happens when a process's main returns?
When a process's main returns, the process terminates, the return value is passed as the exit status to the operating system, and the operating system cleans up allocated resources.
What does atexit do?
atexit registers functions to be called on normal program termination.
What command allows you to change the scheduling priority of a program or process?
The nice command allows you to change the scheduling priority.
What command will tell you the path of a command?
The which command will tell you the path of a command.
How do you create a new Unix process?
You create a new Unix process using the fork system call.
What states can a process be in?
A process can be in states such as running, runnable, sleeping, stopped, or zombie.
How does a parent process find out about its child?
A parent process can find out about its child through wait system calls or after a fork(), which will return the child process's ID to the parent.
How do you load a program?
A program is loaded into memory using the exec family of functions. The OS reads the executable file from storage, allocates memory for the program's code and data, and then transfers control to the program's entry point.
What information is provided to a running program?
A running program is provided with its command-line arguments and environment variables.
What command is used to see the current environment?
The env command is used to see the current environment.
How is the environment stored?
The environment is stored as an array of strings, each representing a key-value pair.
What are the variants to exec?
Variants to exec include execv, execvp, execve, and execl.
How do you access environment values in the shell?
Environment values in the shell can be accessed using the syntax $VARIABLE_NAME.
What is a signal?
A signal is a limited form of inter-process communication used to notify a process that a specific event has occurred.
What are the two signal handler macros?
The two signal handler macros are SIG_DFL and SIG_IGN. SIG_DFL is the default action for the signal and SIG_IGN ignores the signal.
How do you send a signal from the command line?
You can send a signal from the command line using the kill command.
What signal does ctrl-c generate?
Ctrl-C generates the SIGINT signal. By default, this signal causes the process to terminate, but the process can handle it by setting up a custom signal handler using the signal() system call, allowing it to perform specific actions before terminating or even ignore the signal.
What is a signal mask?
A signal mask is a set of signals that are blocked from being delivered to a process.