Mod 8 day 1-3 Flashcards

1
Q

What is a Symbolic Link?

A

A symbolic link is a file containing the pathname to another file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Hard Link?

A

A Hard Link is a pointer to a files Inode and is the same as the original file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Directory Entry?

A

a Directory Entry is a simple data structure containing filename and Inode addresses where the files metadata can be found

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the Touch command allow us to do?

A

the Touch command creates an empty file and can also alter Timestamps.

  • m - modify
  • a - access
  • t - time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what does the Stat command allow us to do?

A

The stat command is used to view a file or file system status to include timestamps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the 3 timestamps EXT3 systems support?

A
  • Modification-Time files data layer was last modified
  • Acces- Time files data was last accessed
  • Change- Time files inode (metadata layer) was last changed/created
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an indirect pointer used for?

A

In your file system, if data takes up more than 12 blocks it uses a Single, Double, or Triple to alllow to go past 12 blocks of preallocated data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an Inode?

A
An Inode contains information proccesses need to access a file or metadata
Contains:
-file size
-file ownership
-file timestamp
-file type
-file access
-number of links
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a Data Block

A

A Block is a basic file allocation unit size for the EXT(x) file system and is used to store file contents

a Block is a group of consecutive sectors and can be 1024, 2048, or 4096 bytes in size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a Group Descriptor Table?

A

A Group Descriptor Table contains:

  • Starting block address of a Block Bitmap
  • Starting block address of the Inode Bitmap
  • Starting block address of the Inode table
  • number of unallocated blocks in the group
  • number of directories in the group
  • unused bytes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the file system that Linux uses?

A

Linux uses EXTx, a journaling filesystem. A journaling filesystem maintain a journal used to repair inconsistencies that may occur after an improper shutdown

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a superblock?

A

A superblock is located 1024 bytes from the start of file system and is 1024 bytes in size & contains following information?

  • total number of Inodes
  • Total number of Blocks
  • Block Size
  • Number of Blocks per Group
  • Number of Inodes per Block Group
  • Number of reserved Blocks before the first Block Group
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a Bitmap?

A

A Bitmap informs whatever is looking at it, if something is allocated or unallocated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the command fdisk do?

A

fdisk allows you to view the disks physical partitioning scheme?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are common Virtual File Systems?

A
  • Swapfs - used for Swapping
  • Procfs - provides info for Processes
  • Tmpfs - temporary file storage in memory instead of Hard disk
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are common network based file systems?

A

networked file systems

server message block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are common Linux disk file systems?

A

EXT3, EXT4, or XFS disk file systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is a file system?

A

A File System defines the way files are stored, named, organized and accessed on a logical volume and give the OS a road map to access data on a type of file system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is a Kernel signal process-level interrupt?

A

A kernel signal is when a process commits an infraction such as division by zero

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is an Administrator Signal process-level Interrupt?

A

Administrator Interrupts use kill or pkill to get desired result

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is a Terminal Signal process - level interrupt?

A

CTRL + C & CTRL + D is to kill, interrupt or suspended processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is a process exception by trap?

A

A trap is software written to catch exceptions generated by the CPU. A trap is an error exception condition generated within the currently running process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the process Exception by interrupt?

A

an Interrupt is a signal generated by Hardware when it wants the processors attention. An interrupt is caused by an external event & is considered asynchronous.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are the 4 states of a process?

A

R- Running- Running or Runable
S- Sleeping- Waiting for resources or an event to occur
Z- Zombie- Dead Process whose process entry still exists
T- Stopped- suspended process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is the command to check the current states of a shell process?

A

ps -Helf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

How are processes created?

A

processes are created with fork(), whch creates exact copies of the original process, called a Child Process. The child may help the parent with the process. when a parent exits without waiting the child, it becomes a Zombie Process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is a background process?

A

A background process is a non-interactive, does not need user input and is not connected to a terminal. Refferred to as a daemon.

28
Q

What is a foreground Process?

A

A Foreground Process is interactive & started by a terminal window. Normally started by a user.

29
Q

What is the definition of a process? What are two types?

A

A process is a Program in execution.

Foreground and Background

30
Q

What is the purpose of the Ulimit Command

A

Ulimit sets or prints the limits on shared resources for that shell.

  • a -Displays limits imposed on resources
  • c -Displays or set core file size
  • u -Displays or sets max number of processes per user
31
Q

What does the Sysctl command allow the user to do?

A

The Sysctl command provides an interface that allows viewing and changing kernel parameters.

  • p - loads sysctl value from conf. files
  • a displayes all values currently available
  • w writes sysctl value for current session only
32
Q

What does the commmand lsmod allow us to do?

A

lsmod lists currently loaded/active modules by nicely formatting the contents of /proc/modules

33
Q

What is the purpose of LKMS?

A

The purpose of LKM (loadable kernel modules) add or remove code from the linux kernel during execution.

34
Q

What is the purpose of the command Strace?

A

Strace is used to debug programs when the source code is unavailable

  • c -count time, calls, and errors for each system call
  • e traces a system call event
  • o each process is written to the filename
35
Q

What are the system calls for protection?

A

umask- sets calling process creating mask to mask

chmod- changes a files mode/permission

36
Q

what are system calls for communication?

A

pipe - inter-process communication

mmap - creates new mapping in virtual address space

37
Q

what are system calls for information?

A

get PID - returns PID of process

uname - returns system information

38
Q

What are the system calls for process control?

A

fork - creates child process
wait - blocks calling process until child process exits
execve - executes program
exit - terminates process & performs cleanup
kill - sens a signal to a process to terminate it

39
Q

what are system calls for file or device management?

A
  • creat - creates & opens file
  • open - opens existing file
  • close - closes all file associated with terminating proc.
  • read - reads data from file
  • write - writes data to file
  • ioctl - input/output control of device specific operation
40
Q

what is the purpose of virtual file system(VFS)?

A

allows programs to use standard system calls to read and write to different file systems.

41
Q

what is the Board Support Package(BSP)?

A

the BSP is essential code that allows a computer hardware device to work with computer OS

42
Q

What is the purpose of Device Drivers?

A

a Device Driver is a low level program that allows the kernel to communicate with a specific piece of hardware.

43
Q

How do I change the Service status of a script?

A

With the Chkconfig, service command, or running script /etc/init.d

44
Q

What are the directories that have my run levels?

A
Run level 0 /etc/rc.d/rc0.d
Run level 1 /etc/rc.d/rc1.d
Run level 2 /etc/rc.d/rc2.d
Run level 3 /etc/rc.d/rc3.d
Run level 4 /etc/rc.d/rc4.d
Run level 5 /etc/rc.d/rc5.d
45
Q

what is the very first process to run on Centos6?

A

Initd is the first process to run on Centos6 with a PID of 1

46
Q

What is the very first process to run on Centos7?

A

Systemd is the very first process to run on Centos7 with a PID of 1

47
Q

Describe Memory Management in Linux

A

the Kernel manages memory normally in 4KB chunks, called pages, when pages are exhausted they are swapped, excessive swapping is called thrashing.

48
Q

What is the lightweight process?

A

a Lightweight process (LWP) is a process that runs in user mode that runs on top of a single kernel thread & shares its address space & system resources with other lightweight processes.

49
Q

Kernel Mode

A

The Kernel Runs in the most privileged ring

It is a privileged system area that resides between user mode & hardware platform.

50
Q

How does the SCI operate?

A

The SCI converts a process running in user mode to a protected kernel mode process.
To implement a system call, it must transfer control through an architecture-specific feature, such a trap or interrupt.

51
Q

What are the Key advantages of Linux?

A
  • Linux is Preemptive
  • Linux supports the ability to dynamically load & unload kernel
  • Linux does not differentiate between threads & processes
  • object oriented, plug & play, user space device file system
  • free
  • multi-user, multi-tasking, and protable.
52
Q

What is a shell?

A

A shell is an interpreter and with a specific set of functions.

53
Q

what are the purposes of API’s?

A

The purpose of APIs is to request the use of kernel services, or are referred to as a system call.

54
Q

what is an application?

A

Applications are just computer programs that can perform certain tasks.

55
Q

What is GNU C?

A

an Implementation of C:\ drive, library functions act as an interface for abstract system calls.

56
Q

What is a windows manager?

A

A Windows Manager defines how the GUI environment & how the user interacts with the system.

57
Q

What are the processes & threads?

A

The purpose of Processes & Threads is that they request kernel services.

58
Q

What are the user mode components?

A

The user mode components are process/threads, applications, a windows manager, libraries, and other components.

59
Q

What is user mode?

A

User applications execute in the least privlidged ring known as user mode.

60
Q

What is the purpose of SUID/GUID bits?

A

SUID/GUID bits allow anyone to run an executable with same privileges as the owner and/or group.

61
Q

What command allows you to change ownershp?

A

chown is how you change ownership of a file.

62
Q

What is the command to change default permissions of a newly created file?

A

umask allows you to change default permissions of a newly created file.

63
Q

What are the 3 classes of file permissions?

A

owner/user, group, other

64
Q

How does Linux classify everything?

A

Linux classifies everything as a file, including directories, device files and even processes.

65
Q

What are file permissions?

A

File permissions determine who can access system Files