Week 1 - OS and Linux intro Flashcards

1
Q

What are the 4 fundamental tasks of a computer?

A

Input
Process
Output
Store

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

Explain IPOS Cycle

A

Input - from user informs computer (program) what to do

Processing - converts data to information

Output - information output so user can view results

Storage - Results can be stored for permanent record

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

Central Processing Unit (CPU)

A

Performs the fetch-execute cycle
Fetch next program instruction from
memory

Decode the instruction into actions

Command the relevant part(s) of the
computer to operate to execute the
instruction

Store the result somewhere (if necessary)

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

What does the CPU consist of?

A

Control Unit
Handles the fetch execute cycle

Controls the other components of the computer through
signals

Contains registers for important pieces of information like
the memory location of the next instruction

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

Arithmetic Logic Unit (ALU)

A

Digital circuits to perform arithmetic and logic operations

Data registers to store data being used by the current set
of instructions

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

Registers

A

Data Registers

Program Counter - store location of next program instruction in memory

Instruction Register – store current instruction

Status Flags – store information about last operation

Stack Pointer – store location of the top of the runtime stack where we store information about the
program’s currently executing function

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

Types of memory from fastest to slowest?

A

Registers (SRAM)

Cache (on-chip and off-chip), (SRAM)

Main Memory (SRAM)

Secondary storage (hard-disk, optical disk, flash memory)

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

What is software?

A

Software are the programs that the computer
runs
– Without software, the computer does
nothing

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

What is a program?

A

A program is a step-by-step description of how to perform a task, written in a language the computer can execute
– Machine language

We write programs in easier languages like C++ or Java and convert them into machine
language using a program called a compiler

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

Input and output devices examples

A

Input - keyboard, mouse, mic

Output - Monitor, printer, speakers

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

What is an Operating system?

A

helps to mediate access to various computer resources, including the CPU, memory, and I/O (input/output) devices.

In other words, the operating system manages the use of these resources by different programs or applications running on the computer.

CPU - which program gets allocated to processor

Memory - What memory can each program use and what to do when memory has ran out - hierarchy.

I/O Devices - Allocated requests from programs for I/O actions and abstracts details of how to interface with device

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

The operating system is …?

A

A program that manages hardware and software and is comprised of many components, some loaded into memory and some only loaded when needed.

Core component is the Kernel

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

What tasks does OS handle?

A

The OS handles such tasks as
– Process management
– Memory management
– Input/output
– User interface

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

What is a kernel?

A

Resource Manager
– Processes
– Memory

Everything Linux DOES is a process
Process: program the kernel launches into memory to do a task

core of Linux OS

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

Once user initiates a request what happens?

A

The user does not control computer hardware

The user initiates requests then the OS decides if the user has adequate access rights to perform the requested actions and how to
carry out those actions.

The kernel handles most of the significant operations.

The user interface can be tailored, known as a shell.

Communication with devices is handled through device drivers.

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

What layers is a computer segmented into?

A

– User at the top
– Hardware at the bottom
– Application software and operating system components make up intermediate layers

17
Q

Describe main functions of Kernel

A

Processes: Determines which processes are allowed to use the CPU

Memory: Keep track of memory – what memory is allocated to each process, what memory is free

Device Drivers: Interface between hardware (e.g disk and I/O) and processes

System Calls: Processes use system calls to
communication with Kernel

18
Q

Linux Advantages?

A

Open Source

96.3% of world’s top 1 million servers use Linux

Greater control

Viruses are non-existent

19
Q

Linux command line

A

Part of a shell

The shell includes
- command line interface (CLI) which is the command line and prompt

  • Any previously defined entities
  • functions
  • aliases
  • variables
  • previous instructions as part of a history
    list
  • The shell’s interpreter
20
Q

Linux Interpreter

A

> Its responsibility is to interpret
instructions

> By interpreting, it translates each
instruction on the command line into an
executable statement

> Interpreters are found in many
programming languages (e.g., Python,
Ruby, LISP)

> Interpreters are used in most CLIs

21
Q

Linux The Shell

A

The shell is a customizable environment
– The environment consists of previously defined
terms and instructions
– The shell allows you to define shortcuts in
executing future instructions
– Different Linux shells have different features

22
Q

Advantages of Linux GUI

A

– Less to learn and easier to
control
– Intuitive
– Visual
– Fun
– Allows for easy
multitasking

23
Q

Advantages of CLI

A

– Control
– Speed
– Less resource intensive
– Limits wrist strain
– You learn more about the
OS through the CLI

24
Q

Virtual Machines

A
  • VM is an emulation of a particular computer
    system

Virtual machine
– Software running on your computer emulating
another platform
– The VM is a combination of the software and data
that captures the other platform’s operating system

25
Q

Linux Distro

A

A Linux distribution, or “distro”, is a customized version of the Linux operating system that includes specific software applications, configurations, and user interfaces. Linux distros are created by groups of developers and organizations, and can be tailored to suit various use cases such as desktop computing, servers, and embedded devices. Linux distros are known for their security, stability, and customizability, and are often free and open-source.

26
Q

Linux file system

A

– The way files are stored and
organized to simplify access to
data

Logical File System: Users View
of File System
– Abstraction over physical file
system
– Files, Directories, Partitions

Physical File System: Devices
and methods to store physically
store data (e.g. Magnetic Disk)
– Blocks, disk surface, file pointers,
read write arm etc

27
Q

Linux primary storage

A

– Physical medium where files
are stored
– Internal Hard Drive

28
Q

Linux directory structure

A

Linux has only one root directory
– All files and subdirectories are placed under the
root directory in a treelike structure

29
Q

Filesystem Hierarchy
Standard (FHS)

A

Specifies requirements and
guidelines for file and
directory placement in UNIXlike operating systems

30
Q

Partition

A

Logical division of collection of storage into independent units

31
Q

Directory

A

User specified location that allows a user to organise files

32
Q

File

A

Basic unit of storage, will store data or an executable program

33
Q

File path

A

– A description of how to reach a particular file or
directory
– Absolute Path: starts at the root (/)
– Relative Path: starts at the current working directory

34
Q

Linux servers

A

NO graphical environment
– Administrators need to learn how to navigate
using Command Line Interface only

35
Q

BASH

A
  • BASH is Unix/Linux Shell software
  • Default Shell for almost all Linux Distros
  • Uses BASH command syntax
36
Q

Commands:

A

– pwd displays current directory
– cd changes directory
– ls lists contents of a directory
– man shows help files
– mkdir creates a directory
– rm removes a file or directory
- rmdir removes empty directories
– mv moves and renames files
– cp copies files
– ln makes hard and symbolic links
– su changes the current user temporarily
- touch creates a new empty files and updates the timestamp of an existing file

37
Q

Wildcards

A

– Represents any letter (or sequence of letters) used
to specify a filename or path
– Linux administrators use wildcards to:
* Navigate to directories faster
* Move or delete a group of files
* Locate files based on a portion of their filenames

38
Q

Wilcards *

A

represents zero or more characters

39
Q

Wildcards ?

A

represents only one character