Test 1 Flashcards

1
Q

Computers are comprised of 2 components:

A

Hardware

Software

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

What is hardware?

A

Electronic and mechanical equipment that makes up a computer

It is tangible(physical)

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

What is software?

A

Instructions that tells the hardware how to perform

Not tangible!!(not physical)

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

Example of hardware:

A

Monitor
CPU
Memory
Hard Drive
Ect.

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

Two types of software:

A

System software

Application software

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

Interface between a user and the hardware. Controls the operations of the hardware . Also known as the Operating System (OS) . Very small % of software is system software

A

System software

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

What does OS require to execute?

A

Computer resources

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

is a system software. Runs application software. Manages computer resources

A

Operating System (OS)

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

Core OS programs that handle important, routinely executed functions

A

OS Kernel

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

What is the OS Kernel known as?

A

Memory Resident

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

Programs designed to perform specific tasks or solve specific problems for users

Very large % of software falls in this category

A

Application software

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

In applications software a computer’s __________ is directly related to the amount and type of application software written for that computer

A

Power

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

___________________ require hardware

Hardware is controlled by _________________

A

Application software

system software

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

Requests for Service are made through one or more:

A

OS interfaces

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

Hardware functionality is also provided through:

A

OS interfaces

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

System software and a computer’s hardware communicate through these:

A

OS interfaces

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

Modern ______________ support a broad range of:

A

system software

application software

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

The OS hides how it performs specific tasks through:

A

resource abstraction

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

The first electronic digital computers were built in the:

A

late 1930s or early 1940s

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

Digital computers

1937-1942:

1941:

1943-1946:

A

The Atanaoff-Berry computer (not programmable)

Z3(programmable)

ENIAC(programmable)

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

Inventors

The Atanaoff-Berry computer (not programmable)

Z3(programmable)

ENIAC(programmable)

A

Dr. John Atanaoff & Clifford Berry

Konrad Zuse

John mauchly & J. Presper Eckert

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

As computer systems evolved, so did:

A

operating system theory

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

Operating systems are generally classified as one of the following :

A

Single Program (Operating) Systems (SPOS)

Multiprogramming (Operating) Systems (MPOS)

Real-Time (Operating ) Systems (RTOS )

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

Advantage of single program os

A

Simple to implement

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

Disadvantages of single program os

A

Inefficient use of resources

Programmer must wait to use computer

User interface is not friendly

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

A excecuting program is either:

A
  1. Using the CPU to execute instructions
  2. Using a system resource
  3. Waiting to use the CPU
  4. Waiting to use a system resource
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What does each mean?

MultiProgramming Operating System (MPOS)

Multiple Program Operating System (MPOS)

MultiProgramming System ( MPS)

Multiple Program System (MPS)

A

All mean the same thing !!!

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

A multiprogramming (multiple program ) operating system loads multiple programs into _________________ while ________________ the CPU

A

space - multiplexed memory

time- multiplexing

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

Most modern OS utilize what os?

A

multiprogramming operating systems

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

resource has multiple instances of the resource

Each instance is allocated to a process to use

A

space-multiplex

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

resource has only one instance of the resource

The single instance can only be allocated to one process at a time

A

time-multiplex

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

Advantage of Multiprogramming Systems

A
  1. Better utilization because multiple processes share computer resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Disadvantage of Multiprogramming Systems

A
  1. Depends on the type of multiprogramming system
  2. Complex
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Multiprogramming operating systems can be further classified as follows:

A
  1. Batch Processing ( Operating ) Systems (BPOS)
  2. Timesharing (Operating) Systems (TSOS)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

is a multiprogramming ( operating ) system that services “jobs” from a queue

A

batch program/processing (operating) system

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

consists of a sequence of commands, one or more programs, and data that are combined into a single unit and submitted to the operating system

A

A “job “

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

Batch operation steps:

A
  1. Submits a “job” to the operating system
  2. Waits for the “job” to finish executing
  3. Collects the output (if any) generated by the job

The user has no direct interaction with the job” during executing

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

Advantages of Batch Processing Systems

A
  1. It’s a Multiprogramming System
  2. Forces users to think about how to create a “job” that will execute properly (the first time )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Disadvantage of Batch Processing Systems

A
  1. Lack of user interaction when executing “jobs”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

is a multiprogramming (operating) system that supports multiple interactive users

A

timesharing (operating) system

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

Each user interactively submits commands, programs, and data to the system as needed or required

A

timesharing (operating) system

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

In a Timesharing OS user interactively provides input to the computer and receives output from the computer using a:

A

terminal

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

In a timesharing OS does the user have direct interaction with their executing programs?

A

Yes

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

Advantages of Timesharing Systems

A
  1. It’s a Multiprogramming System Device
  2. Users can interaction with the system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

Disadvantages of Timesharing Systems

A
  1. Users generally don’t think about the commands they issue or the programs they execute
  2. Programmers spend less time on design and more time “slinging code”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

is often dedicated to providing service to one application

Or a small number of applications

A

real-time ( operating ) system

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

Because there is often only one application executing , this os rarely provide resource sharing access

A

Real-time

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

Where RTOS are used?

A

Military Vehicles
Nuclear Power Plants
Assembly Line Robots
Medical Devices
Etc.

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

The goal of most real-time os is to provide ____________________ for any request the application makes to perform work

A

guaranteed response time

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

What is meant by guaranteed response time?

A

Processing must be completed on or before a defined deadline or the system controlled by the RTOS will fail

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

Two types of RTOS:

A
  1. Hard RTOS
  2. Soft RTOS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

service work requests that have absolute deadlines that must be met, or else

A

Hard RTOS

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

Examples of hard RTOS

A

Military Vehicle
Nuclear Power Plant
Medical Device

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

service work requests have defined deadlines, but missing an occasional deadline is tolerable

A

Soft RTOS

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

Example of soft RTOS

A

Assembly Line Robots

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

In addition to the operating system strategies discussed earlier, several other computer systems / configurations strategies have evolved since the 1940’s

A
  1. Personal Computing
  2. Centralized Computing
  3. Distributed Computing
  4. Client / Server Computing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

When the concept of Personal Computing (PC) as first proposed in the late ______, roughly ____ years worth of research in the area of computer operating systems existed.

A

1970s

30

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

PCs were brought to the commercial market in _____ by _____

A

1980

IBM

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

Thus, OS for PC evolve just like the earlier computers; ______, then ______

Original MS DOS was a ______ variant

MS Windows is a ______ variant

A

SPOS, then MPOS

SPOS

MPOS

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

Advantage of Personal Computing

A
  1. Each person/user within an organization has their own computer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

Disadvantages of Personal Computing

A
  1. Administration and user access control can be problematic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

Before the advent of PCs, all computing was performed by:

This was known as:

A

mainframe/mini computers

Centralized Computing

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

Advantage of Centralized Computing

A
  1. Easy to control user access, install , etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

Disadvantages of Centralized Computing

A
  1. Single Point of Failure
  2. Limitation on the length of a data communication line
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

can be networked together to form a

A

Local Area Network (LAN)

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

The concept of networking computers ( primarily mainframes) evolved during the:

A

1970’s

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

The ability to network PCs led to:

A

distributed computing

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

Today, _____ perform some or all of the processing previously performed by a central computer

A

PCs

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

Advantage of Distributed Computing

A
  1. Computing can literally occur anywhere in the world
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

Disadvantage of Distributed Computing

A
  1. Administration and user access control can be problematic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

is generally considered to be a more powerful and expensive computer than PCs

A

workstation

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

Workstations are often used for work that requires intensive:

A

calculations and/or computer graphics

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

is a computer that manages the shared resources on a network

A

server ( file server )

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

control access to software , printers , and other devices on the network

A

Servers

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

They also provide additional storage capacity for other computers on the network

A

Server

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

is any computer that uses or accesses the resources provided by a server

A

A client

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

Client/Server Computing is a form of:

A

Distributed Computing

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

exists to execute a program

A

A process

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

Processes are comprised of the following components …

A
  • Object code
  • Program data
  • Resources (allocated by the OS)
  • The status of the program’s execution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

Processes require that an OS environment exists to manage ______________ and __________ among all processes executing in the computer

A

resource isolation

resource sharing

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

manages processes and resources, allocating resources to processes when they are requested

A

The OS environment

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

A Program and a Process _______ the same entity

made up of instructions that define process behavior when executed on some set of data

that executes a program on a particular set of data using resources supplied by the operating system environment

A

are not

static entity

dynamic entity

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

In a process

Only _____ copy of any given program exists

But, ____________ processes can execute the same program

A

one

one or more

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

The OS tracks all:

Process Control Block ( PCB) exists for each:

PCB consumes:

When a process terminates, the memory associated with the PCB is:

A

executing processes

executing process

memory

released

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

contains information about the status of each executing process .

A

PCB

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

The amount and type of information stored in the PCB varies from operating system to operating system

A

Process ID (unique identifier )

Current program instruction

Allocated resources (memory, disk, etc )

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

Each time the OS creates a process to execute a program it “_____________” a PCB for the process

A

instantiates

88
Q

If we think of the PCB as a class, then the “ instantiation “ is an ________ that represents the process

A

object

89
Q

Each active process has a:

A

PCB

90
Q

All processes compete for resources that are managed by the operating system:

A

Central Processing Unit ( CPU)

Printer

Hard Disk

91
Q

The operating system creates processes to _____________ programs

A

execute / run

92
Q

begins execution when the computer is booted

A

initial process

93
Q

All other processes are spawned from the “________ “ process

Spawned processes are known as:

A

initial

Children of the Parent

94
Q

The ________ process of the system spawns all other processes

Any process that spawns processes is said to be the ________ of the spawned processes

A

initial

parent

95
Q

The spawned processes are referred to as:

A ___________ process may have one or more children processes

A

children

parent

96
Q

A child process always has _____ parent process

A parent process will have __________
children

A

one

one or more

97
Q

Spawned processes generally have access to their own address space, separate from the ________ process ‘ :

A

initial

address space

98
Q

__________ refers to the resources allocated to each process for execution purposes:

A

Address space

Memory Resources (i.e. Keyboard , Printer , Hard Disk …)

99
Q

Spawned processes begin by executing the same program the ________ process is executing

The ______ changes the program the spawned process executes soon afterwards

A

initial

OS

100
Q

Because all processes are allocated their own resources and address space, communication between processes occurs through:

A

signals, message passing, or file sharing

101
Q

In a classic Von Neumann architecture, at any give time, _________ process is every executing ( i.e. active)

All other processes are ______________ for the processor

A

only one

blocked waiting (i.e. suspended )

102
Q

A process will loses control of the processor when:

A
  1. It finishes execution of its program
  2. It request a resource
  3. It decides to wait for an event to occur
  4. It’s timeslice has expired
103
Q

When a process loses control of the processor, the operating system gives control of the processor to another process This reallocation of the processor is referred to as:

A

context-switch

104
Q

requires considerable work on the part of the processor

A

context-switch

105
Q

Not only does context-switch have to remove access from one process and grant access to another process, but it has to update the:

A

PCB’s of both processes to reflect the correct current states of the processes

106
Q

Three basic states of a process:

A

Ready ( ready- waiting)

Running

Blocked (blocked - waiting )

107
Q

When a job enters the system it is immediately placed in this state

A

ready state

108
Q

A job is in the ready state is able to execute, except:

When the CPU is idle, one job from the group of jobs in the ready state is:

A

it has not been allocated the CPU

selected and then allocated the CPU

109
Q

Only one job is in this state in a single processor system at any given time

A

running

110
Q

A job will remain in the running state until one of the following events occurs:

A

The job finishes executing
The jobs CPU timeslice expires
The job requests a resource that is not available

111
Q

When a process finishes executing, it:

When a process’s CPU timeslice expires, the state of the process changes from running back to:

When a process requests a resource that is not available, the state of the process changes from running to:

A

leaves the system ( #3)

ready (#2)

blocked (#4)

112
Q

A process in this state will remain in this state until the resource the process requested is available and has been allocated to the process

A

blocked

113
Q

When I’m the blocked state, the state of the process changes from blocked to:

A

ready (#5)

114
Q

What is PERL:

Interpreted or not interpreted:

Dynamically or Loosely Typed

Founder:

When:

A

Practical Extraction and Reporting Language

Interpreted

Loosely Typed

Larry Wall

1987

115
Q

Forces you to code properly to make your program less error - prone

A

use strict;

116
Q

Helps you find typing mistakes. Warns you whenever it sees something wrong with your program

A

use warnings;

117
Q

the shell will run execute the application that has its path on the hash- bang line

A

!/usr/bin/perl

118
Q

UNIX/Linux command and system call which is used to change the access permissions of file system objects (files and directories)

A

chmod u+x file

119
Q

User:
Group:
Other:

A

u

g

o

120
Q

Give user (u) execute (x) permission on the file

A

u + x

121
Q

Remove execute (x) permission from user (u)

A

u - x

122
Q

A system call that suspends the execution of the process for # units of time.

Returns nothing

A

sleep (#)

123
Q

A system call that is used to create a new child process. Takes no arguments. Returns an integer 0 to the child. Child’s PID to the parent

A

fork()

124
Q

A system call that tells the process to stop executing the current program and to begin executing a new program. The new program executed by the process is defined by the “program” argument

A

exec (‘program’)

125
Q

A system call that blocks the calling process until one of it’s child processes exits or a signal is received. Returns the process ID of the completed process

A

wait()

126
Q

Two ways to capture user input:

A
  1. Prompt user to enter input during program execution
  2. Allow user to enter input on command line when program execution initiated
127
Q

are similar to processes in that both are schedulable units of computation

A

Threads

128
Q

However, in the ____________, all threads are associated with a single process

A

thread model

129
Q

provide computation, and share the resources allocated to the process. Can also share the program of the process

A

threads

130
Q

Threads are generally called:

A

light-weight processes/little overhead OS

131
Q

The process to which the treads are associated is called a:

A

heavy - weight process

132
Q

Each thread is uniquely identified and has it’s own allocated resources:

A
  1. A stack
  2. Portion of the process’s status information
  3. Some operating system table entries
133
Q

The process is a:

Threads are ___________ that carry out the execution of the program(s)

A

passive entity

active entities

134
Q

similar to a process scheduler, is required to switch the processor among the active threads

A

thread scheduler

135
Q

A thread scheduler, similar to a process scheduler, is required to switch the processor among the active threads:

A
  1. Sometimes a user program
  2. Other times an operating system function
136
Q

Even though threads are similar to processes they differ in two ways:

A
  1. Context - Switching
  2. Communications
137
Q

is the method through which one thread loses control of the processor and another thread gains access to the processor

A

Thread context-switching

138
Q

Since threads have little state information to maintain, transferring control of the processor between threads is:

Thus, threads require:

A

simple

minimal context- switching!

139
Q

Communication between processes occurs through:

A

message passing , signals , sharing

140
Q

Since threads share the resources and the program of a process, they can communicate easily through the:

A

process’s resources (e.g. address space !!!)

141
Q

PERL threads module

A

use threads;

142
Q

Instantiate a thread object:

the thread will execute:

An identifier passed to the thread:

A

thread->create(‘subroutine’ , id)

‘subroutine’

id

143
Q

wait for a thread to finish

A

join()

144
Q

PERL shared threads module. Allows programmer to define variables that will be shared between threads

A

use threads::shared;

145
Q

Variable defined in the parent program

A

my $variable shared = SOMEVALUE ;

146
Q

The Central Processing Unit (CPU) is comprised of the:

A

Arithmetic Logic Unit (ALU) and the Control Unit (CU)

147
Q

fetches and decodes program instructions:

executes program instructions:

A

The CU

The ALU

148
Q

The ALU is comprised of the following components:

A

A Function Unit

Registers

149
Q

The ___________ is responsible for executing program instructions for ALU

A

function unit

150
Q

There are two types of registers used by the ALU:

A
  1. General Register
  2. Status Registers
151
Q

are used to store the operands of a program instruction:

A

General registers

152
Q

Modern CPU’s usually have between _____________ general registers.

A

32 to 64

153
Q

Register size depends on computer’s:

A

architecture

154
Q

are used to store information regarding the computation currently begin carried out by the function unit

A

Status registers

155
Q

The control unit.

  1. ________ a program instruction from the memory unit:
  2. ________ the program instruction:
  3. ________ the decoded program instruction to ALU’s Function Unit to execute:
  4. ________ the result after execution:
A

Fetches

Decodes

Provides

Stores

156
Q

The control unit must store the memory address of the program instruction that the ALU will next process. The _________________ holds this data

A

program counter (PC)

157
Q

The control unit must also store the actual program instruction the ALU is currently processing The ______________ holds this data

A

instruction register (IR)

158
Q

The CPU, Memory, and Devices are connected to at least ____ bus

A

one

159
Q

is any path along which bits, in an electronic form, are transmitted:

A

bus

160
Q

A bus is comprised of ___ wires

Think of a bus as a ____ lane highway

A

N

161
Q

flow across one or more busses:

A

data, addresses, and control information

162
Q

Three types of busses:

A

Data Bus

Address Bus

Control Bus

163
Q

is used to transfer addresses of the data that the data bus is currently accessing:

A

The address bus

164
Q

carries necessary control signals that specify how the information transfer is to occur:

A

The control bus

165
Q

The memory unit is used to store both:

A

program instructions and data

166
Q

The memory unit is comprised of the following components:

A

Memory Address Register (MAR)

Memory Data Register (MDR)

Command Register (CR )

167
Q

To write a datum to the memory unit the following actions must occur:

A
  1. The datum to be written to memory is placed in the MDR
  2. The memory address where the datum is to be written is placed in the MAR
  3. A “write” command is placed in the CR
  4. The datum in the MDR is written to the memory unit specified by the address held by the MAR
168
Q

To read a datum from the memory unit the following actions must occur:

A
  1. The memory address where the datum exists in the memory unit is placed in the MAR
  2. A read” command is placed in the CR
  3. The contents of the memory unit specified by the address in the MAR is read and the value is placed in the MDR for retrieval by a program
169
Q

In a von Neumann computer, anything that isn’t associated with the CPU or Memory is an:

A

I/O (Input/Output) device

170
Q

A program and data are entered into a von Neumann computer through an __________ and __________

The program and data are transferred from the __________ to the __________

A

input device and device controller

input device to the memory unit

171
Q

The CPU:

A
  1. conducts the transfer
  2. or allows the input device and memory unit to conduct the transfer directly
172
Q

There are three classes of I/O devices:

A
  1. Storage Devices
  2. Character Devices
  3. Communication Devices
173
Q

Storage devices:

A

Internal and external

Tape drives

Hard drives

174
Q

Character devices:

A

Monitors

Printers

Keyboards

175
Q

Communication devices:

A

MODEM

Network interface card

176
Q

The main difference between I/O devices is in their:

A

interfaces

177
Q

is the mechanism through which the computer will communicate with the I/O device, and vice versa

A

The interface

178
Q

allow the processor to distinguish between when it is executing a program on behalf of the OS and a user

A

Processor modes

179
Q

Processor modes allow the processor to distinguish between when it is executing a program on behalf of:

A

the operating system ( supervisor / monitor mode)

a user ( user mode )

180
Q

Distinguishing between ___________ and ___________ is accomplished using the mode bit

A

supervisor mode

user mode

181
Q

Distinguishing between supervisor mode and user mode is accomplished using the:

A

mode bit

182
Q

When the mode bit of a program is set to be in “____________”, the processor can execute every instruction allowed to in its hardware repertoire.

When the mode bit of a program is set to be in “____________”, then the processor can only execute a subset of it’s hardware instructions

A

supervisor mode

user mode

183
Q

Early “________________” operating systems did not distinguish between user programs and supervisor programs

A

single user / single program

184
Q

Multiprogramming operating systems use the mode bit to:

A

restrict a process executing a user program to only accessing memory / resources that has/have been allocated to the process

prevents a process from accessing another processes ‘ memory /resources

185
Q

A ___________ of memory and a ___________(base + N bytes - 1) are defined for each process executing a user program

A

base address

bound address

186
Q

Any process executing a user program is not allowed to access memory outside the ______ and ______!

A

base

bound

187
Q

If a user program is located at base address 0x1258F712 and the number of bytes allocated is 8, then the bound address is:

A

0x1258F719

188
Q

The _________ concept can be extended and used to define areas of memory accessible when the processor is in supervisor mode

A

mode bit

189
Q

When the processor is executing in supervisor mode, it has access to:

A

all memory and all resources

190
Q

When the processor is executing in user mode, it has access to only the:

A

memory/resources allocated to the process executing the user program

191
Q

There are two methods through which programs executing in user mode can request services provided by the OS:

A
  1. Systems Calls
  2. Message Passing
192
Q

are run - time library functions provided by a programming language

A

System calls

193
Q

User programs execute system calls to:

A

request services from the operating system

194
Q

The operating system executes the instructions associated with the specific __________ on behalf of the user program

A

system call

195
Q

Examples of PERL programming language system calls include :

A

fork ( )
exec ( )
open ( )
read ( )
print ( )
sleep ( )
close ( )

196
Q

When a system call executes:

A
  1. A service routine within the operating system processes the system call as a software interrupt (i.e. “ trap “ ) , and the mode bit is set to supervisor mode User process status is now blocked -waiting
  2. The operating system identifies the specific system call requested by the user program , and executes the associated instructions
  3. Once all the instructions associated with the system call have been executed , the operating system sets the mode bit back to user mode
  4. CPU control passes to the process the initiated the system call OR another a Ready process
197
Q

When a user program requests operating system services using message passing:

A
  1. The user program forms a message and sends the message to the operating system.
  2. The operating system receives the message sent by the user program, checks the message , executes the necessary instructions to satisfy the request for service , and then sends a reply back to the user program
198
Q

The main difference between system calls and message passing is in the implementation costs:

A

The cost associated with a system calls is in the software interrupt

The costs associated with passing a message are in process multiplexing, message formation, and message copying

199
Q

In general, ____________ are a more efficient method of requesting services from the operating system than message passing

It is in your best interest to attempt to:

A

system calls

reduce the number of system call initiated by your programs .

200
Q

When a process requires access to a resource that is currently allocated to another process, the process must wait until the process that currently holds the resource releases the resource

A

Red purse request

201
Q

How will the process know or realize that the resource has been released by a process so that it can begin using that resource?

What if there are N processes waiting to use a resource that is currently allocated to another process ?

A
  1. Make the process responsible for recognizing that a resource it is waiting for has been released by the process that was previously using the resource. We will call this the Busy-Wait Method
  2. Make the operating system responsible for recognizing that a resource has been released by a process and then allocate that resource to another process
202
Q

No process may hold indefinitely the:

represents the amount of time the OS gives to a process to use the CPU:

A

CPU

A time slice

203
Q

Initially, the OS retrieves the current state of the process using information stored in the processes:

After a process timeslice expires, the OS:

A

PCB

updates the processes PCB and allocates the CPU to another process

204
Q

If a process is responsible for determining when a resource has been released, then it will spend its time slice executing what is known as a:

A

busy - wait

205
Q

During a _________, a process is continuously checking the status register flags (i.e. busy/done) of a resource to see if the resource is idle

If the resource is idle , then the process performs an:

A

busy-wait

I/O operation

206
Q

Advantages of Busy-Wait

A
  1. It is fairly simple to implement from a programming standpoint
  2. No overhead on the part of the operating system
207
Q

Disadvantages of Busy-Wait

A
  1. Tremendous waste of CPU resource !!!
  2. The resource may become available while the process is in the “ready” queue for the CPU
  3. If N processes are requesting the same resource , then there exists the probability that one of the process may never gain access to the resource -This is referred to as “starvation”
208
Q

If the operating system is responsible for determining when a resource has been released , then the resource is required to send a signal to the operating system when it is idle. These signals called:

A

device interrupts

209
Q

During this, the operating system suspends the execution of the process that is currently allocated the CPU.

The state of the process that was allocated the CPU is saved and the operating system switches from user mode to supervisor mode

The operating system then processes the device interrupt and allocates the resource to a process that requested the resource (update that processes PCB)

A

device interrupt

210
Q

The operating system:

A

Then retrieves the state information about the process that was using the CPU when the device interrupt occurred and…

Then switches from supervisor mode back to user mode

211
Q

Advantages of Device Interrupts

A
  1. Eliminates the need for busy-waits, and hence CPU cycles are not wasted!
  2. The operating system is responsible for allocating a newly idle resource. Prevents starvation???
  3. One process, waiting for a resource, will be allocated the newly idle resource as soon as the operating system processes the device interrupt
212
Q

Disadvantages of Device Interrupts

A
  1. Processing a device interrupt is non- trivial !
213
Q

Three basic states of a process

A

Ready (ready-waiting)

Running

Blocked (blocked -waiting)

214
Q

When a process enters the system it is immediately placed in this queue. The OS will allocate memory for this process:

A

ready state

215
Q

A process in this queue is able to execute, but it has not been allocated the CPU:

A

Ready state

216
Q

When the CPU is idle, one process from the group of processes in this queue is selected and then allocated the CPU

The state of the “ selected” process is changed from:

A

ready

ready to running (#1)