Quiz 5

profilekhairul30
OperatingSystemQuiz5.docx

Operating System Quiz 5 1

_______________________________________________________

Name Here

TRUE/FALSE QUESTIONS:

T F 1) A processor manages the computer operations and data processing functions.

T F 2) Data is usually moved between the computer and its outside environment by means of a

system bus.

T F 3) Typically cache memory is out of view or not accessible to the OS.

T F 4) A processor is blocked from executing other instructions if a previously-initiated I/O

operation is underway regardless of interrupt capabilities.

T F 5) Communications interrupts are blocked during interrupts for printer activity

6) The four main structural elements of a computer system are:

A) Processor, Main Memory, I/O Modules and System Bus

B) Processor, I/O Modules, System Bus and Secondary Memory

C) Processor, Registers, Main Memory and System Bus

D) Processor, Registers, I/O Modules and Main Memory

7) Storage place for the address of the instruction to be fetched that will execute next.

A) Accumulator (AC) B) Instruction Register (IR)

C) Instruction Counter (IC) D) Program Counter (PC)

8) The __________ contains the data to be written into memory and receives the data

read from memory.

A) I/O address register B) memory address register

C) I/O buffer register D) memory buffer register

9) Instruction processing consists of two steps:

A) fetch and execute B) instruction and execute

C) instruction and halt D) fetch and instruction

10) The ___________ routine determines the nature of the interrupt and performs whatever

actions are needed.

A) interrupt handler B) instruction signal

C) program handler D) interrupt signal

Fill-in the blanks

11) The __________ is a device for staging the movement of data between main memory and processor

registers to improve performance and is not usually visible to the programmer or processor.

12) External, nonvolatile memory is also referred to as __________________ or auxiliary memory.

13) In a _______________ multiprocessor all processors can perform the same functions so the failure of a

single processor does not halt the machine.

TRUE/FALSE QUESTIONS:

T F 14) A process consists of three components: an executable program, the associated

data needed by the program, and the execution context of the program.

T F 15) Uniprogramming typically provides better utilization of system resources than

multiprogramming.

T F 16) A monolithic kernel is implemented as a single process with all elements sharing

the same address space.

T F 17) The user has direct access to the processor with a batch-processing type of OS.

T F 18) Multiprogramming us used by batch processing and time-sharing.

MULTIPLE CHOICE QUESTIONS:

19) The __________ is the interface that is the boundary between hardware and software.

A) ABI B) ISA

C) IAS D) API

20) A(n) __________ is a set of resources for the movement, storage, and processing of data and for

the control of these functions.

A) architecture B) program

C) computer D) application

21) The operating system's __________ refers to its inherent flexibility in permitting functional

modifications to the system without interfering with service.

A) efficiency B) ability to evolve

C) controlled access D) convenience

22) Operating systems must evolve over time because:

A) new hardware is designed and implemented in the computer system

B) hardware must be replaced when it fails

C) hardware is hierarchical

D) users will only purchase software that has a current copyright date

23) Hardware features desirable in a batch-processing operating system include memory

protection, timer, privileged instructions, and __________ .

A) clock cycles B) associated data

C) interrupts D) kernels

TRUE/FALSE QUESTIONS:

T F 24) The OS may create a process on behalf of an application.

T F 25) Swapping is not an I/O operation so it will not enhance performance.

T F 26) If a system does not employ virtual memory each process to be executed must be fully

loaded into main memory.

T F 27) A process that is not in main memory is immediately available for execution, regardless

of whether or not it is awaiting an event.

T F 28) The OS may suspend a process if it detects or suspects a problem.

29) It is the principal responsibility of the __________ to control the execution of processes.

A) OS B) process control block

C) memory D) dispatcher

30) When one process spawns another, the spawned process is referred to as the __________ .

A) trap process B) child process

C) stack process D) parent process

31) __________ involves moving part or all of a process from main memory to disk.

A) Swapping B) Relocating

C) Suspending D) Blocking

32) When a process is in the _________ state it is in secondary memory but is available for execution

as soon as it is loaded into main memory.

A) Blocked B) Blocked/Suspend

C) Ready D) Ready/Suspend

33) The _________ is the less-privileged mode.

A) user mode B) kernel mode

C) system mode D) control mode

TRUE/FALSE QUESTIONS:

T F 34) It takes less time to terminate a process than a thread.

T F 35) An example of an application that could make use of threads is a file server.

T F 36) Termination of a process does not terminate all threads within that process.

T F 37) Any alteration of a resource by one thread affects the environment of the

other threads in the same process.

T F 38) Windows is an example of a kernel-level thread approach.

39) The traditional approach of a single thread of execution per process, in which the concept of

a thread is not recognized, is referred to as a __________ .

A) task B) resource

C) single-threaded approach D) lightweight process

40) A _________ is a single execution path with an execution stack, processor state, and scheduling

information.

A) domain B) strand

C) thread D) message

41) A __________ is a dispatchable unit of work that executes sequentially and is interruptible

so that the processor can turn to another thread.

A) port B) process

C) token D) thread

42) A __________ is an entity corresponding to a user job or application that owns resources

such as memory and open files.

A) task B) process

C) thread D) token

43) A Windows process must contain at least _________ thread(s) to execute.

A) four B) three

C) two D) one

TRUE/FALSE QUESTIONS:

T F 44) The central themes of operating system design are all concerned with the

management of processes and threads.

T F 45) It is possible in a single-processor system to not only interleave the execution

of multiple processes but also to overlap them.

T F 46) Concurrent processes do not come into conflict with each other when they are

competing for the use of the same resource.

T F 47) A process that is waiting for access to a critical section does not consume

processor time.

T F 48) It is possible for one process to lock the mutex and for another process to

unlock it.

49) The management of multiple processes within a uniprocessor system is __________ .

A) multiprogramming B) structured applications

C) distributed processing D) multiprocessing

50) A situation in which a runnable process is overlooked indefinitely by the scheduler,

although it is able to proceed, is _________ .

A) mutual exclusion B) deadlock

C) starvation D) livelock

51) A _________ is an integer value used for signaling among processes.

A) semaphore B) message

C) mutex D) atomic operation

52) A situation in which two or more processes are unable to proceed because each is waiting for one of the others to do something is a _____deadlock___ .

TRUE/FALSE QUESTIONS:

T F 53) All deadlocks involve conflicting needs for resources by two or more processes.

T F 54) For deadlock to occur, there must not only be a fatal region, but also a sequence of

resource requests that has led into the fatal region.

T F 55) Deadlock avoidance requires knowledge of future process resource requests.

T F 55) An atomic operation executes without interruption and without interference.

T F 57) Deadlock avoidance is more restrictive than deadlock prevention.

58) A set of processes is _________ when each process in the set is blocked awaiting an event

that can only be triggered by another blocked process in the set.

A) spinlocked B) stagnant

C) preempted D) deadlocked

59) Examples of __________ include processors, I/O channels, main and secondary memory, devices,

and data structures such as files, databases, and semaphores.

A) regional resources B) joint resources

C) reusable resources D) consumable resources

60) The strategy of deadlock _________ is to design a system in such a way that the possibility of

deadlock is excluded.

A) prevention B) detection

C) diversion D) avoidance

TRUE/FALSE QUESTIONS:

T F 61) In a uniprogramming system main memory is divided into two parts.

T F 62) The use of unequal size partitions provides a degree of flexibility to fixed

partitioning.

T F 63) In a multiprogramming system the available main memory is not generally

shared among a number of processes.

T F 64) Programs in other processes should not be able to reference memory locations

in a process for reading or writing purposes without permission.

T F 65) Any protection mechanism must have the flexibility to allow several processes

to access the same portion of main memory.

MULTIPLE CHOICE QUESTIONS:

66) Main memory divided into a number of static partitions at system generation time is _______ .

A) fixed partitioning B) simple segmentation

C) dynamic partitioning D) simple paging

67) Main memory divided into a number of equal size frames is the __________ technique.

A) simple paging B) dynamic partitioning

C) fixed partitioning D) virtual memory segmentation

68) One technique for overcoming external fragmentation is __________ .

A) loading B) compaction

C) relocation D) partitioning

69) A ___________ is a particular example of logical address in which the address is expressed as

a location relative to some known point, usually a value in a processor register.

A) logical address B) relative address

C) absolute address D) physical address

70) The chunks of a process are known as __________ .

A) pages B) addresses

C) frames D) segments

TRUE/FALSE QUESTIONS:

T F 72) The size of virtual storage is limited by the actual number of main storage locations.

T F 73) Virtual memory allows for very effective multiprogramming and relieves the user

of the unnecessarily tight constraints of main memory.

T F 74) The smaller the page size, the greater the amount of internal fragmentation.

T F 75) The page currently stored in a frame may still be replaced even when the page

is locked.

76) The address of a storage location in main memory is the __________ .

A) address space B) virtual address space

C) real address D) virtual address

77) __________ is the range of memory addresses available to a process.

A) Address space B) Real address

C) Virtual address D) Virtual address space

78) The _________ states the process that owns the page.

A) process identifier B) control bits

C) page number D) chain pointer

79) A _________ is issued if a desired page is not in main memory.

A) paging error B) page replacement policy

C) page fault D) page placement policy

80) The _________ determines when a page should be brought into main memory.

A) page fault B) fetch policy

C) working set D) resident set management

81) Complete the table below by putting T or F in each box

(No mistakes = 5 point. Each mistake = -1 points)

A

B

A v B (A or B)

A ^ B (A and B)

NOR Not (A or B)

NAND Not (A and B)

Not B

Not A

A XOR B

(Exclusive or)

T

T

T

F

F

T

F

F

CONVERSIONS

82) 111011102 = ________________10 (binary to decimal)

83) 25510 = _____________2 (decimal to binary)

84) (5 points) Using this instruction set:

Opcode Definition

0 Halt

1 ADD

2 SUBTRACT

3 STORE

5 LOAD

6 BRANCH UNCONDITIONALLY

7 BRANCH ON ZERO

8 BRANCH ON POSITIVE

901 INPUT

902 OUTPUT

Then looking at this program:

Instruction# code Description of each action (comment here)

0 901 ____________________________________

01 399 ____________________________________

02 901 ____________________________________

03 199 ____________________________________

04 902 ____________________________________

05 000

99 DAT

Question: What does the above program do?

85. (5 points) Here’s a sample of how the LRU Algorithm works:

SAMPLE ONLY – THIS TABLE IS ONLY A SAMPLE FOR YOU TO LOOK AT

Pages needed

2

3

2

1

5

2

4

5

3

2

5

2

frame 1

2

2

2

2

2

2

2

2

3

3

3

3

frame 2

 

3

3

3

5

5

5

5

5

5

5

5

frame 3

 

 

 

1

1

1

4

4

4

2

2

2

F

F

F

F

BUT - FILL-OUT THIS ONE BELOW

Fill-in the page numbers in the chart below when they’re needed by the LRU algorithm if given

The stream of Pages needed as shown and put an “F” for page fault below this chart where they

would occur (as shown in the SAMPLE above)

Pages needed

2

3

4

1

3

4

5

3

2

2

5

1

frame 1

frame 2

frame 3

 

 

All questions are worth 1 point unless otherwise noted