CS102 Test 2

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which of the following is not a possible value of the expression 4 + 6 ÷ 2 - 1 A. 4 B. 5 C. 6 D. 10

B. 5

Which of the following components of an operating system maintains the directory system? A. Device drivers B. File manager C. Memory manager

B. File Manager

Method

Procedure within an object

Describe a scenario that leads to deadlock in a computer system.

Process 1 is holding Resource 1 and waiting for resource 2 which is acquired by process 2, and process 2 is waiting for resource 1. This results in deadlock because they are both waiting for unattainable resources.

Deadlock

Processes block each other from continuing

Bootloader

Program in ROM (example of firmware) - Run by the CPU when power is turned on - Transfers operating system from mass storage to main memory - Executes jump to operating system

Mutual exclusion

Requirement for proper implementation of a critical region

Constructor

Special method used to initialize a new object when it is first constructed

Character

Symbol

What are the two types of software?

System and Application

Process

The action of executing a program (or algorithm)

Control Unit

The organizing force in the computer

Program Counter (PC)

The register that contains the address of the next instruction to be executed

In programming languages that use + to mean concatenation of character strings, the expression "2x" + "3x" will produce what result?

"2x3x"

Memory Manager

- Allocates space in main memory - May create the illusion that the machine has more memory than it actually does (virtual memory) by playing a "shell game" in which blocks of data (pages) are shifted back and forth between main memory and mass storage

Server Side Activities

- Common Gateway Interface (CGI) - Servlets - PHP

System Software

- Provides infrastructure for application software - Consists of operating system and utility software

At most, how many entries in a list of 5000 names will be interrogated when using the sequential search algorithm?

5000

Semaphore

A "control flag"

Memory

A collection of cells, each with a unique physical address.

Bus

A communication system that transfers data between components inside a computer or between computers; the medium (wires, optical fiber, etc.) and the protocols (rules for sharing the medium nicely)

Input Unit

A device through which data and programs from the outside world enter the computer system - Keyboard, Mouse, Controller

Output Unit

A device through which results stored in the computer memory are made available outside the computer system - Monitor, Speaker

Critical Region

A group of instructions that should be executed by only one process at a time

What is the difference between hubs, switches, and routers?

A hub is merely a central (short) bus to which computers are connected to form a bus network. A switch connects several bus networks to form a larger network. A router connects two networks to form an internet in which the original two networks continue to function as independent networks.

Extensible Markup Language (XML)

A language for constructing markup languages similar to HTML

Class

A template from which objects are constructed

When searching within the list Lewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom which of the following entries will be found most quickly using the sequential search algorithm? A. Lewis B. Pat C. Tom

A. Lewis

Which of the following is not a protocol used in the basic TCP/IP software hierarchy? A. POP3 B. UDP C. TCP D. IP

A. POP3

Suppose the binary search algorithm was being used to search for the entry Tom in the list Nathan, Oliver, Pat, Quincy, Rodger, Stan, Tom A. What would be the first entry in the list to be considered? B. What would be the second entry in the list to be considered?

A. Quincy B. Stan

Which of the following is not constructed by a typical compiler? A. Source code B. Symbol table C. Parse tree D. Object program

A. Source Code

Which of the following is not a way of representing algorithms? A. Stepwise refinement B. Pseudocode C. Flowchart D. Programming language

A. Stepwise Refinement

Which of the following components of an operating system is not part of the kernel? A. User Interface B. File manager C. Scheduler

A. User Interface

The binary search algorithm is an example of an algorithm in which of the following classes? A. Θ(lg n) B. Θ(n) C. Θ(n lg n) D. Θ( n2)

A. Θ(lg n)

Central Processing Unit (CPU)

ALU and the control unit called the Central Processing Unit, or CPU

Object

Active program unit containing both data and procedures

Scheduler

Adds new processes to the process table and removes completed processes from the process table

Polymorphism

Allows method calls to be interpreted by the object that receives the call

Inheritance

Allows new classes to be defined in terms of previously defined classes

Algorithm

An ordered collection of unambiguous, executable steps that defines a terminating process

Which of the following is not associated with object-oriented programming? A. Inheritance B. Resolution C. Encapsulation D. Polymorphism

B. Resoultion

Which of the following connects existing networks to form an internet? A. Bridge B. Router C. Switch D. Repeater

B. Router

Which of the following is the scope of a variable? A. The number of characters in the variable's name B. The portion of the program in which the variable can be accessed C. The type associated with the variable D. The structure associated with the variable

B. The portion of the program in which the variable can be accessed

What is the difference between a repeater and a bridge?

Both repeaters and bridges are used to connect two buses, but a repeater transfers all messages whereas a bridge transfers only those messages destined for the other side.

Which of the following is assigned the task of providing individual users access to the Internet? A. Tier-1 ISPs B. Tier-2 ISPs C. Access ISPs D. ICANN

C. Access ISPs

Which of the following does not require a Boolean structure? A. If-then-else statement B. While loop statement C. Assignment statement D. For loop statement

C. Assignment Statement

Execution of an operating system is initiated by a program called the A. Window manager B. Scheduler C. Boot loader

C. Boot Loader

Which of the following concepts is not associated with critical regions? A. Semaphores B. Mutual exclusion C. Bootstrap

C. Boot Strap

Which layer of the TCP/IP hierarchy decides the direction in which message segments are transferred across the Internet? A. Application B. Transport C. Network D. Link

C. Network

Which of the following is an activity? A. Algorithm B. Program C. Process

C. Process

In the context of the object-oriented paradigm, ____________ are templates from which ____________ are constructed. We say that the latter is an instance of the former.

Classes, Objects

Inter-process Communication (2 types)

Client-Server and P2P

Switch

Connects several compatible networks

Bridge

Connects two compatible networks

Router

Connects two incompatible networks resulting in a network of networks called an internet

Application

Constructs message with address

Instruction Register (IR)

Contains the instruction that is being executed

Dispatcher

Controls the allocation of time slices to the processes in the process table

Repeater

Extends a network

Network

Handles routing through the internet

Link

Handles the actual transmission of packets

Client-Side Activities

Javascript, Flash

Random Access Memory (RAM)

Memory in which each location can be accessed and changed

Read Only Memory (ROM)

Memory in which each location can be accessed but not changed

Name the components of a von Neumann architecture

Memory, arithmetic/logic unit, input/output units, and the control unit.

Arithmatic/Logic Unit

Performs basic arithmetic operations such as addition and subtraction

Kernel

Performs basic required functions - File manager - Device drivers - Memory manager - Scheduler and dispatcher

Application Software

Performs specific tasks for users

List the steps in the fetch-execute cycle. Please also explain what happens in each step.

There are three main steps in the fetch-execute cycle: Fetch the next instruction from the address in the program counter. Decode the instruction. Execute the instruction. In 'Fetch' step, the control unit goes to the address named in the program counter, makes a copy of the contents of that address, puts the copy into the instruction register, and increment the program counter. In 'Decode' step, the control unit determines what the instruction is and accesses any memory locations that contain operands for the instructions. In 'Execute' step, the signals are sent to the arithmetic/logic unit to carry out the procession.

List two disadvantages of both machine languages and assembly languages that are overcome by high-level programming languages.

They are machine dependent and they require that algorithms be expressed in small machinerelated steps rather that larger application-oriented steps.

Boolean

True/False

What are some distinctions between UDP and TCP?

UDP is a connectionless protocol whereas TCP establishes a two way communication between the origin and destination of a message. TCP is a reliable protocol in that the origin and destination work together to confirm that the entire message was successfully transferred. In contrast, UDP merely transmits the message without confirming it reception.

List 3 popular operating systems.

UNIX, LINUX, and Windows

CSMA/CD

Used in Ethernet - Silent bus provides right to introduce new message

CSMA/CA

Used in WiFi - Hidden terminal problem

Instance Variable

Variable within an object

Describe the bootstrap process.

When the computer is first turned on, the boot loader program stored in ROM is executed. This program directs the computer to load the operating system into main memory from mass storage. The boot loader then executes a jump to the operating system, the operating system takes over.

Integer

Whole Numbers

Transport

chops messages into packages

Real Number

numbers with fractions

Distributed Systems

processing is distributed across multiple computing devices

Program

representation of an algorithm (perhaps nonterminating algorithm)


Ensembles d'études connexes

Forensic Science Semester Exam Test

View Set

Hot Words for the SAT (Lesson 14 - No Get Up or Go! - Words Relating to Lacking Energy or Movement)

View Set

Natural Language Processing Final Exam

View Set

Determining Chemical Formulas Chemistry

View Set