prepare for interview Flashcards
Hard Disk
Non-volatile data-storage device. rotating magnetic disk.
Uses magnetic storage to store and retrieve digital information. composed of one or more rapidly rotating platters coated in thin magnetic material. Data accessed in random-access manner (can be stored and retrieved in any order).
Non-volatile: retain stored data when powered off.
Computing Machine
Machine that does something based on input, and produces output
Turing Machine
‘the blueprint of modern computing’. ‘Machine’ that recieves a tape of 1’s and 0’s, reads it, changes 1’s to 0’s and 0’s to 1’s according to instructions. the tape that used to be a question becomes an answer to the question.
Initially just a theoretical idea of a device that, when given a tape of whatever needed length of 1s and 0s, reads the tape and changes the 1s and 0s in accordance with its instructions. the tape of 1s and 0s starts as a question, and when the turing machine is finished with it, becomes the answer.
Von-Neumann Architechture
computer model designed by John Von-Neumann in 1945.
Input -> Memory -> Output
V> Processor (Control Unit <->Arithmetic Logic Unit)
+ Input stored as command in Memory,
+ Processor fetches command from Memory,
+ CU manages commands and input/output,
+ ALU handles calculations,
+ CU stores complete commands in memory,
+ Output is displayed.
Operating System
Program that allows a user to interact with the computer.
History of Linux
developed by Linus Torvalds.
started in 1991 as a pet project,
became community open source project
Linux 1.0.0 launched in 1994
What is Linux?
Open source Operating System. Android is based in Linux.
CPU
Central Processing Unit. interprets and executes all instructions. consists of single microprocessor, but stronger mainframes use one or more. contains CU and ALU (Command Unit, Arithmetic Logic Unit)
- CPU cache
Stores temporary files.
Small chunk of memory on the computer’s processor that stores basic computer instructions that were recently or are frequently used.
Makes processing go faster because frequent data close to CPU
RAM
Computer memory that can be read and changed in any order.
Typically used to store working data and machine code.
ROM?
EPROM?
Read-Only Memory. Non-volatile memory, cannot be electronically modified after manufactury.
Erasable Programmable, read only memory. can be erased if exposed to certain ultraviolets.
BIOS
Basic Input Output System
Boot Loader
Computer instructions in ROM in motherboard chip.
Controls input and output operations.
Loaded into memory on startup, performs POST (power on self test), then loads OS from hard drive into memory.
BUS (Address, Data, Control)
Set of wires carrying signals between devices. connect CPU, memory and I/O devices.
Address bus: carries the address of memory location/ IO device CPU is communicating with
Data bus: carries data between CPU and memory / IO device
Control Bus: carries control signals, telling IO devices what to do
I/O device
Any external device that could send input or receive output.
(secondary storage, keyboard, mouse, monitors, printers)
File system
The way in which files are named and placed logically for storage and retrieval.
NTFS, NFS and ext4 are file systems.
Program
Set of code and instructions meant to complete a task.
Process
Running instance of a program
USB
Universal Serial Bus
Technology that connects computers with external devices
Serial Port
Connector that sends data one bit at a time.
May be connected to a computer.
Parallel port
Device Connector,
sends/receives several bits of data simultaneously using more than one wire.
RS-232
slow but reliable standard transferring data as voltage signal. relatively slow, used still for modems, printers, and other peripherals.
(U)EFI
Unified Extensible Firmware Interface.
Boot Loader, Replacement for BIOS, controls startup process. supports larger hard drives, faster boot times, improved security, adds GUI to configure UEFI settings.
Boot Loader
Loads an operating system when a computer is turned on. Stored in non-volatile memory (ROM)
GRUB/LILO
GRUB: new boot loader with multi-OS device management. Supports Windows, Linux, UNIX, macOS, BSD, and Solaris.
LILO: older boot loader with single OS device management. Only supports Linux.
ATAPI
Advanced Technology Attachment Packet Interface
Extension for ATA(/IDE) standard, allows non-hard drive devices to connect to computer (CD-OMs, DVDs, Blu-ray).
Uses command-based protocol allowing host computer to send commands to the device and receive data from it.
SATA
Serial Advanced Technology Attatchment
Replaces older PATA (Parallel) standard, used for hard drives, SSD’s and optical drives.
(remember ATAPI)
Master Boot Record
Boot sector at beginning of storage device (holds partition table + bootstrap code)
Locates OS, loads it to memory, transfers control to OS.
MTBF
Mean Time Between Failiures.
Average time between breakdowns, used to measure performance/safety
Swap File
System file that creates temp storage on SSD/HD when system low on memory.
Swaps section from RAM storage from idle program to be used by other programs.
Simulates disk space as RAM.
Virtual Memory
OS technique using hardware and software to temporarily transfer data from RAM to disk storage.
Compensates for physical memory shortage.
Inode
File data structure, stores metadata about a Linux file (except name and data)
Keeps track of all files in Linux System.
ASCII table
America Standard Code for Information Interchange: assigns numeric IDs to each letter, numeral, punctuation and other characters.
Subset of Unicode, developed in 1960’s
Unicode
Worldwide encoding standard.
developed in 1980’s to support a total of 65,536 characters (including ASCII) and more from other languages and scripts.
Unicode characters take variable length characters, and therefore take more space than ASCII.
wchar
Wide Character.
Size of wchar is implementation-defined, but typically 16 bits.
wchar_t *wide_string = L”Hello, world!”;
UTF-7/8
7-bit / 8-bit encoded Unicode Transformation Format.
7 is backwards compatible, still used in emails. 8 is more efficient and supports more characters, used for web and other applications.
POSIX
Portable Operating System Interface
set of OS interface standards based on Unix. Any two software conforming to POSIX standard should be compatible.
GNU
GNU’s Not Unix
Unix-like OS; Collection of programs (applications, libraries, developer tools, and games)
Started by Richard Stallman in 1983, as the GNU Project.
goal: create a free OS that is compatible with Unix.
relevent components:
GNU Compiler Collecction (GCC),
GNU Debuger (GDB)
GNU C Library (glibc),
Bourne Again SHell (bash)
And of course others
IP / TCP / UDP
Internet Protocol, responsible for routing data backets between computers
Transmission Control Protocol: does the TCP handshake and ensures all packets reach their destination
User Datagram Protocol: connection-less protocol, which does not guarantee data is delivered reliably or in the right order.
Kernel
Core of the OS. All system calls from User Space communicate with the Kernel.
System Call
routine that allows user apps to request actions that require special privelages (create, delete, open, close, read, write)
Waterfall
Project Framework that breaks down of project activities into linear sequential phases
SCRUM
Project Framework that starts with what can be seen/known. then tracks progress and tweak as necessary.
Emphasizes teamwork, accountability and iterative progress.
Is an example of Agile Development
Agile Development
Project Framework for iterative and incremental development.
+ rapid, flexible responses to change.
+ customer collaboration over contract negotiation
+ responding to change over following a plan
+ working software over comprehensive documentation
Scrum and Extreme Programming are forms of Agile Development
NTFS
New Technology File System
Used by Windows NT for storing/organizing/finding files on a hard disk. Direct upgrade to FAT16/32.
Reliable: Is a Journaling file system (keeps track of file changes in journal for recovery)
Efficient: features file compression and sparse files
Secure: supports Access Control Lists (ACLs) to control file access.
Encryption: supports file encryption to be accessed by authorized users.
Default file system for windows NT, 2000, all the way up to windows 10.
Also supported by Linux and macOS, but those primarily work with ext4.
NFS
Network File System
Protocol for storing files on a network. Distributed file system for accessing files/directories on remote computers and treat them as if they were local.
Scaleable (can add more users/devices)
Reliable (withstands network failiures)
Efficient (uses network resources as opposed to shoving more physical memory into a machine)
FAT-16/32
File Allocation Table
FAT16, introduced in 1977, for Floppy disks. stores file/folder info as 16-bit entries. max size of FAT-16 partition is 2GB
FAT32, introduced in 1996, for USB flash drives and SD cards. stores file/folder info as 32-bit entries. max size of a FAT-32 partition is 32TB.
JFS
Journal File System, created by IBM.
Meaning the file system tracks changes to files and folders in a log file, to backtrack changes in case of system crash or power failure. ext4 is a JFS.
ext4
Fourth Extended File System (after ext1, ext2 and ext3)
Journal file system (JFS) for Linux. higher supported size (1 exabyte).
Primary Disk Partition
first part of MBR partitioned hard drive.
stores OS, boot files (that start the computer)
Extended Partition
Partition that holds multiple logical partitions.
Logical Partition
Partitions that hold data and applications. (Data files, Media files, Applications, Backups, Games, Software)
What are the 9 sections of the manual? (man command)
1 General Commands
2 System Calls (provided by kernel)
3 Library Functions (from program libraries)
4 Special Files (usually to do with /dev/)
5 file formats and conventions (usually to do with /etc/)
6 games: oops
7: Miscellaneous: Macro Packages and Conventions, boot parameters,
8: Sys-admin commands: usually reserved for root
9: Kernel Routines: info about internal kernal operations
which command tells you which manual section the “write” command is in?
man -f write // returns page/section write is in
When there is more than one program with the same name in the file system, how do you know which will run?
1: program in the same directory will run first,
2: else, the OS will look for the first program that appears in the $PATH environment variable,
3: if it doesn’t exist, OS returns an error.
what do the “which” and “type” commands do?
which returns the path to the executable, and type returns information, like if the command is internal/external
which ls
returns: /bin/ls
type ls
returns: ls is a shell builtin
write an alias to remove files ending with ~ from the current directory
alias rt~=’rm -r *~’
In which file would you place an alias so that you have it when you start a new bash?
~/.bashrc
Create a shell function that checks if a file exists. if it does, then copy it to /tmp
!/bin/sh
FILE=1
echo “please enter file name.”
read FILE
if test -f “$FILE”; then
cp “$FILE” tmp/”$FILE”
fi
login to another computer and run gedit on a file in /tmp. ensure that the window that opens is on your computer, and not the remote computer
ssh username@host_ip_addres
cd /tmp
touch whatever.txt
gedit whatever.txt
What is the command for knowing who is logged in?
who -b