Week 2 Flashcards
What is an operating system?
A system hardware the manages processes/programs, hardware and the resources of the computer hardware.
What are the general categories for the various software sitting on top of the OS?
- Utilities
- Application Software
NOTE: This depends on the complexity and purpose of the software
What is the most important part of the OS in Unix/Linux?
The kernel
What is kernel mode?
This is a priority mode given to the OS to allow it to execute tasks relevant to the hardware requirements of the OS.
What is the file space that keeps files seperate and private between users in an OS?
The home directory
Modern OSs are multi-user systems. What does this mean?
This refers to how there can be multiple user accounts logging in on a single OS in a machine.
What is a time-slice?
This refers to the short time slot allocated to executing a process from a user/program.
What is a home directory for a user?
It is the folder designated by the OS to store a user’s personal data. At login, it is the starting folder (in Unix based systems).
What is the root directory?
It is the storage space for BOTH a systems AND user’s data. Highest level directory.
Denoted as / in unix based systems.
What is the full pathname?
It is the address of a file starting from the root directory.
What is a directory?
It is a organisational system, also known as a folder, that contains files and other pieces of data saved by the user and system.
What are the types of pathnames?
- Absolute
2. Relative
How to signify current directory?
use . to signify current directory
How to signify parent directory?
use .. to signify parent directory.
What is a process?
A program that is being executed by the CPU
What is a kernel process?
A process that is automatically managed by the OS
What is a user process?
This is a process that was initiated by the execution of a program by the user; anything a user can manage.
What is the command to run processes with security priveleges within a home directory? (*nix)
sudo -?
? = letter corresponding to command of interest
User priority?
Root/Admid > Normal > Guest
What is primary memory?
RAM - Random Access Memory (very limited, less limited these days)
What is secondary memory?
HDD/SDD (more abundant)
What happens if RAM is not managed?
Memory will be inefficiently used
What is context-switching?
This is when the data for a process is stored and paused which can be resumed. This data is stored in the L3 cache (shared between cores).
How to use the lost listing command?
ls -al (all files even hidden) OR ls -l (just folders)
What does a . signify when long listing?
These are hidden files.
How to show home directory of a user (*nix)
echo $HOME (caps important)
How to access home dir?
cd /home OR cd ~/ OR cd ~
How to show current directory?
pwd (present working directory)
What are the major functions of an OS?
- File management
- Memory Management
- Process Management
What are the major functions of an OS?
- File management (basic)
- Memory Management
- Process Management
What do file management systems accomplish?
They allow users to store information in fundamental units called ‘files’
What does a file system driver allow the OS to accomplish?
Enables the creation, deletion and access of files.
Do file systems need to be mounted before usable by OS?
Yes (hdd/sdd, flash drives)
What are the three types of files in Unix based systems?
- Ordinary files
- Directory files
- Special files
What are ordinary files?
These are files that contain data and executables
What are directory files?
These are files which can store other files and directories (sub directories)
What are special files?
Any other type of file, usually represents hardware devices connected to the computer.
What are unix file naming conventions?
- Case sensitive
- Characters used include lower and upper case letter, digits, dots (.) and commas (,)
- Avoid using spaces and special characters
- No notion of file extension (unlike is OSs like MS Windows) e.g. .exe/.txt etc.
Although extensions exist, they have no meaning.
In unix based systems, what is the default working directory after logging in?
The home directory
In unix based systems, what is the default working directory after logging in?
The home directory
How to determine current working directory? (which command in unix systems?)
pwd
What does ls do?
lists files in current working directory
What does ls -l do?
This is the long listing command, lists files within directory in more detail
What does ls -al do?
This is the long listing command, lists ALL files (including hidden files/folders) within directory in more detail
NOTE: Files starting with a . are hidden files/folders.
What does /etc contain?
This file/directory contains information on all configurations in the system
E.g.
/etc/group contains information about all group in the system
What does is mean when Unix file system under the Unix kernel is flat?
This refers to how all objects (files, directories, IO devices etc.) are all considered files by the system depite the GUI representing them in a heiarchical order
What is so important about the special file /etc/passwd?
This file contains information on ALL USERS on the system
What does the commant cat do?
This displays the data in a file
What does the pipe / | comand do?
This pipe / | command allows you to pass the output of another command to act as the input of another.
Format is x | y
x input (output of previous command) y output
What does the grep command do?
This grabs the data relevant to whatever is specified after the command
i.e. greb muni gets and information present in the directory that contains the string muni
What does the /stat command do?
This shows the information in the file itself (NOT CONTENTS OF FILE)
What does the /stat command do?
This shows the metadata of the file itself (NOT CONTENTS OF FILE)
How does the unix kernel identify files?
Using a unique number called an inode number
What are the three levels of file permissions?
- User
- Group
- Others
What does the d or - mean when long listing?
d = directory - = normal file
What are the kinds of permissions for each leve?
- Write
- Read
- Execute
How many bits are used to represent permissions in unix?
9
What are the different values that persmissions can represent?
- = permission is off r = read enabled w = write enabled x = execute enabled
What type of user has all permissions active?
A “superuser” or a root user
What is a hard link and soft link?
These are alternative paths that point to file.
Hard links share the same inode number as their parent file (essentially a copy of file)
Soft links are purely shortcuts to their parent file
What is the command to change file permissions in unix?
chmod
What is the syntax for chmod?
chmod [-R] ‘who’ [op] [permission] file-list
What do the different elements mean in the chmod syntax?
chmod = command itself -R = recursively (all files within the file modified) who = one of user (u), group (g), other (o) and all (a) op = one of add permission (+), remove permission (-) and reset permission (=) permission = one of read (r), write (w) and execute (x)
What are the four IDs for file access of processes? What do they determine?
- Real user-id
- Effective user-id
- Real group-id
- Effective group-id
They determine a processes access permissions to files/directories
What is octal and how can we use this to change file permissions?
It is a base 8 notation (8 possible values, 0-7)
Can be used to indicate on or off for permissions
7 = rwx 4 = r 2 = w 1 = x 0 = off
chmod XYZ notation where X = u, Y = g and Z = o
What does the kernel do?
It is responsible for managing low-level (hardware) tasks such as disk management, memory managent, IO management, resource allocation, process management, security/protection management.