1/93
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What does xargs do?
xargs is a command that builds and executes command lines from standard input.
How can you get thread information from ps?
You can get thread information from ps by using the 'ps -L' option.
What does lsof do?
lsof lists open files and the processes that opened them.
What is a condition variable?
A condition variable is a synchronization primitive that allows threads to wait until a particular condition is met.
What is a semaphore?
A semaphore is a synchronization tool that controls access to a common resource by multiple threads.
What is a thread?
A thread is the smallest unit of processing that can be scheduled by an operating system.
What are three types of thread management operations?
What are the benefits of using threads?
Benefits include improved responsiveness, resource sharing, and efficient CPU utilization.
What are some challenges of using threads?
Challenges include deadlocks, race conditions, and debugging complexity.
How do signals interact with threads?
Signals can be sent to specific threads or the entire process, affecting their execution.
What is thread joining?
Thread joining is the operation of waiting for a thread to finish its execution before proceeding.
What are two ways of getting a deadlock error from thread join?
What is thread synchronization?
Thread synchronization is the coordination of thread execution to prevent conflicts when accessing shared resources.
What are three ways to manage thread synchronization?
What is a mutex and why would you use it?
A mutex is a mutual exclusion object used to prevent simultaneous access to a resource by multiple threads.
What will read do on an empty pipe?
The read operation will block until data is available or the pipe is closed.
What happens when a pipe is closed?
When a pipe is closed, any read operation on that pipe will return an end-of-file (EOF) immediately.
What is the effect of lseek on a pipe?
lseek does not work on pipes, as they are not seekable.
How does the -v option affect the behavior of grep?
The -v option makes grep invert the match, showing lines that do not match the pattern.
What does mkfifo do?
mkfifo creates a named pipe (FIFO) that can be used for inter-process communication.
What is FIFO?
FIFO (First In, First Out) is a method of organizing and handling data in which the first data added is the first one to be removed.
What is a pipe?
A pipe is a unidirectional data channel used for inter-process communication.
What does ps do?
ps displays information about running processes, including their process IDs and resource usage.
What does wc do?
wc (word count) counts the number of lines, words, and bytes in its input.
What does dup do?
dup duplicates a file descriptor, creating a new file descriptor that refers to the same open file.
What does the head command do?
head outputs the first few lines of a file; by default, it shows the first ten lines.
What does the top command do?
top displays a dynamic view of the system's resource usage, including CPU and memory utilization by processes.
What does the w command do?
w shows who is logged on and what they are doing.
What does crontab do?
crontab is used to schedule commands to be run at specified times and intervals.
What does the tar command do?
tar is used to create, extract, or manipulate archive files.
What is shared memory?
Shared memory is a method of inter-process communication that allows multiple processes to access the same memory segment.
What are the two functions that are used together to access shared memory?
What are the two operations on a semaphore?
What does the wall command do?
wall sends a message to all logged-in users.
What is a background process?
A background process runs independently of the user's terminal session, allowing the terminal to be used for other tasks.
How do you start a background process?
You can start a background process by appending '&' at the end of the command.
What does the fg command do?
fg brings a background process to the foreground.
What is a job spec?
A job spec is a way to refer to a background or suspended job in the shell using a job number.
What does the jobs command do?
jobs lists the current active jobs associated with the terminal.
What is a message queue?
A message queue is a form of inter-process communication that allows processes to send and receive messages.
What operations are performed on message queues?
Where are message queues stored?
Message queues are stored in kernel memory.
What order are messages received in a message queue?
Messages are received in FIFO order.
Where are the default message queue attributes available?
Default message queue attributes are available in the system's kernel.
What is the dominant network model for the internet?
The dominant network model for the internet is the TCP/IP model.
What are the TCP/IP layers?
The layers are:
What is the application layer?
The application layer is the topmost layer of the TCP/IP model that directly communicates with end-user applications.
What is the transport layer?
The transport layer is responsible for providing communication services directly to the application layer and is responsible for end-to-end communication.
What is TCP?
TCP (Transmission Control Protocol) is a connection-oriented protocol that ensures reliable data transmission.
What is a named semaphore?
A named semaphore is a synchronization primitive that is identified by a name and can be used by multiple processes.
What is an unnamed semaphore?
An unnamed semaphore is a synchronization primitive that is not identified by a name and is typically used within the same process.
What are the numbered directories in /proc?
The numbered directories in /proc represent the process IDs of currently running processes.
What is in /usr?
The /usr directory contains user-related programs, libraries, and documentation.
What does the m4 command do?
m4 is a macro processing language that is often used for generating text files.
What is a passive socket?
A passive socket is used by a server to listen for incoming connections.
What are the steps a server must go through?
What are the steps a client must go through?
What does the netstat command do?
netstat displays network connections, routing tables, interface statistics, and a list of open ports.
What does the ss command do?
ss is a utility to investigate sockets, providing detailed information about them.
What are three application layer protocols?
What is UDP?
UDP (User Datagram Protocol) is a connectionless protocol that allows data transmission without establishing a connection.
What is IP?
IP (Internet Protocol) is a protocol that routes packets of data from the source to the destination across networks.
What is the link layer?
The link layer is responsible for node-to-node data transfer and is concerned with the physical addressing and access to the medium.
What is a MAC address?
A MAC address is a unique identifier assigned to network interfaces for communication on a physical network.
What is a socket?
A socket is an endpoint for sending or receiving data across a computer network.
What is a port number?
A port number is a numerical identifier in networking used to distinguish different services on a server.
What is a stream socket?
A stream socket is a type of socket that provides a reliable, two-way communication channel.
What is a datagram socket?
A datagram socket is used for sending and receiving messages without establishing a connection.
What functions are used to write to a socket?
The functions used to write to a socket include send() and write().
What is a directory?
A directory is a special file in a filesystem that contains references to other files or directories.
What information is stored in /etc/passwd?
The /etc/passwd file contains user account information, including user names, user IDs, and home directories.
What are the permission bits of a file?
The permission bits of a file determine the access rights for the owner, group, and others.
What is a child process?
A child process is a process created by another process (the parent) through a system call.
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.
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 a directory, except its name.
What is a process?
A process is an instance of a program that is being executed.
What is a umask?
A umask is a mask that determines the default permission bits for newly created files.
What are some ways an open call can fail?
What does read return when at the end of a file?
read returns 0 when it reaches the end of a file.
What is a hole?
A hole in a file is a sequence of unallocated bytes in a sparse file.
What are the three ways lseek can use to adjust the file offset?
What are the benefits of providing system calls in Unix?
Benefits include abstraction of hardware, safe and consistent access to resources, and control of system behavior.
How do most system calls behave during a failure?
Most system calls return -1 on failure and set the errno variable to indicate the error.
What are some appropriate error handling mechanisms?
What is the difference between a file descriptor and an open file description?
A file descriptor is an integer handle; an open file description includes the file position and access mode information.
What are the mandatory flags for opening a file?
The mandatory flags include ORDONLY, OWRONLY, and O_RDWR.
What is synchronous IO?
Synchronous IO is a type of input/output operation where the calling process waits for the operation to complete before continuing.
What is synchronized IO?
Synchronized IO refers to managing access to shared resources to prevent data corruption.
What information does ls with the long option provide?
ls -l provides details such as file permissions, number of links, owner, group, file size, and time of last modification.
What can be found in the /var/log directory?
/var/log contains log files for various system services and applications.
What type of entries can be found in section 5 of the man pages?
Section 5 contains documentation for file formats and conventions.
What Unix command is used to modify file permissions?
The chmod command is used to modify file permissions.