Docsity

CSC 415 OPERATING SYSTEMS ALL UNITS – COMPLETE STUDY GUIDE, Exams of Computer Science

Partial preview of the text

Download CSC 415 OPERATING SYSTEMS ALL UNITS – COMPLETE STUDY GUIDE and more Exams Computer Science in PDF only on Docsity!

CSC 415 OPERATING SYSTEMS ALL UNITS |

COMPREHENSIVE STUDY GUIDE & EXAM

PREP | 100% VERIFIED | A+ GUARANTEE

Updated Questions and Answers | 100% Verified Exam Prep

An interrupt priority scheme can be used to ____.

Select one: a. All the other answers b.allow the most urgent work to be finished first c.defer the handling of low-priority interrupt without masking off all interrupts d.make it possible for high-priority interrupts to preempt the execution of a low priority interrupt

a. All the other answers

DMA controllers ____.

Select one: a.are a nonstandard component in PCs of today b.can steal memory access cycles from the main CPU c.do not utilize an additional, special purpose, processor d.can access main memory at the same time as the main CPU

b.can steal memory access cycles from the main CPU

The ____ register of an I/O port can be written by the host to start a command or to change the mode of a device.

Select one: a. status b. transfer c. data-in d. control

d. control

____ I/O accesses a block device as a simple array of blocks.

Select one: a. Raw b. Cooked c. Stream d. Indirect

a. Raw

A character-stream device ____.

Select one: a. is a device such as a disk drive b.transfers data in blocks of bytes c.transfers data a byte at a time d. is similar to a random access device

c.transfers data a byte at a time

In modern operating systems, dynamic loading and unloading allows

Select one: a.adding new I/O devices without recompiling the kernel. b.updating existing devices drivers without recompiling the kernel. c.adding new I/O devices after the system has already been booted. d. All the other choices

d. All the other choices

In FAT used in MS-DOS,

Select one: a. None of the other choices b.a string preceding the colon that identifies the storage device. c.the storage device is identified in the path name with no clear separation of the device portion. d.the mount table stores the identities of all storage devices.

b.a string preceding the colon that identifies the storage device.

Benefit(s) of using STREAMS is (are)

Select one: a. All the other choices b.number of modules in STREAMS is constant. c.a module can be used by more than one device. d.STREAMS I/O is synchronous.

c.a module can be used by more than one device.

STREAMS I/O is asynchronous except when the user process communicates with the stream head.

Select one: True False

True

CSTREAMS is the preferred method for writing protocols and device drivers in UNIX variants.

Select one: True False

True

Which of the following is a principle that can improve the efficiency of I/O?

Select one: a.Use small data transfers b.Move processing primitives into hardware c.Decrease concurrency using DMA controllers d.Increase the number of context switches.

b.Move processing primitives into hardware

Which of the following is true about I/O implementation?

Select one: a.A specialized implementation in hardware is highly flexible. b.Implementation at the application level provides the highest performance benefits. c.An in-kernel implementation avoids the need to reboot or reload device drivers after every change to the code. d.An in-kernel implementation can cause data corruption and system crashes.

d.An in-kernel implementation can cause data corruption and system crashes.

A(n) ____ is a front-end processor that multiplexes the traffic from hundreds of remote terminals into one port on a large computer.

Select one: a.network daemon b. I/O channel c.terminal concentrator d.context switch coordinator

c.terminal concentrator

A current trend in I/O device technology and I/O subsystem is Select one: a. to encapsulate the oddities of different I/O devices, the device drivers present device-specific interface for each device to the I/O subsystem. b. there is an increasingly broad variety of I/O devices. c. All of the other options. d. new devices are similar to the previous I/O devices that makes it easier to incorporate them in operating systems.

b. there is an increasingly broad variety of I/O devices.

Escape (or back door) in application I/O interface Select one: a. allows a user to interrupt a device at any time. b. transparently passes arbitrary commands from an application to a device driver. c. allows access to a few additional devices, such as a time-of-day clock and a timer. d. enables managing of devices with widely varying speeds ranging from a few bytes per second to gigabytes per second.

b. transparently passes arbitrary commands from an application to a device driver.

Which of the following is NOT a technique used for managing power consumption in mobile devices? Select one: a. Wakelocks. b. Power collapse. c. Component level power management. d. chilling with natural sources such as lake water, and solar panels.

d. chilling with natural sources such as lake water, and solar panels.

Interrupt chaining Select one: a. is a compromise between the overhead of a huge interrupt table and the inefficiency of dispatching to a single interrupt handler. b. allows CPU to defer processing of low-priority interrupts without masking all interrupts. c. is used to handle interrupts but not exceptions. d. splits interrupt management between first level and second level interrupt handlers.

a. is a compromise between the overhead of a huge interrupt table and the inefficiency of dispatching to a single interrupt handler.

Vectored IO allows one system call to perform multiple IO operations involving a single location. Select one: a. True b. False

b. False

Which of the following principles is used to improve the efficiency of I/O? Select one: a. Move processing primitives into hardware, to allow their operation in device controllers to be concurrent with CPU and bus operation. b. All of the other options. c. Reduce the number of times that data must be copied in memory while passing between device and application. d. Increase concurrency by using DMA-knowledgeable controllers or channels to offload simple data copying from the CPU.

b. All of the other options.

A maskable interrupt can never be disabled. Select one: a. True b. False

b. False

Buffering in I/O is used to Select one: a. All of the other options. b. support copy semantics for application I/O. c. cope with a speed mismatch between the producer and consumer of a data stream. d. provide adaptations for devices that have different data-transfer sizes.

a. All of the other options.

In memory-mapped I/O Select one: a. address space of the computing device is used for communicating with the I/O devices using the standard I/O instructions. b. main memory of the computing device is used for communicating with the I/O devices using the special I/O instructions. c. main memory of the computing device is used for communicating with the I/O devices using the standard I/O instructions. d. address space of the computing device is used for communicating with the I/O devices using the special I/O instructions.

not d

Which of the following is TRUE about a serial port controller and a fibre channel (FC) bus controller? Select one: a. Both FC bus controller and serial port controller are used in PCs. b. Both FC bus controller and serial port controller are often implemented as separate circuit boards. c. All of the other options. d. A serial-port controller is a simple device controller, while an FC bus controller is complex.

not c not b

Which of the following is FALSE about streams? Select one: a. A stream is a full-duplex connection between a device driver and a user-level process. b. Messages may be dropped in a stream even if flow control is implemented. c. Each stream module contains a pair of queues. d. The number of modules in a stream is fixed by the operating system.

d. The number of modules in a stream is fixed by the operating system.

____ is the number of processes that are completed per time unit.

Select one: a. Turnaround Time b. CPU utilization c. Response Time d. Throughput

d. Throughput

Which of the following is true of multilevel queue scheduling?

Select one: a. Each queue has its own scheduling algorithm. b. Processes can move between queues. c. It is the most general CPU-scheduling algorithm. d. A queue cannot have absolute priority over lower- priority queues.

a. Each queue has its own scheduling algorithm.

____ scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts.

Select one: a. SJF b. FCFS c.Multilevel queue d. RR

a. SJF

The ____ scheduling algorithm is designed especially for time-sharing systems.

Select one: a. RR b. FCFS c. Multilevel queue d. SJF

a. RR

____ involves the decision of which kernel thread to schedule onto which CPU.

Select one: a. Dispatcher b. Process-contention scope c. Round-robin scheduling d. System-contention scope

d. System-contention scope

____ allows a thread to run on only one processor.

Select one: a. Load balancing b. Processor affinity c. NUMA d. Processor Set

b. Processor affinity

The two general approaches to load balancing are ____ and ____.

Select one: a. soft real-time, hard real-time b. coarse grained, fine grained c. soft affinity, hard affinity d. push migration, pull migration

d. push migration, pull migration

With ____ a thread executes on a processor until a long- latency event (i.e. a memory stall) occurs.

Select one: a. virtualization b. fine-grained multithreading c. multicore processors d. coarse-grained multithreading

d. coarse-grained multithreading

Which of the following is true of earliest-deadline-first (EDF) scheduling algorithm?

Select one: a. When a process becomes runnable, it must announce its deadline requirements to the system. b. Deadlines are assigned as following: the earlier the deadline, the lower the priority; the later the deadline, the higher the priority. c. It assigns priorities statically according to deadline. d. Priorities are fixed; that is, they cannot be adjusted when a new process starts running.

a. When a process becomes runnable, it must announce its deadline requirements to the system.

The rate of a periodic task in a hard real-time system is ____, where p is a period and t is the processing time.

Select one: a. p/t b. 1/t c. 1/p d. pt

c. 1/p

The Linux CFS scheduler identifies _____________ as the interval of time during which every runnable task should run at least once. Select one: a. load balancing b. nice value c. virtual run time d. targeted latency

d. targeted latency

Which algorithm evaluation method yields the best results? Select one: a. Deterministic Evaluation b. Implement new scheduler and test in real systems c. Simulations d. Queueing Models

c. Simulations

Which of the following criteria is more important from the point of view of a particular process? Select one: a. Response time b. CPU utilization c. Turnaround time d. Throughput

c. Turnaround time

The ______ occurs in first-come-first-served scheduling when a process with a long CPU burst occupies the CPU. Select one: a. dispatch latency b. system-contention scope c. convoy effect d. waiting time

c. convoy effect

Which of the following items does not belong to the function of a dispatcher? Select one: a. switching to user mode b. switching context from one process to another c. jumping to the proper location in the user program to resume that program d. selecting a process among the available ones in the ready queue

d. selecting a process among the available ones in the ready queue

Which of the following POSIX API sets the scheduling policy? Select one: a. pthread_attr_getscope b. pthread_attr_setsched_policy c. pthread_attr_getsched_policy d. pthread_attr_setscope

b. pthread_attr_setsched_policy

Windows 7 User-mode scheduling (UMS) allows applications to create and manage thread independently of the kernel Select one: a. True b. False

a. True

Load balancing is typically only necessary on systems with a common run queue. Select one: a. False b. True

a. False

A multicore system allows two (or more) threads that are in compute cycles to execute at the same time. Select one: a. True b. False

a. True

Which of the following circumstances can cooperative scheduling take place? Select one: a. none of the other answers b. when a process switches from the running state to the waiting state c. when a process switches from the waiting state to the ready state d. when a process switches from the running state to the ready state

b. when a process switches from the running state to the waiting state

Which of the following scheduling algorithm may suffer from convoy effect? Select one: a. SJF b. Multilevel queue c. FCFS d. RR

c. FCFS

In the Linux CFS scheduler, the task with smallest value of vruntime is considered to have the highest priority. Select one: a. False b. True

b. True

Windows gives a 3x priority boost to? Select one: a. foreground applications b. interrupt routines c. system functions d. background applications

a. foreground applications

If the time quantum gets too large, RR scheduling degenerates to __________? Select one: a. Shortest-remaining-time-first b. Multilevel queue c. FCFS d. SJF

c. FCFS

Which of the following processes usually have highest priority? Select one: a. system processes b. interactive processes c. real-time processes d. batch processes

c. real-time processes

Which of the following scheduling algorithms must be nonpreemptive? Select one: a. RR b. priority algorithms c. SJF d. FCFS

d. FCFS

I/O-bound program typically has many short ______ and a CPU-bound program might have a few long __________. Select one: a. I/O burst, I/O burst b. CPU burst, I/O burst c. CPU burst, CPU burst d. I/O burst, CPU burst

c. CPU burst, CPU burst

In RR scheduling, the time quantum should be small with respect to the context-switch time. Select one: a. True b. False

b. False

In hard real-time systems, interrupt latency must be bounded. Select one: a. False b. True

b. True

In Solaris, what is the time quantum (in milliseconds) of an interactive thread with priority 35? Select one: a. 80 b. 35 c. 25 d. 54

a. 80

A significant problem with priority scheduling algorithms is _____. Select one: a. determining the length of the time quantum b. complexity c. starvation d. determining the length of the next CPU burst

c. starvation

In Little's formula, λ, represents the ____.

Select one: a. average queue length b. average waiting time in the queue c. average arrival rate for new processes in the queue d. average CPU utilization

c. average arrival rate for new processes in the queue

Shortest-remaining-time-first scheduling is the preemptive version of __________? Select one: a. RR b. SJF c. FCFS d. Multilevel queue

b. SJF

For interactive systems, it is more important to minimize ________. Select one: a. the variance in response time b. the average response time c. the average turnaround time d. the waiting time

a. the variance in response time

Which of the following scheduling algorithms gives the minimum average response time? Select one: a. FCFS b. SJF c. RR d. Multilevel queue

c. RR

Which of the following is preemptive? Select one: a. both of the above b. none of the other answers c. rate-monotonic scheduling d. earliest-deadline-first scheduling

a. both of the above

The Completely Fair Scheduler (CFS) is the default scheduler for Linux systems. Select one: a. False b. True

b. True

Which of the following system architectures involves multiprocessor scheduling? Select one: a. NUMA systems b. heterogeneous multiprocessing c. multicore CPUs d. multithreaded cores e. all of the other answers

e. all of the other answers

Correctly label the memory pyramid Top of Pyramid Second layer from tip of Pyramid Second layer from base of Pyramid Bottom of Pyramid

Top of Pyramid → CPU Registers,

Second layer from tip of Pyramid → L1, L2, L3, Cache (SRAM),

Second layer from base of Pyramid → RAM (DRAM),

Bottom of Pyramid → Secondary Storage

Flash Memory makes for good swap space because: Select one: a. Flash memory is faster than magnetic media. b. Flash memory is persistent. c. It has no moving parts, so there is no seek time or latency. d. It does not make for good swap space.

d. It does not make for good swap space.

Simply, what is Virtual Memory? Select one: a. It is using all the memory pyramid b. It is a guarantee of how much memory there is. c. It is memory that does not exist. d. It is an abstraction of the physical memory.

d. It is an abstraction of the physical memory.

Correctly fill in the diagram to show the Linux process memory layout. Linux Process Memory Layout

Kernel Stack || || V Library Mappings / || || Heap Uninitialized Data Initialized Data Text Reserved

In systems that support virtual memory, _______________________. Select one: a. physical memory is separated from secondary storage b. virtual memory is separated from logical memory c. physical memory is separated from logical memory d. virtual memory is separated from physical memory

c. physical memory is separated from logical memory

Which of the following is a benefit of allowing a program that is only partially in memory to execute? Select one: a. Programs can be written to use more memory than is available in physical memory. b. Less I/O is needed to load or swap each user program into memory. c. All of the other answers. d. CPU Utilization and throughput is increased.

c. All of the other answers.

In general, virtual memory decreases the degree of multiprogramming in a system. True False

False

A page fault occurs when __________________________ Select one: a. a page table is not large enough to include all page table entries. b. a process tries to access a page that is not loaded in memory. c. the size of a process is larger than the size of physical memory. d. a page in memory gets corrupted.

b. a process tries to access a page that is not loaded in memory.

If memory access time is 250 nanoseconds and the average page fault service time is 10 milliseconds, the probability of page faults must be less than _________________ to keep the performance degradation less than 20%. Select one: a. 0. b. 0. c. 0. d. 0. e. 0.

a. 0.

On a system with pure demand-paging, a process will experiece a high page fault rate when the process begins execution. Select one: a. True, because no pages are loaded in memory b. False, because the program is already loaded c. False, because it is unknown how much physical memory is available and there might not be a need for paging. d. True, because all programs have a high page fault on loading

a. True, because no pages are loaded in memory