Computer Science Final

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Queue example: Enqueue A Enqueue B Enqueue C Enqueue D Dequeue Enqueue E Enqueue F dequeue

(front) C, D, E, F (tail) Item=B

What address in decimal represents the first cell in a memory?

0

If a computer has 1 GB of main memory, how many bytes is that?

1 x 2^30

Process management states

1. new 2. ready (waiting for its chance to use the CPU) 3. running (one process at a time; currently being executed by the CPU) 4. waiting (Is currently waiting for resources other than the CPU) 5. terminated (has completed termination) all managed by the operating system

How many bytes are in a 1000 GB hard drive storage?

1000 x 10^9 bytes

If a hard drive is advertised as containing 150 GB, how many bytes is that?

150 x 10^9

How many seconds are in 2 millisecond, 3 microsecond and 5 nanosecond?

2 x 10^-3 3 x 10^-6 5 x 10^-9

How many seconds are in 2 microseconds?

2 x 10^-6 sec (0.000002 sec)

For a hard disk, if seek time is 15 ms and latency is 5 ms, the access time is _______.

20 ms

For a gate with n inputs, there are ____ possible input combinations.

2^n

How many step are requires in processing an instruction?

4 fetch the instruction decode the instruction get data if needed execute the instruction

How many bytes are in 4 GB of main memory?

4 x 2^30

creating a binary search tree 5,7,8,6,3,1,4,2

5 3 7 1 4 6 8 2

If a computer has 512 MB of main memory, how many bytes is that?

512 x 2^20

In binary representation, ______ is the number of bits required to represent 75 possibilities.

7

creating a binary search tree 7,4,2,6,1,3,5,8

7 4 8 2 6 1 3 5

According to millers law, a human can actively manage about _____ pieces of information at a time

7 +/- 2

How many unique things can be represented by 3 bits?

8

High level scratch explanation for the dice problem

A die will be rolled 10 times and if a three is ruled, it will be counted.

directed graph

A graph in which there is a sense of direction between nodes aka digraphs that have arrows ex: a portion of a city street map decision tree

Undirected graph

A graph in which there is no sense of direction on edges between nodes aka graph that has no arrows ex: weighted graph (each edge carries a value) (how far cities are from each other)

What is a process? What are the different states of a process? Describe the process life cycle in your own words.

A process is a program in execution and multiple processes can be running at once. There are 5 process management states. The first one is the new state which is where the processes enter into the process life cycle. The second state is the ready state. In this state, the process waits for its chance to use the CPU. Once the CPU is available it is discharged to the running state which is the third state. This is where the process is executed by the CPU. Only one process can be in the running state at a time and the process there can get interrupted. If interrupted it can be terminated, go back to the ready state, or go to the waiting state. The waiting state is where a process goes if it is waiting for resources other than the CPU and the terminated state is where the process goes once it is complete.

First come, first serve example Jobs arrive at time 0 in the sequence A,B,C Job A is 15 seconds Job B is 2 seconds Job C is 1 second

A starts at 0 ms and stops at 15ms B starts at 15ms and stops at 17ms C starts at 17 ms and stops at 18ms turnaround time is: (15+17+18)/3 = 16.7ms

What is a variable in a program and what are the types of variables?

A variable in a program is a literal placeholder for a value. A variable can be global or local. A global variable can be used by all of the sprites and a local variable can be used only by one sprite.

In _____ gate, output is 1 only if all its inputs are 1; otherwise, the output is 0.

AND

Which character set originally had 128 unique characters?

ASCII

What is an abstraction? Describe with an example.

Abstraction is a mental model that hides the details of a complex system. Abstraction allows our mental model to capture the essential features of something and suppress all other features. An example of abstraction is driving a car without knowing how the engine works and also talking and asking Alexa questions on the Echo without knowing the programming behind the technology.

Physical address

Actual address in main memory refers to the actual location once the program is loaded into memory

________________ is considered to be the first programmer.

Ada Lovelace

What is the difference between an algorithm and program?

An algorithm is a step by step process of what needs to be completed and a program is what will run the algorithm steps in order to solve the problem.

Partially filled array

An array where some of the elements would have no valid data. The valid data would be in the beginning of the array The invalid data would be at the end of the array. The length must be kept track of

Unsorted array

An array where the number are in no particular order The length must be kept track of

Resource Management

An operating system manages resources that are often shared among multiple programs and must coordinate when they are used roommate analogy all use same hardware Ex: app using too much memory = force quit

Shortest Job Next example: Jobs arrive at time 0 in the sequence A, B, C, D Job A is 5 seconds Job B is 2 seconds Job C is 6 second Job D is 4 seconds

B starts at 0ms and stops at 2ms D starts at 2ms and stops at 6ms A starts at 6ms and stops at 11ms C starts at 11ms and stops at 17ms turnaround time: (2+6+11+17)/4= 9ms

The order of an algorithm is referred to as....

Big-O notation

First come, first serve example Jobs arrive at time 0 in the sequence C, B, A Job A is 15 seconds Job B is 2 seconds Job C is 1 second

C starts at 0 ms and stops at 1ms B starts at 1ms and stops at 3ms A starts at 3ms and stops at 18ms turnaround time is (1+3+18)/3 = 7.3ms

kernel

Core of the operating system small, core program loaded at boot time and it remains in memory the entire time the computer is on everything goes through it performs basic required functions (memory manager, scheduler/dispatcher, file manager, and device drivers)

examples table

Data: the number 1,2,3 Information: Measurement of 1GB, 2ns (# w/units) Input device: mouse Output device: printer Real number: 0,1,2,3 Audio Format: mp3 Raster graphics format: JPEG Vector graphics format: Postscript, PDF, Flash Volatile memory: RAM Non-volatile memory: secondary hard disk memory High level programming language: Java Character set: ASCII or Unicode

Quicksort

Divide-and-conquer approach Orders an array of values by partitioning the array around one element then sorting each partition choose one element in the array to be the partition (pivot) element average/best case: O(nlog2n) log-linear when the array is random Worst case: sorted array O(n^2)

Which type of RAM is used in main memory?

Dynamic (DRAM)

Stack example: push A push B push C push D pop push E push F pop

E (top) C B A Item= F Order: E, C, B, A

IP Address

Each one is a series of 4 numbers (one byte each) separated by dots each byte (octet) ranges from 0-255 2 parts

Binary Search

Eliminates large parts of the search pool with each comparison *The array must be sorted* *makes it faster* More efficient for longer arrays Search begins in the middle and then continues Middle value found by adding the first and last index and dividing it by 2 O(log2n)

O(2^n)

Exponential time

Frequency

F = 1/T needs to be in hz (1/sec) ns to seconds is x 10^-9

preemptive scheduling

FORCE the executing process may be forced to give up the CPU in favor of some other processes

Queue

First-in-first-out (FIFO) enqueue: add item to end dequeue: remove item from front first: to return (but not remove)first item in the queue

_________________ popularized the term bug.

Grace Hopper

What is hardware? What is software? Give examples of Hardware and Software. What is an operating system?

Hardware is the physical, tangible parts of a computer system. Examples of this can include gates and circuits, a processor, memory, disks, and more. Software is programs that provide the instructions for a computer to execute. Examples of software include Mac or Windows. An operating system is software that manages computer's resources.

Who proposed that a punched card be used for counting the census?

Herman Hollerith

What type of code uses binary trees?

Huffman code

In Scratch, what is a sprite? What is a script? What is a costume? What is a block?

In Scratch, a sprite is a character that performs on the stage, and the scratch cat is the default sprite for any project. A script is a sequence of instructions that controls a sprite and it is made from putting blocks together. A costume is an outfit or look for a sprite. A sprite can have multiple outfits so the user can change the look as the script runs. Blocks are divided into ten different categories. The categories include motion, looks, sound, pen, data, events, control, sensing, operators, and more blocks. These blocks build the script that the sprite will follow.

Bubble Sort

In each iteration and starting with the first element in the array, compare successive pairs pf elements and swap if they are out of order Iteration isn't complete until reaching the end of the current subarray

Binary Search Example Original array: 8, 15, 22, 29, 36, 54, 55, 61, 70, 73, 88 Item = 61

Index: 0, 01, 01, 03, 04, 05, 06, 07, 08, 09, 10 Step 1: 8, 15, 22, 29, 36, 54, 55, 61, 70, 73, 88 Step 2: Mid = (0+10)/2 = 5 61>54 so looking at right half of array Step 3: Mid = (6+10)/2 = 8 61<70, so looking at left half of array Step 4: Mid = (6+8)/2 = 7 61 = 61, ITEM FOUND at index 8

Who developed the idea of storing programs inside the computer?

John von Neumann

Who developed the concept of using punched cards to weave cloth

Joseph Jacquard

gateway

LAN node that handles communication between that LAN and other networks

Stack

Last-in-first-out (LIFO) Push: add item to top Pop: remove item on top Peek: to return but not remove the top of the stack is_empty: to return whether or not the stack is empty size: to return the number of items to the stack

protocol stack

Layers of protocols that build and rely on each other application (HTTP, FTP, Telenet, SSH, SMPT, DNS) transport (TCP,UDP) network (IP) link (Ethernet or wifi) physical (1 and 0)

first software generation

Machine language and assembly language

The ____ gate produces an output of 0 if all of its inputs are 1; otherwise, the output is 1.

NAND

________ and _______ gates are said to be universal gates.

NAND and NOR

The ____ gate produces an output of 1 if all of its inputs are 0; otherwise, the output is 0.

NOR

Which gate produces the opposite of its input value?

NOT

Shortest Job Next (SJN)

Nonpreemptive algorithm in which the scheduler chooses the ready job with the shortest service time

Algorithm order from small order to high order (best to worst)

O(1)<O(log2n)<O(n)<O(nlog2n)<O(n^2)<O(2^n)<O(n!)

The Big O notation for the following equation is

O(n^2)

What is the average case runtime for Quick Sort?

O(nlog2n) when the array is random

The ____ gate produces an output of 0 only if all of its inputs are 0; otherwise, the output is 1

OR

Selection Sort

Orders a list of values by repetitively putting a particular value into its final position find the smallest item in the remaining part of the array and put it in its final position always use O(n^2)

Insertion Sort Example Original Array: 2, 6, 4, 3, 9, 10, 8, 5

Original Array: 2, 6, 4, 3, 9, 10, 8, 5 (key=6) Iteration 1: 2, 6, 4, 3, 9, 10, 8, 5 (key=4) Iteration 2: 2, 4, 6, 3, 9, 10, 8, 5 (key=3) Iteration 3: 2, 3, 4, 6, 9, 10, 8, 5 (key=9) Iteration 4= 2, 3, 4, 6, 9, 10, 8, 5 (key=10) Iteration 5= 2, 3, 4, 6, 9, 10, 8, 5 (key=8) Iteration 6: 2, 3, 4, 6, 8, 9, 10, 5 (key=5) Iteration 7: 2, 3, 4, 5, 6, 8, 9, 10

Insertion Sort Example Original array: 10, 4, 2, 7, 9, 18, 14, 19

Original array: 10, 4, 2, 7, 9, 18, 14, 19 (key=4) Iteration 1: 4, 10, 2, 7, 9, 18, 14, 19 (key=2) Iteration 2: 2, 4, 10, 7, 9, 18, 14, 19 (key= 7) Iteration 3: 2, 4, 7, 10, 9, 18, 14, 19 (key=9) Iteration 4: 2, 4, 7, 9, 10, 18, 14, 19 (key=18) Iteration 5: 2, 4, 7, 9, 10, 18, 14, 19 (key=14) Iteration 6: 2, 4, 7, 9, 10, 14, 18, 19 (key=19) Iteration 7: 2, 4, 7, 9, 10, 14, 18, 19

Binary Search Example Original array: 8, 15, 22, 29, 36, 54, 55, 61, 70, 73, 88 Item = 80

Original array: 8, 15, 22, 29, 36, 54, 55, 61, 70, 73, 88 Item = 80 Index: 0, 01, 01, 03, 04, 05, 06, 07, 08, 09, 10 Step 1: 8, 15, 22, 29, 36, 54, 55, 61, 70, 73, 88 Step 2: mid = (0+10)/2 = 5 80>54 = so looking at right half of array Step 3: mid= (6+10)/2 = 8 80>70 = so keep looking at right half of array Step 4: mid = (9+10)/ 2 = 9 80>73 = so keep looking at the right half of the array Step 6: mid = (10+10)/2 = 10 80<88 = ITEM NOT FOUND

____ occurs when the value that we compute cannot fit into the number of bits allocated for the result.

Overflow

Name two vector graphics file formats.

PDF and postscript

What is the difference between parameter and argument?

Parameter is the receiving end of a program and an argument is the sending end of a program. They are used during top down programming when breaking the problem into subproblems.

Linear Search

Potentially examines every element in the array, one at a time, until either the target is found or until every element has been examined Doesn't assume elements are in particular order Easy to understand but not efficient efficient for short arrays O(n)

_____________ is the register that contains the address of the next instruction to be executed.

Program Counter (PC)

What are rational numbers and real numbers? Give examples:

Rational numbers are numbers that can also be represented as a fraction and real numbers are any negative, zero, or positive value. Rational: -1, 1, 1/2, 1/4. Real: -1,0,1,2,8

___ is a type of memory in which the values cannot be changed.

Read-only memory (ROM)

Searching

Requires repetitively comparing the target to candidates in the array efficient search performs no more comparisons than necessary

General tree

Root Internal nodes leafs

Test problem: Show each sorting algorithm for: Original array: 6, 4, 9, 2, 10, 7, 1, 6, 3, 12

Selection sort: Original array: 6, 4, 9, 2, 10, 7, 1, 6, 3, 12 Iteration 1: 1, 4, 9, 2, 10, 7, 6, 6, 3, 12 Iteration 2: 1, 2, 9, 4, 10, 7, 6, 6, 3, 12 Iteration 3: 1, 2, 3, 4, 10, 7, 6, 6, 9, 12 Iteration 4: 1, 2, 3, 4, 6, 7, 10, 6, 9, 12 Iteration 5: 1, 2, 3, 4, 6, 6, 10, 7, 9, 12 Iteration 6: 1, 2, 3, 4, 6, 6, 7, 10, 9, 12 Iteration 7: 1, 2, 3, 4, 6, 6, 7, 9, 10, 12 Iteration 8: 1, 2, 3, 4, 6, 6, 7, 9, 10, 12 Iteration 9: 1, 2, 3, 4, 6, 6, 7, 9, 10, 12 Insertion sort: Original array: 6, 4, 9, 2, 10, 7, 1, 6, 3, 12 (4) Iteration 1: 4, 6, 9, 2, 10, 7, 1, 6, 3, 12 (9) Iteration 2: 4, 6, 9, 2, 10, 7, 1, 6, 3, 12 (2) Iteration 3: 2, 4, 6, 9, 10, 7, 1, 6, 3, 12 (10) Iteration 4: 2, 4, 6, 9, 10, 7, 1, 6, 3, 12 (7) Iteration 5: 2, 4, 6, 7, 9, 10, 1, 6, 3, 12 (1) Iteration 6: 1, 2, 4, 6, 7, 9, 10, 6, 3, 12 (6) Iteration 7: 1, 2, 4, 6, 6, 7, 9, 10, 3, 12 (3) Iteration 8: 1, 2, 3, 4, 6, 6, 7, 9, 10, 12 (12) Iteration 9: 1, 2, 3, 4, 6, 6, 7, 9, 10, 12 Bubble Sort: Original array: 6, 4, 9, 2, 10, 7, 1, 6, 3, 12 Iteration 1: 4, 6, 9, 2, 10, 7, 1, 6, 3, 12 4, 6, 2, 9, 10, 7, 1, 6, 3, 12 4, 6, 2, 9, 7, 1, 6, 3, 10, 12 Iteration 2: 4, 2, 6, 9, 7, 1, 6, 3, 10, 12 4, 2, 6, 7, 1, 6, 3, 9, 10, 12 Iteration 3: 2, 4, 6, 7, 1, 6, 3, 9, 10, 12 2, 4, 6, 1, 6, 3, 7, 9, 10, 12 Quicksort: Original array: 6, 4, 9, 2, 10, 7, 1, 6, 3, 12 Iteration 1: 6, 4, 2, 1, 6, 3, 9, 10, 7, 12 (pivot=6) 3, 4, 2, 1, 6, 6, 9, 10, 7, 12 Iteration 2: 3, 2, 1, 4, 6, 6, 9, 7, 10, 12 (pivot=3, 9) 1, 2, 3, 4, 6, 6, 7, 9, 10, 12 Iteration 3: 1, 2, 3, 4, 6, 6, 7, 9, 10, 12 (pivot=1, 4, 10) 1, 2, 3, 4, 6, 6, 7, 9, 10, 12

Binary search order

Sort it Midpoint it Compare it

Which type of RAM is used in cache memory?

Static RAM (SRAM)

Problem solving process

Step one is define the problem. This means that the problem should be expressed clearly and the individual should completely understand what needs to be corrected. Step two is identify possible strategies for solving the problem. This implies that multiple and appropriate strategies should be considered. Step three is to evaluate possible strategies for solving the problem and select the best one. This means that before any strategy is selected, the advantages and disadvantages should be considered and evaluated before the best strategy is selected. The fourth step is to implement the strategy. This involves using the selected strategy to solve the problem. The fifth and last step is to evaluate the solution. This is where the individual will evaluate the outcome and consider the need for further work that needs to be accomplished.

What was the first electromechanical general-purpose computer?

The Harvard Mark I

What are the characteristics of the von Neumann architecture? Your answer should include the components and two other characteristics.

The components of the von Neumann architecture are the ALU, the control unit, memory, input, and output. Two other characteristics include the stored program concept and sequential execution of instructions. The stored program concept is the concept that explains that instructions that are to be executed are stored in memory, and sequential execution of instructions is where one instruction at a time is retrieved from memory, decoded, and then executed.

What are the characteristics of a good program? Remember to answer this question using complete sentences.

The first characteristic of a good program is that it is correct. This means that it solves given problems using well-defined instructions. The second characteristic of a good program is that it is readable. This means that it is easy to understand and it follows standard programming practices. The third characteristic of a good program is that it is efficient. This means that is runs quickly and uses littles memory. The fourth characteristic of a good program is that it is user-friendly. This means that it is easy for the user to use. The fifth characteristic of a good program is that it is robust. This means that it works in a wide range of circumstances. The last characteristic of a good program is that it has a general-purpose. This means that it solves a general problem.

The ENIAC (Electronic Numerical Integrator and Calculator)

The first fully electronic general-purpose computer.

What are the different layers of a computing system?

The first layer of a computing system is information. The second layer of computing is the hardware. The third layer of computing is programming. The fourth layer of computing is the operating system. The fifth layer is the applications. The sixth layer is communication.

What can we learn (determine) by analyzing the problem?

The first thing that can be determined is the goal of solving the problem. This is considered as the outputs. The second thing that individuals would determine would be the items needed to achieve the goal. This is considered as the inputs. The third thing that individuals would determine is the processing that is required to complete the goal. This is classified as algorithm.

What will happen if the target isn't on the array?

The markers for low and high will cross each other meaning that they we will be down to a sublist of 0 elements

What is the purpose of comments? For whom are comments intended?

The purpose of comments are to be used in a program to explain a particular instruction or section of code or to document the purpose of the chosen blocks. The comments do not affect the execution of the program. Comments are intended only for human use.

What is the purpose of the ALU? What is the purpose of the control unit? What registers are in the control unit?

The purpose of the ALU is to perform arithmetic and logical operations and it contains registers in order to hold temporary results. The purpose of the control unit is to control the execution of instructions and it contains two important registers. The first register is the instruction register (IR) which contains the instructions being executed. The second register is the program counter (PC) which contains the address of the next instruction to be executed.

Round Robin example The time slice is 4ms. Jobs A, B, C, and D arrive at times 0, 1, 2, and 3ms with service times 8ms, 4ms, 9ms, and 5ms.

The time slice is 4ms A starts at 0ms and is preempted at 4ms B starts at 4ms and is preempted at 8ms C starts at 8ms and is preempted at 12ms D starts at 12ms and is preempted at 16ms A starts at 16ms and is preempted at 20ms C starts at 20ms and is preempted at 24ms D starts at 24ms and is preempted at 25ms C starts at 25ms and is preempted at 26ms Turnaround time is (20-0)+(8-1)+(26-2)+(25-3)/4 = 18.25

In the second hardware generation

The transistor replaced the vacuum tube as the main component in hardware.

Trees

Used to represent hierarchal relationships root parent children internal nodes leaf

Sorted array

When array is sorted, a better and more efficient searching strategy than a linear search can be used. This would be a binary search. The array is in a particular order.

The 2-input ____ gate produces an output of 0 only if its inputs are the same; otherwise, the output is 1.

XOR

Which gates produce the sum and carry portion of two binary digits in a half adder?

XOR and AND

subdirectory

a directory inside another directory

List (linear)

a linear container predecessors and successors common list operations: add item remove item get next item search item length of list determine is list is empty two types

Packet switching

a message is divided into packets that are sent individually over the network and reassembled at the destination packets may take a different route to the destination and may arrive out of order resembled at destination header information added to each packet so it can be sent to proper destination and reassemble properly (includes IP address)

social networks

a model of simulation of how individuals and organizations interact

Collection

a named group of data ex: array

virtual memory

a program can be larger than the physical memory

process

a program in execution multiple can be running at once

HTTP (hypertext transfer protocol)

a protocol for exchanging WWW documents used to exchange messages between browsers and servers

telnet

a protocol for logging into a remote computer team viewer

SMTP (Simple Mail Transfer Protocol)

a protocol for transferring electronic mail

FTP (File Transfer Protocol)

a protocol for transferring files to and from another computer

SSH (Secure Shell)

a secure protocol for logging into a remote computer

For a hard disk, ___ is the sum of seek time and latency.

access time

Control processing unit

acts as the brain of the computer

What Boolean algebra symbol is used to express the XOR operation?

addition symbol with a circle around it

time sharing

allows multiple users to interact with a computer at the same time creates allusion that each user has exclusive access to the computer operating system manages the sharing of resources

Space efficiency

amount of information (data) stored in memory

Efficiency of an algorithm

an algorithm carefully uses resources. If there are two algorithms that perform the same task, use the one that uses less resources in terms of time and/or space runs quickly, uses little memory problem size and the key processing steps

User Datagram Protocol (UDP)

an alternative to TCP that is faster but less reliable streaming audio and video *More efficient but less reliable, faster*

World Wide Web

an infrastructure of distributed information web pages are requested and served via HTTP the web uses the internet network to exchange information comprised of web servers that contain files that are web pages

Is a stereo speaker an analog device, a digital device, or neither of these?

analog

____ data is a continuous representation of information.

analog

node (host)

any device on a network computers, printers, phone

Programmers can be two types: System programmers and ______________.

application programers

A(n) ___ is a named collection of homogeneous items accessed by index.

array

port number

associated with a process on a machine certain port numbers are designed for specific protocols that are fixed

Which search algorithm requires that the array be sorted? Which search algorithm eliminates large portions of the array with each comparison? When searching a sorted array, the ___ algorithm is much faster

binary search

What type of tree is a decision tree?

binary tree

Name two raster graphics file formats.

bitmat format (BMP) and GIF format (indexed color)

With ___ testing, test cases are developed without knowledge of the actual code.

black

A ___________ condition is an expression that evaluates to true or false

boolean

synchronous communication

both the sender and receiver are active at the same time ex: phone conversation

__________ block sends a message to all sprites and the background in scratch.

broadcast

A(n) ___ is a set of wires through which information travels.

bus

dual boot/multi-boot system

can choose from multiple operating systems but only one controls the computer at a given time

process management

carefully track the progress of a process and all of its intermediate states

The combination of different gates is called

circuit

computer network

collection of computing devices connected to communicate and share resources

____ is our perception of the various frequencies of light that reach the retinas of our eyes.

color

In a circuit that belongs to the ____ category, the input values explicitly determine the output.

combonational

A(n) ___ uses a laser to read information that is stored optically on a plastic disk.

compact disk (CD)

internet service provier (ISP)

company that provides access to the internet ex: AT&T, Spectrum

Insertion Sort

compare the current key value with the elements that have already been sorted and place the key in the correct location relative to those elements after i iterations, the first i + 1 elements are sorted with respect to each other. After n-1 iterations the array is sorted average/worst case: O(n^2) Best case: insertion sort can do better with a sorted array O(n)

local area network (LAN)

connects a relatively small number of machines in a relatively close geographical area Ex: all the computers in beck

Wide Area Network (WAN)

connects two or more LANS over a potentially large geographic distance ex: 2 different cities and the internet

O(1) or O(n^0)

constant or "bounded" run time

parent directory

contains a specific directory

text file

contains only ASCII or Unicode characters

phone modem

converts digital computer data into an analogue audio signal for transfer over a phone line, and converts the received analog audio data into the corresponding digital computer data

The fastest memory in the memory hierarchy is

cpu registers pg.322

WWW files

create web pages help with other web services (playing audio/video)

O(n^3)

cubic run time

graph

data structure that consists of a set of nodes (vertices) and a set of edges that connect those nodes two types

The process of finding and fixing errors is known as _________

debugging

data structure

defines a way to arrange a collection of data and specifies the rules by which that data can be accessed -Stacks -Queues -Lists -Trees -Graphs

given two algorithms how do you know which one is faster?

determine which operation is fundamental and count the number of times this operation is performed

CPU Scheduling

determine which process in memory (ready state) is moved to running statute be executed by the CPU at any given point two types three processes (first come, first serve, shortest job next, and round robin)

A compact disk (CD) uses a(n) ___ representation of the sound wave.

digital

____ data is a discrete representation of information.

digital

linear collection

elements are organized in a straight line

nonlinear collection

elements are organized in something other than a straight line

Two circuits are considered to be ____ if they produce the same output for each input value combination.

equivalent

O(n!)

factorial time which is the worst

Best case linear search

find the target as the first element in the group

Best case binary search

find the target in one comparison

network address

first part of the IP address specifies a specific network yahoo or tlu.edu

Thomas Edison

first used the term bug to describe an error in a technical system

Huffman codes are based on the ____ of the characters.

frequency

A(n) ___ is a device that accepts one or more input signals and produces a single output signal.

gate

What is an operating system? Give an example. Mention the responsibilities of an operating system.

he operating system is a type of software that manages computer resources like memory and input/output devices. It also lets an application program interact with system resources and it provides an interface for the user to interact with the computer. One operating system can run at a time. An example of an operating system would be Windows or Mac.

broadband

high speed internet apply to modems speed for uploads is different than downloads (downloads dominate) wired connection

If a cache has a high ___, most accesses will be found in the cache.

hit rate

URL (uniform resource locater)

http://www.tlu.edu/acedimics/registrar the address has three main parts: 1.protocol (http): tells computer how to handle the file 2.server computers name (www.tlu.edu): tells where to find the web server 3.Page's pathname (/academics/registrar): tells the server which file (page) is requested and how to find it

Big O notation

identifies the order of magnitude that increases the fastest relative to the size of the problem

Time efficiency

indication of the computational "work" required by the algorithm

____________ code is code put at the beginning of a program to set up things in scratch.

initialization pseudo

Graphical user interface (GUI)

input using keyboard, mouse, touch screen, and voice

The third hardware generation was characterized by

integrated circuits

An _______ translates and executes one program statement at a time.

interpreter

decision tree

involves series of questions (Y/N) (T/F) (this/that) question is in a diamond result in in a rectangle

internet backbone

is a set of high-capacity data routes that carry internet traffic main structure of the internet

operating system

is software that manages computer resources such as memory and I/O devices, provides an interface which the user can interact with the computer, and allows an application program to interact with system resources can only run one OS at a time

multiprogramming

is the technique of keeping multiple programs all competing for access to the *CPU* in main memory at the same time

linked implementation of a list

items are not stored all together, but each item tells you where to go to get the next one in the collection uses nodes (elements) and pointers to nodes each node has the data that the user wants in the list and a pointer to the next node in the list

The _________ block is used to concatenate (add together) strings in scratch.

join

memory management

keep track of which programs are in memory and where in *memory* they reside two techniques

process control block

keeps track of: -CPU registers, including the program counter -memory management information -priority information -accounting information all managed by operating system for each process state the operating system keeps a list of PCB's for the process

The core of the operating system is called the

kernel

O(n)

linear run time items (n) and time are proportional good for small problem size linear search and insertion sort (best-case)

Which search algorithm potentially examines every element in the array?

linear search

O(nlog2n)

log-linear quick sort on an unassorted array (best-case)

O(log2n)

logarithmic run time binary search

A(n) ____ is a graphical representation of a circuit.

logical diagram

With ___ compression, the original data can be retrieved from the compressed version.

lossless

With ___ compression, part of the original data cannot be obtained from the compressed version.

lossy

firewall

machine and its software that seres as a special gateway to the LAN and protects it from inappropriate access filters the network traffic that comes in and goes out enforces the organizations access control policy

hostname

made up of words separated by dots that uniquely identify a computer on the internet ex: my.tlu.edu computer name: my domain: tlu top level domain: education

transmission control protocol (TCP)

make sure data is following the rules breaks message into packets, hands them off for IP delivery, orders and reassembles packets at the destination, takes care of errors provides reliable information *more reliable, but less efficient and slower*

If the amount of data that an array must hold is unknown:

make the array large enough to hold the maximum number of expected elements (max_length) and use a counting variable (length) to keep track of how much valid data in in array

system software

manages a computer system at a fundamental level hardware

concurrent execution

means running multiple scripts

A(n) ____ is the main circuit board of a computer, and it contains connectors for plugging in other circuit boards.

motherboard

Which audio compression format currently is dominant?

mp3

multi-core systems

multi-core CPUs consist of two or more CPUs on the same chip 1 CPU and 2 CPU Cores

array

named collection of homogenous items such as numbers and characters accessed by index

file

named collection of related data the extension of a file name often indicates the type of file (what is inside it)

directory

named group of files also called portal or folder a file that contains the following for each file in the directory: file name, file type, address on disk, current size, protections, when file was created and last modified ex: directory tree

router

network device that directs a packet between networks towards its final destination

vertex

node in the graph (circles)

context switch

occurs when the CPU switches from executing one process to executing another process ready to running the register values for the currently running process must be stored into its PCB The register values for the new running process are loaded into the CPU

broadcast

one sender and many receivers ex: TV and radio email a bunch of strangers

multicast

one sender and many receivers in a specialized group ex: email list to group

point-to-point

one sender and one receiver ex: phone call or email one person

client server structure

only a single service request and response are involved relationship is very brief the server can handle many clients at a time very fast response

file system

operating systems logical view of the files

Batch processing

organizing various jobs into multiple batches of jobs that can share resources

Selection sort example original array: 6, 4, 1, 9, 5, 3, 7, 2

original array: 15, 11, 7, 5, 9, 8, 14, 2, 6, 4, 1, 13 iteration 1: 1, 11, 7, 5, 9, 8, 14, 2, 6, 4, 15, 13 iteration 2: 1, 2, 7, 5, 9, 8, 14, 11, 6, 4, 15, 13 iteration 3: 1, 2, 4, 5, 9, 8, 14, 11, 6, 7, 15, 13 iteration 4: 1, 2, 4, 5, 9, 8, 14, 11, 6, 7, 15, 13 iteration 5: 1, 2, 4, 5, 6, 8, 14, 11, 9, 7, 15, 13 iteration 6: 1, 2, 4, 5, 6, 7, 14, 11, 9, 8, 15, 13 iteration 7: 1, 2, 4, 5, 6, 7, 8, 11, 9, 14, 15, 13 iteration 8: 1, 2, 4, 5, 6, 7, 8, 9, 11, 14, 15, 13 iteration 9: 1, 2, 4, 5, 6, 7, 8, 9, 11, 14, 15, 13 iteration 10: 1, 2, 4, 5, 6, 7, 8, 9, 11, 13, 15, 14 iteration 11: 1, 2, 4, 5, 6, 7, 8, 9, 11, 13, 14, 15

Selection sort example: original array: 2, 6, 4, 9, 3, 10, 8, 5

original array: 2, 6, 4, 9, 3, 10, 8, 5 iteration 1: 2, 6, 4, 9, 3, 10, 8, 5 iteration 2: 2, 3, 4, 9, 6, 10, 8, 5 iteration 3: 2, 3, 4, 9, 6, 10, 8, 5 iteration 4: 2, 3, 4, 5, 6, 10, 8, 9 iteration 5: 2, 3, 4, 5, 6, 10, 8, 9 iteration 6: 2, 3, 4, 5, 6, 8, 10, 9 iteration 7: 2, 3, 4, 5, 6, 8, 9, 10

Bubble sort example original array: 5, 10, 8, 2, 7, 6, 12, 3, 1

original array: 5, 10, 8, 2, 7, 6, 12, 3, 1 Iteration 1: 5, 10, 8, 2, 7, 6, 12, 3, 1 5, 8, 2, 7, 6, 10, 12, 3, 1 5, 8, 2, 7, 6, 10, 3, 1, 12 Iteration 2: 5, 8, 2, 7, 6, 10, 3, 1, 12 5, 2, 7, 6, 8, 10, 3, 1, 12 5, 2, 7, 6, 8, 3, 1, 10, 12 Iteration 3: 5, 2, 7, 6, 8, 3, 1, 10, 12 2, 5, 7, 6, 8, 3, 1, 10, 12 2, 5, 6, 7, 8, 3, 1, 10, 12 2, 5, 6, 7, 3, 1, 8, 10, 12

Quicksort example original array: 5, 14, 2, 7, 1, 18, 3, 6, 9

original array: 5, 14, 2, 7, 1, 18, 3, 6, 9 Iteration 1: 5, 2, 1, 3, 14, 7, 18, 6, 9 (pivot=5) 3, 2, 1, 5, 14, 7, 18, 6, 9 Iteration 2: 3, 2, 1, 5, 14, 7, 6, 9, 18 (pivot=3, 14) 1, 2, 3, 5, 9, 7, 6, 14, 18 Iteration 3: 1, 2, 3, 5, 9, 7, 6, 14, 18 (pivot=1,9,18) 1, 2, 3, 5, 6, 7, 9, 14, 18 1, 2, 3, 5, 6, 7, 9, 14, 18 (pivot=6)

Quicksort example original array: 6, 4, 1, 9, 5, 3, 7, 2

original array: 6, 4, 1, 9, 5, 3, 7, 2 Iteration 1: 6, 4, 1, 5, 3, 2, 9, 7 (Pivot=6) 2, 4, 1, 5, 3, 6 9, 7 Iteration 2: 2, 1, 4, 5, 3, 6, 9, 7 (Pivot=2,9) 1, 2, 4, 5, 3, 6, 7, 9 Iteration 3: 1, 2 4, 3, 5, 6, 7, 9, (Pivot=1,4,9) 1, 2, 3, 4, 5, 6, 7, 9

Binary search example original array: 8, 9, 1, 11, 5, 7, 0, 2, 21, 17 search=17

original array: 8, 9, 1, 11, 5, 7, 0, 2, 21, 17 Index: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 step 1: 0, 1, 2, 4, 7, 8, 9, 11, 17, 21 step 2: mid=(0+9)/2= 4 17>7, so looking at right half of array step 3: mid=(5+9)/2=7 17>11, so keep looking at right hand of array step 4: mid=(8+9)/2=8 17=17 ITEM FOUND at index 8

edge (arc)

pair of vertices representing a connection between the two nodes (arrows or lines)

binary tree

parents have 1-2 children "left child and right child"

domain name

part of the host name that specifies a certain organization or group ex: www.yahoo.com yahoo.com is the domain name

What term represents an individual element in a picture?

pixel

In ___________________ scheduling the executing process is forced to give up the CPU in favor of some other process.

preemptive

Round Robin

preemptive algorithm in which each ready process is given a time slice (time quantum) of CPU time before it is returned to the ready state process moves between ready and running until it is done

What principle allows us to use a small cache to reduce the time needed to access information needed by the CPU? (Hint: This principle led to the development of the memory hierarchy.)

principle of locality

first come, first serve (FCFS)

processes are moved to the running state in the order in which they first arrive in the ready state nonpreemptive-no force

a set of instructions that tell a computer how to solve a problem.

program

user interface

program that provides system access communicates with users two types

What is the most important step on writing a program?

programming

_____________ is the process of writing a computer program.

programming

cloud computing

provides one or more services or resources such as storage space or email access ex: google drive or one drive

O(n^2)

quadratic run time selection sort on an array (best-case) insertion sort on an unsorted array (worst-case) quick sort on a nearly sorted array (worst-case)

The term ___ refers to storing image information on a pixel-by-pixel basis

raster-graphics

In ____________________ systems such as Controllers for robots, nuclear reactors, etc. the response time is crucial.

real time

We represent a color using its ____, ____, and ____ values

red, green, and blue

domain

related group of networked computers ex: google

growth functions

relationship between problem size (n) and execution time are directly related only shows estimation of growth not exact time problem size (x-axis) execution time (y-axis)

top level domain

represents the organization type or country of origin edu com org pg.564

binary file

requires specific interpretation of the bits in the file ex: executable files, graphics files (can't see inside of them)

The number of pixels used to represent a picture is called

resolution

The term ___ refers to the number of pixels used to represent an image.

resolution

Internet protocol (IP)

rules of the internet routes the packets through interconnected networks to the final destination

When we use ____ as the compression technique, we save space by not storing long repeated sequences.

run length encoding

An audio signal is digitized by ___ its value at regular intervals.

sampling

host address

second part of the IP address specifies a particular machine on the network

HTTPS

secure version of HTTP

In a circuit that belongs to the ____ category, the output is determined by the input as well as the existing state of the circuit.

sequential

network protocol

set of rules that defines how data is formatted and processed on a network

cookies

small text file that a web server stores on your local computer used to capture information about your visit to the site can be used to: -determine the number of unique visitors to the site -customize the site for future visits -implement shopping carts -determine what sites you've visited lately -storing a username and password

Application software

solves problems in the real world, is written to address specific needs apps

When the computer boots it is

starting up and the user can't do anything with it hard disk to main memory key elements of the operating system are loaded from disk, start-up programs are executed, the user interface is activated, and the system is ready for use instructions in ROM are used to start this process

The three types of errors include

syntax errors, run-time errors, and logical errors

real time system

system in which the response time is crucial must minimize the maximum time delay ex: nasa, controllers for robots, nuclear reactors, missiles

Command Line Interface

text input entered at command prompt output displays as characters and numbers programmers and software engineers use this black box to type only Examples: DOS and Unix/Linux

asymptotic complexity

the *order* of the algorithm as n gets very large, it is the estimation of efficiency of an algorithm

turnaround time

the amount of time between when a process arrives in the ready state and when it completes start to finish like small turnaround times

working directory

the current directory/subdirectory the current folder we have open

bandwidth

the data transfer rate is the speed with which data is moved from one place to another on the network how fast we get info from server

Binary search tree

the elements are ordered right side is greater than left side is less than if node doesn't exist it is null

non-preemptive scheduling

the executing process gets to keep the CPU until it terminates or moves to the waiting state (no force)

Sorting

the process of arranging a group of items into a defined order based on particular criteria uses binary search instead of linear find the minimum and maximum find duplicates bubble is the worst selection is the next worse insertion sorted is the best quick sort random is the best

asynchronous communication

the sending and receiving occur at different times ex: email and texts

Problem size (n) is the same as

the size of an array

analysis of algorithms

the study of algorithm efficiency

internet

the ultimate wide area network supports asynchronous, point-to-point communication, and fast enough to mimic synchronous communication collection of computers that communicate with TCP/IP

unix file permissions

three categories of protection setting for a file 1. owner (user) 2. group (list of users) 3. world/other (anyone who has access to the system) read only write/delete only execute only

response time

time delay between receiving a stimulus and producing a response ex: time is takes app to open once you tap it

disk scheduling

to determine the order in which disk operations occur

file management

to keep track of the various files and directories ex: tree hierarchal structure

root directory

topmost directory in which all others are contained ex: main directory/drive

A(n) ___ displays text and graphics like a regular monitor but can also detect and respond to the user pressing the screen.

touchscreen

A ___ is a concentric circle around the surface of a disk.

track

multicore operating system

traditional time-sharing/multiprogramming operating systems give the illusion of running many processes at once by switching rapidly between them faster than a user can perceive must consider which processes to execute on which core

cable modem

transfers data on your cable TV line

Digital Subscriber Line (DSL)

transfers digital data over the phone lines

A ____ acts like a switch, even though it has no moving parts

transistor

A(n) ____ defines the function of a gate by listing all possible input combinations that the gate could encounter, along with corresponding output.

truth table

Which character set uses 16 bits per character and includes Braille and Chinese characters?

unicode

The order of an algorithm serves as an ____ on its execution time

upper bound (maximum estimation of time)

Requesting a web page

use client/server interaction 1. client is a web browser (HTTP gets filename and uses TCP/IP to find server and ensure request arrives) 2. server replies with requested file 3.client interprets .html file and displays it

html (hypertext markup language)

used to build web pages markup language: use tags to annotate the information in a document tag: indicates the general nature of information and how it should be displayed

domain name system (DNS)

used to translate hostnames into numeric IP Address

Array-based implementation of a list

uses an array to store items

logical (virtual address)

value that specifies a location relative to the program and creates the illusion that there is more physical memory relative to the start of the program

If an image belongs to the ____ category, it can be resized mathematically.

vector graphics

Which graphics category describes an image in terms of lines and shapes?

vector graphics

A node in a graph is called __________________.

vertex

search engine

web site that helps you find other web sites google

inorder traversal

when printing the nodes in numerical order we visit the left subtree, the node, and then the right subtree

ethernet

wired LANs link-layer protocol for wired communication point to point communication

wifi

wireless LANs link-layer protocol for wireless communication wireless access point or router must be physically connected to the internet


संबंधित स्टडी सेट्स

Chapter 8: Corporate Strategy: Vertical Integration and Diversification

View Set

Chapter 2 - Lesson 1 - Cells and Life

View Set

Money Matters chapter 6 (investing)

View Set

Oracle CPQ 2021 Implementation Essentials Exam Number: 1Z0-1033-21

View Set

Discovering Statistics Using IBM SPSS Statistics, 5e

View Set

AN - Endocrine and Reproductive Practice Exam ATI

View Set