Flashcards in Exam_2 Deck (194):
What is address space?
Contains the memory address space for processes to use and contains the kernal data structure, code, libraries, variables and stacks.
What is PID?
Process ID; Unique identifier for each process.
What is PPID?
Parent Process ID; The identifier of a process that started another process.
What is UID?
The user ID of the user that created the process.
What is EUID?
Effective User ID; The UID that is used to check permissions. It is normally the same as the UID however different when the setuid property of a file is configured, then it is the UID of the owner of the file.
What is GID and EGID?
The group and effective group ID's. Functions fimilar to ID and EUID but for groups.
What is meant by the term Niceness?
The processes scheduling priority.
What is a Control Terminal?
Defines standard in, out and error for process and for non-daemon processes.
What is meant by the term Creation?
That each process must be created from an existing process.
What is the purpose of the fork system call?
It is used to create a new process. The process is a copy of the starting process.
What occurs after the fork system calls a new process?
The new process will change the program running and rest memory allocation to a default state.
At boot time what is the first process started and what is the PID?
Init with a PID of 1. Init controls the execution of the startup scripts.
When a process ends it sends an exit code to the parent process. What does a code of 0 indicate? A code of any other number?
0 indicates that the process completed successfully. Any other number indicates the process did not complete successfully.
What must occur before a process can die?
The parent process much acknowledge its demise.
If the parent process dies before the child process, what is the child process referred as?
When an orphaned process dies where is the result process sent to?
What are signals?
Process level inputs.
What is an interrupt?
A mechanism where one process/device can set a flag telling another process that it needs attention.
True/False: Interrupts are used though out computer design both at the hardware level and at the software level.
What command is used to get a list of signal for your OS?
For what purposes are signals sent?
A means of communication.
To kill, interrupt or suspend a process.
By an admin using the kill command.
By the kernal when a hardware error occurs.
By the kernal to notify a process of interest when a child process dies.
For a process to receive a signal it must have a
Signal handler program.
What is a signal handler?
A subroutine designed in the program that gets executed when a signal is received.
If a program does not have a signal handler registered what action is taken?
The kernal will take a default action.
What occurs when a signal is blocked?
It is queued for later processing.
True/False: Signals cannot be ignored.
False, they will be ignored if not queued.
Are signals able to terminate a process?
True/False: Some signals can cause a core dump.
List the action: KILL 9
Terminates the process and cannot be ignored.
List the action: STOP 19
List the action: TSTP 20
Request to stop a process.
List the action: CONT 18
Resume a stopped process.
List the action: INT 2
Request to KILL, if not implemented the kernal sends KILL. Process will clean up then KILL.
List the action: TERM 15
Cleanup and terminate.
List the action: HUP 1
List the action: QUIT 3
Similar to TERM but causes a core dump.
What is the action of the following command: kill 100
Sends TERM to process with PID of 100 but does not guarantee a process will end.
What is the action of the following command: kill -9 100
Guarantees process with PID 100 will die.
What is the action of the following command: kill -KILL 100
Guarantees process with PID will die.
What is the action of the following killall command: -z
What is the action of the following killall command: -e
What is the action of the following killall command: -g
What is the action of the following killall command: -i
What is the action of the following killall command: -o
What is the action of the following killall command: -q
What is the action of the following killall command: -r
What is the action of the following killall command: -s
What is the action of the following killall command: -u
What is the action of the following killall command: -v
What is the action of the following killall command: -w
What is the action of the following killall command: -y
What is the action of the following killall command: -I
What is the action of the following killall command: -V
What is the action of the following killall command: --
Define the process state: Runnable
Process is running or can be run.
Define the process state: Sleeping
Process is waiting for a resource or an event.
Define the process state: Zombie
Process is dead but has not yet been removed from the process table (no longer used).
Define the process state: Stopped
Process is paused (STOP signal)
What does the ps command list?
The processes that are running and shows the PID, terminal, time and process name.
What is the effect of ps a
Shows all processes
What is the effect of ps l
Shows the long version and includes more technical information like niceness.
What is the effect of ps x
Shows processes that were not started by a terminal.
What is the effect of ps u
Shows more detail about the process.
What is the effect of ps f
Full listing including command arguments.
What is the effect of ps au
Shows all processes in detail that were started from and interactive session.
What is the effect of ps aux
Shows all processes in detail.
What is the effect of ps aux|grep ^root
Shows all processes that are owned by root.
True/False: All processes take turns using the CPU.
How does the CPU schedule the order in which processes run?
With a numeric scheduling priority.
What does a processes "niceness" refer to?
How flexible the process is will to be in scheduling its operation.
What numbers does Linux use to indicate "niceness"
-20 to 19. -20 is the least flexible where 19 is the most flexible.
What does the command renice perform?
Changes a process's niceness number using PID, user or group of the process.
What does the top command perform?
Tracks real-time process usage and continually updates the process list by most active process.
What is a background process?
A process that after the shell starts the process, the shell is immediately available for another command.
Processes that run in the background are referred to as?
When a background process is started what will it respond with?
The background job number and the process ID.
When a background job is complete will it return a message to the terminal?
Regarding jobs, what does the fg command perform?
Brings a job to the foreground.
Regarding jobs, what does the bg command perform?
Sends the current process to the background after it is stopped.
Regarding jobs, what does the + next to the job number indicate?
Denotes the current job.
Regarding jobs, what does the - next to the job number indicate?
Denotes the previous job.
What happens to jobs when you disconnect from the terminal session?
They will terminate.
What command is used when you want a job to run after you close the terminal session?
What is the pseudo directory that is maintained by the kernal?
What information is contained in /proc?
Information about processes and system state.
True/False: /proc contains write only files.
Files in /proc that are not readable with CAT or MORE contain what?
What creates files in /proc on the fly that do not exist until accessed?
What does stack trace (strace) show?
Signals, system calls, return values, etc.
When accessing resources, a process's _______ ID is used to check security.
What character do you add to the end of a command to run the command in the background?
What command will show CUP information?
What command will show the memory configuration?
What is in the *nix filesystem?
Files, Processes, Audio devices, Kernal data structures, Inter-process communication channels.
What is a namespace?
Naming and organizing model.
What is an API?
A set of system call to navigate and manipulate filesystem objects.
What is a security model?
A model to protect, hide and share filesystem objects.
What is an implementation?
The software components to make it all work together.
What is the root of a file system?
Nodes in the filesystem are seperated with what?
Filenames may contain most characters but cannot contain what characters?
/ or the null character.
True/False: Filenames are not case-sensitive.
What is an absolute path?
A path that always starts at the filesystem root.
What is a relative path?
A path from the current location.
What is the mount command used for?
To connect a device to the filesystem tree.
What is the command to unmount a device?
In which filesystem are all devices shown?
What command shows all available devices?
What is /dev/sda
A physical disk.
What is /dev/sda1
The first partition on disk sda.
What does /mnt represent?
The mounting location of a device.
Give an example of a mount command.
sudo mount /dev/sdb1 /mnt/usbdisk
Give an example of an unmount command.
sudo umount /mnt/usbdrive
True/False: You can use the -f argument with umount to force a system unmount of a device.
True, but you may incur data loss.
What command will allow you to see who is using a file that might be in use and preventing the unmount of a device?
Give an example of the fuser command.
fuser -c /mnt/usbdisk
What file is used to configure the devices that will mount during the boot process?
Define the contents of the filesystem: /
The root of the directory tree.
Define the contents of the filesystem: /bin
Command binaries necessary for single user mode.
Define the contents of the filesystem: /boot
Kernal and file needed to boot kernal.
Define the contents of the filesystem: /dev
List of devices available to the operating system.
Define the contents of the filesystem: /etc
configurations files for the system.
Define the contents of the filesystem: /home
Users home folder.
Define the contents of the filesystem: /lib & /lib64
Define the contents of the filesystem: /mnt /media
Common mounting locations.
Define the contents of the filesystem: /proc
virtual filesystem containing information about kernals and processes.
Define the contents of the filesystem: /root
Root's home directory.
Define the contents of the filesystem: /sbin
Stratically compiled binaries - utilities not dependent on other libraries.
Define the contents of the filesystem: /tmp
Application temporary files.
Define the contents of the filesystem: /usr
Several subdirectories contatin user commands, documentation, and other system information that does not change.
Define the contents of the filesystem: /var
Log files and other files that change while the system is running.
What does the commands setuid and setguid perform for executables?
It allows the file to be run with the permission of the owner/group rather than the person who executed the program.
What does the commands setuid and setguid perform for directories?
it allows newly created files in the directory to take on the group of the parent directory rather than the creator's default group.
What is setuid or setguid set with (command)?
What are access control lists?
They provide a mechanism to apply permission to more than the standard Unix entities: user, group, others on a file.
What command is used to modify a files ACL?
POSIX permissions are applied in what sequence?
If the EUID of the process is the file's UID then the permissions for user:: are used.
If the EUID of the process has a specific user entry in the ACL that permission is used.
If there is no user specific entry then the users' groups are matched to group entries to find a matching group.
If no user or group entry is found the other:: entry is used.
POSIX access control lists add additional permission beyond the standard read, write, and execute.
When using special characters in a filename such as the space or the pipe you much use the "escape" character before the special character. What is the "escape" character.
Which file is used to define the filesystems mounted at boot time?
True/False: All file systems must be mounted to the /mnt directory.
What are two types of user accounts?
Local and Identity Management
What are three commands used to create user accounts?
useradd, adduser, newusers
Describe the command useradd.
Standard Unix tool to add users.
Describe the command adduser.
A script or symbolic link. In Debian a perl script is used to ask for user parameters.
Describe the command newuser.
Linux tool to add users in bulk.
What are two command used to delete users.
userdel and deluser
Describe the command userdel.
Standard Unix tool to delete users.
Describe the command deluser.
Script of symbolic link to delete a user.
Where are user accounts stored?
What are attributes of login names?
They must be unique.
Allowable characters: a-z, 0-9, upper/lowercase letters.
How many characters does Linux allow for usernames?
Where are encrypted passwords stored?
Encrypted passwords are based on what algorithms?
SHA, MD5, Blowfish
What is UID used for?
To set permissions and keep track of processes.
The root UID is always
What are UID 0-99 used for?
System accounts allocated by the Debian project.
What are UID 100-999 used for?
System accounts not allocated by the Debian project.
What are UID 1000-29999 used for?
Normal user accounts.
What are UID 65534 used for?
Is user nobody, an account with no rights or permissions.
Where are groups stored?
Groups are identified by which ID?
GID and used mostly for file permissions.
What is GECOS?
Contains personal information like name and phone number.
What command allows you to change GECOS?
If the home directory is not mounted where is the user placed?
What command allows the user to change their default shell?
Where are user shells stored?
What is best practice when creating personal groups?
A group for each user is assigned as the users primary group.
Where is group information stored?
What are the steps for adding users?
User signs usage policy.
Edit passwd and shadow files.
Add user to personal group and other appropriate groups.
Set the initial password.
Create chown and chmod the user's home directory.
Copy default startup files from /etc/skel
What commands allow you to directly edit the passwd and shadow file?
What command is used to change passwords?
-l and -u will lock/unlock the account
-s displays the account status
True/False: If a users home directory does not exist the user will be able to login.
What command creates the users home directory?
Where are user startup scripts located?
What command lists the users id?
What user ID will be given to the first normal user created in Debian linux?
True/False: A new user's User ID and the user's primary Group ID must be the same.
True/False: Non root users can change their own login shell.
What type of disk uses constant angular velocity?
What type of disk uses constant linear velocity?
Disk Terminology: Define platter
Disk Terminology: Define track
Circle of data around a disk
Disk Terminology: Define sector
A chunk of a track, smallest unit of data that can be read or written.
Disk Terminology: Define cluster
A group of sectors logically collected together for read and write operations.
Disk Terminology: Define head
Device that reads or writes data.
Disk Terminology: Define seek time
Average time it takes to move the head to a new track.
Disk Terminology: Define delay
Average time it takes to find a sector on a track.
What must each storage media be attached to?
Serial ATA which is an improved standard to bring higher bandwidth to ATA devices.
What are the different types of SATA?
SATA, SATA2, SATA3, SATA 3.2
Small computer systems interconnect and uses a parallel bus.
What are two common techniques available for combining physical disks?
RAID (Redundant Array of independent Disks) and JBOB