Basic Computer Science (The “School in a Book” Series)

Computer science just isn’t a specialty anymore. Most companies create and/or manage several websites and computer programs, meaning that if you want to be successful in business, it’s helpful to understand these common terms.

Basic Computer Science

Parts of a computer: A computer is made up of memory, including applications, an operating system (OS) and a kernel stored on microchips and/or the hard drive; a CPU; and an imput/output (I/O) unit connected to a power source.

How a computer works: When the computer is turned on, some of the microchips immediately reads some of their memory, which then attempt to make connections with other chips. Together they run the EFI (extensible firmware interface) which starts the computer, then passes the control over to the boot loader. The boot loader is a program that initializes the hardware, loading the first sector of the hard drive to the memory. After this, it loads the operating system (OS), the kernel, the computer settings and the shell. The shell presents the login screen to the user. After the user logs in, the OS tells the driver to start talking to the hardware. After the user opens a program, the driver detects the clicks and talks to the kernel. The kernel then passes the information to the shell. The shell interprets it, then communicates it to the program. Finally, the program interprets it and the program is launched.

The program loads the needed threads and processes into the RAM. Threads are run and interrupted on a regular basis according to how many time slices they’re allotted. (One time slice = 1/30th of a second.) The system clock tells the OS when to stop each process, which is done after each time slice, no matter what. Each time this happens the OS checks to see if the program’s time is up or if it has more. It adjusts priorities and may switch to a different process. This activity is done in kernel mode, a mode in which the program isn’t allowed to control anything. After this, the OS switches back to user mode and gives control back to the program. Computers running with multiple CPUs must share the kernel between them. Mistakes in this management can lead to crashes.

Software and hardware: Hardware are the physical components of the machine. Software, also called applications or programs, are computer-readable instructions and data that live in the computer’s memory. The core part is the executable file (.exe), which talks to the OS using calls. The program also contains lists of needed DLLs and other code for use by the application.

Hard drive: The physical place in the computer in which memory is located

Central processing unit (CPU): The place in the computer that loads instructions from memory, parses (interprets) them, then executes them. It performs all of the logic of the computer and is compared to the brain of a human.

Operating system (OS): The software that runs all the basic operations of the computer so every program doesn’t have to recreate the wheel. It provides a secure, reliable environment and grants applications access to inputs, outputs, memory, system software like drivers, and networking features. Importantly, it also schedules processes (start, interrupt and stop commands when more than one application competes for time on the CPU). The most common OSs are Microsoft’s Windows, Apple’s OSX (and the more popular IOS, which is used for mobile devices), and various OSs by Linux (an open-source software creator group), including Android.

Parts of the OS: System clock; a file system; a user interfaced called the API that includes a set of calls or methods app programmers use to interact with the OS; algorithms, stored process for services.

The shell: The OS’s user interface (the part of the OS that the user sees and interacts with)

Memory: Applications, programs and other data and instructions located on the hard drive disc and/or microchips. There are three types of memory: internal, external and virtual. Internal memory is ROM (long-term stored read-only memory, usually unalterable, containing system-level instructions), RAM (fast copied temporary memory located on the hard drive disc or in microchips which is lost when the computer is shut down), and cached (super-fast copied temporary memory located on the CPU, also lost when the computer is shut down). Virtual memory is also located in the internal memory but is made up of addresses that point elsewhere in the memory for the purposes of convenience and security. External memory is located on external hard drives, USB keys, etc. Memory is stored in strings. It can be written to (changed), or read (retrieved, fetched, loaded).

Pointer: An object that contains the address of each piece of memory

The leap section: The place in memory that stores dynamically allocated variables needed by a program

The stack section: The place in memory that store info in stacks, with the lowest addresses (oldest) on bottom, like cafeteria trays

Buffer: A place in memory that receives and holds data until it can be handled by requested processes. Each process can have its own set of buffers. Each buffer has a predetermined length and data type

The kernel: The part of a Windows computer that loads drivers, handles hardware, enforces security, enables network communication–anything the application needs permission to do, even just opening MS Office. (Accessing memory is not included in this.)

Service: A background process run by the OS. (Example: system clock, firewall, window update checks.)

Kernel mode: The mode an application goes into when it is accessing the computer’s kernel. A program can only go into kernel mode when allowed and only run the kernel code, not its own code at all.

User mode: App mode in which the OS can be accessed through an app can switch back and forth from kernel to user frequently.

Native system services/executive system services: OS services that are callable from user mode.

Kernel support functional routines: Subroutines inside the OS that are callable only from kernel mode.

Four events that transfer control from an application back to the OS: I/O interrupt, system clock interrupt, system call, process page faults, a deadlock

Computer architecture: The way the parts of a computer interact with each other, including which parts of the memory are able to communicate with which other parts and in which order. There are many different working computer architectures.

Virtualization: Hosting one or more remote OSs

Virtual machine: A remotely located package of software that presents itself to the local machine as a complete separate machine. Virtual machines are highly convenient for purposes of testing code, working on a networked machine with network privileges, and on other occasions when a second or different computer/operating system package is needed.

Database: An organized collection of data, usually stored electronically. If available on the Internet, it can be accessed through servers.

Windows API: Application Programming Interface. The set of functions (almost like a language) programmers use to talk to the OS. Thousands of callable functions exist relating to everything the OS is responsible for. (Examples: Create message, get message.)

DLL: Dynamic Link Library. A program’s library of functions that are callable by programs.

Programming:

Program/application: A set of instructions to be executed on a computer, usually with a particular use. To program software is to create the program’s source code using a programming language of choice.

Programming language: A set of standardized rules for coding that results in functional source code. There are many programming languages, including C# and C++. A script is a language that is Internet-appropriate, like JavaScript.

Binary code/machine language/machine code: A language made up entirely of 0s and 1s, which are the only units a computer can directly work with (execute on its CPU). These true/false or 1/0 binary choices are also called boolean expressions. All other programming languages are made into source code, then finally parsed (interpreted by the computer) as binary code by a compiler. (A decompiler turns machine readable code/binary back into source code.)

Data: Information, often represented by symbols and measured in bits (binary digits–0s and 1s) and bytes (units of bits–historically eight bits). A kilobyte (KB) is 1,024 bytes. A megabyte (MB) is 1,024 kilobytes. A gigabyte (GB) is 1,024 megabytes. A terabyte (TB) is 1,024 gigabytes. A kilobit (kb) is 1,024 bits. A megabit (Mb) is 1,024 kilobits. A gigabit (Gb) is 1,024 megabits. A terabit (Tb) is 1,024 gigabits.

Command: A computer instruction. Many commands put together make up an algorithm, a complex logic-based instruction set that play a specific role in the application. Commands and data together make up computer code, the set of instructions forming a computer program that is read and carried out by a computer, which is used in turn to make up computer programs.

Procedure/function/subroutine: An independent code module that fulfills some concrete task and can be reused by the program. Procedures perform operations without returning data and functions do return data. A procedure might be part of an object in object-oriented programming.

Process, thread, job and multi-processing/multi-threading: A single iteration of a procedure is a process. It contains everything needed for that instance. In turn, processes are made up of threads. A group of processes that are performed as a unit for a single goal is a job. Multi-processing/multi-threading is running more than one process simultaneously in the same program using a single CPU, which schedules these processes to occur successively but seamlessly.

Objects and object-oriented programming: Object-oriented programming is a popular way of designing software by making them out of objects (files, data units, independent procedures or a procedure/data object that perform a particular function) that interact with one another

Hacking: Sometimes, cleverly solving a programming problem and sometimes, using a computer to gain unauthorized access to data

Bug: Any kind of error in a software program. It may cause a program to unexpectedly quit, to be vulnerable to attack, or to work improperly. The process of removing bugs is called debugging. Reviewing programs to find bugs and other problems is called testing.

Crash dump: A record of a program’s slate system memory at the time of a crash. A crash dump can be analyzed to figure out why it occurred.

Deadlock: A conflict of needs and allocations that stops all computing

Networks and Networking:

Network: A group of computers that talk to each other and share resources through one or more shared computers called servers. A virtual private network (VPN) is network that allows users to connect to remotely.

Local area network (LAN) and wide area network (WAN): The two types of computer networks. LANs are smaller than WANs and include WiFi and ethernet. WANs are larger and include the Internet.

Server: A computer that provides information to other computers or allows other computers to connect to each other, usually remotely over the Internet or in a smaller computer network. The main server in a group is called the domain controller. The manager of a domain (or any group of users) is called an administrator. Servers talk to individual computers called clients. Some computers have both a server side and a client side. A network that is managed with administrators, passwords and the like is called a domain. A proxy server is a backup server used on corporate networks to protect against web attacks.

Internet: The global collection of computer networks and their connections, all using shared protocols to communicate

Internet 2: A second, higher-speed Internet that is used to send very large files, such as research data between universities

Protocol: Rules to standardize processes in networks. They are used on both the sending and the receiving ends of the communication.

HTTP (Hypertext Transfer Protocol): The set of rules for transferring files (text, graphic images, sound, video, and other multimedia files) on the Internet. HTTPS is HTTP, but with encryption.

Uniform Resource Locator (URL): An Internet address that is used by the browser to look up the IP address of the server and the server’s name so that it can talk to that server and retrieve the page’s HTML

Packet: Small chunk of information that has been carefully formed from larger chunks of information in order to more efficiently communicate over a network. If not encrypted, packets are vulnerable to capture. Packets might be distributed over multiple routers according to which is currently available.

Router: A machine that captures and sends on data packets. Many routers are involved in most Internet communications.

Switch: A smart hub/router that connects network segments, thereby routing packets more efficiently

Modem: A router used on a small scale, as between private homes or small networks

Session: All of the applications running on a single user ID between login and logout

Bandwidth: The maximum rate of data transfer across a given path

Cookie: A small text file with various fields that is stored in the web browser and/or on the client’s computers. Normally, it is used to manage a session (keeping a user logged in across multiple pages, etc.).

Cyber security: Practices, including web development and application development practices, that mitigate Internet exploits

Computer vulnerability: A mistake or oversight in computer code that exposes the program to attack. A client-side vulnerability exists in the client (end user) computer and a server-side vulnerability exists on the server.

Computer exploit: An attack on a local computer or many local computers that either damages it or allows the attacker to make use of it in any way without permission

Firewall: A network device used to filter traffic. Usually between a private network and a link to the internet. Prevents unauthorized incoming traffic, but ineffective when user initiates communication.

Three most common types of computer exploits: Exploitation of browser vulnerabilities, exploitation of email application vulnerabilities, and social engineering (gaining compromising information by exploiting human vulnerabilities)

Cryptography: The process of encrypting (scrambling) plain text messages, that are then sent and unencrypted/decrypted on the receiving end with the use of a text key.

Piracy: The illegal copying, distribution, or use of software

Direct memory access: Writing directly to RAM without going through the hard drive, as when a network file system is doing a transfer, over the internet.

Active directory: A directory service that contains a database that stores security info about objects in a domain, inc users, computers, security IDs, etc.

***

Babies come. But babies don't go. Get Fights You’ll Have After Having a Baby: A Self-Help Story on Amazon now.

***

COMMENTS