Operating Systems Exam 1

¡Supera tus tareas y exámenes ahora con Quizwiz!

The hardware/user gap is bridged by the OS or by other system software. Which of the following task does not require OS support? A. Change the layout of a document B. Allocate memory for a new data structure C. Control the execution of a program D. Load a program into memory

A. Change the layout of a document

If a process uses more time on computation than doing input/output, this process is a ____. A. CPU-bound process B. I/O-bound process C. None of the Above D. All of the above

A. CPU-bound process

Which of the following statements about context switch is true? A. Cooperating processes need interprocess communication B. Independent process can affect the execution of another process C. Independent processes need interprocess communication D. Cooperating process can not affect the execution of another process

A. Cooperating processes need interprocess communication

____ is a thread library for Solaris that maps many user-level threads to one kernel thread. A. Green threads B. Pthreads C. Sthreads D. Java threads

A. Green threads

Which of the following statements about context switch is true? A. Independent processes cannot affect the execution of another process B. Cooperating processes do not need interprocess communication C. Independent processes can affect the execution of another process D. Cooperating processes cannot affect the execution of another process

A. Independent processes cannot affect the execution of another process

Most modern Operating Systems adopt A. Modular structure B. Microkernel structure C. Layer structure

A. Modular structure

In which mode does API run? A. Only the user mode B. Only the kernel mode C. Both the kernel and user mode

A. Only the user mode

A process is in _____ when it is running on the CPU A. Running state B. New state C. Terminated state D. Waiting state E. Ready state

A. Running state

provide(s) an interface to the services provided by an operating system A. System calls B. Communication C. Shared memory D. Simulators

A. System calls

A process is in _____ when it finished execution A. Terminated state B. Waiting state C. New state D. Running state E. Ready state

A. Terminated state

Ordinary pipes in Windows require a parent-child relationship between the communicating processes. A. True B. False

A. True

Local Procedure Calls in Windows are similar to Remote Procedure Calls A. True. B. False

A. True.

Can a program be running in multiple processes? A. Yes. B. No.

A. Yes

Pthreads refers to A. a specification for thread behavior. B. an API for process creation and synchronization. C. an implementation for thread behavior. D. the POSIX standard.

A. a specification for thread behavior.

Blocking Receive A. is synchronous . B. has the sender send the message and continue . C. is asynchronous D. has the receiver receive a valid message or null

A. is synchronous .

Windows 10 uses the A. one-to-one model B. many-to-one model C. many-to-many model D. one-to many-model

A. one-to-one model

The ____ of a process contains temporary data such as function parameters, return addresses, and local variables. A. stack B. data section C. program counter D. text section

A. stack

Named pipes are unidirectional . A. True B. False

B. False

A thread is composed of a thread ID, program counter, register set, and heap. A. True B. False

B. False

Shared memory is a more appropriate IPC mechanism than message passing for distributed systems. A. True . B. False

B. False

The exec() system call creates a new process. A. True. B. False.

B. False

If a process spends more time doing input and output than computation, this process is a A. CPU-bound process B. I/O-bound process C. None of the Above D. All of the above

B. I/O-bound process

Which one of the followings is not the goals of OS? A. Make the computer easy to use B. Manage data transmission over internet C. Use the computer hardware efficiently D. Execute user programs

B. Manage data transmission over internet

Privileged instructions may be executed by A. The kernel and user modes B. Only the kernel mode C. Only the user mode

B. Only the kernel mode

A CPU scheduler can only select a process in ____ state to execute on the CPU? A. Terminated state B. Ready state C. New state D. Running state E. Waiting state

B. Ready state

A process is in _____ when it has every resource except the CPU. A. Waiting state B. Ready state C. Terminated state D. New state E. Running state

B. Ready state

Which of the following statements is true? A. Shared memory is far more common in operating systems than message passing. B. Shared memory is typically faster than message passing. C. Message passing is most useful for exchanging large amounts of data. D. Message passing is typically faster than shared memory.

B. Shared memory is typically faster than message passing.

The _____ of a process contains globe variables. A. program counter B. data section C. stack D. text section

B. data section

The ____ multithreading model multiplexes one user-level thread to one kernel thread . A. many-to-some model B. one-to-one model C. many-to-one model D. many-to-many model

B. one-to-one model

LWP is A. placed between system and kernel threads B. short for lightweight process. C. placed only among user threads D. short for lightweight processor

B. short for lightweight process.

The _____ of a process contains program code. A. program counter B. text section C. stack D. data section

B. text section

A ____ provides an API for creating and managing threads. A. multicore system B. thread library C. multithreading model D. set of system calls

B. thread library

Which of the following methods limit the number or length of parameters being passed to the OS? A. Block B. Stack C. Register

C. Register

Which of the following statements about context switch is true? A. Context switch time is not overhead B. Context switch only save the state of the new process, but not save the state of the old process C. Context switch time is overhead D. During context switch, the system does useful work

C. Context switch time is overhead

Selecting which job should be brought into memory is A. Medium-term scheduler B. Short-term scheduler C. Long-term scheduler D. CPU scheduler

C. Long-term scheduler

Swapping out or swapping in partially executed processes is A. Long-term scheduler B. Job scheduler C. Medium-term scheduler D. Short-term scheduler

C. Medium-term scheduler

Mach OS adopts A. Layer structure B. Hybrid structure C. Microkernel structure D. Modular structure

C. Microkernel structure

In which mode does System calls run? A. Only the user mode B. Both the kernel and user modes C. Only the kernel mode

C. Only the kernel mode

The information or messages exchanged in ______ is pure data packet A. Shared memory B. Remote Procedure Calls. C. Socket Communication.

C. Socket Communication.

After a new process is successfully created, the state of this process is changed ____ A. from running to ready B. from running to waiting C. from new to ready D. from ready to running E. from running to terminated F. from waiting to ready

C. from new to ready

Non-blocking Send A. has the receiver block until a message is available . B. has the sender block until the message is received. C. is asynchronous. D. is synchronous .

C. is asynchronous.

In a virtual machine, each program believes that it has A. multiple processors B. another "virtual" computer to assist in its operations C. its own memory D. more memory than is physically available on the machine

C. its own memory

The _____ model multiplexes many user-level threads to a smaller or equal number of kernel threads. A. one-to-one B. many-to-one C. many-to-many D. two-level

C. many-to-many

A microkernel is a kernel A. that is compressed before loading in order to reduce its resident memory size B. containing many components that are optimized to reduce resident memory size C. that is stripped of all nonessential components D. that is compiled to produce the smallest size possible when stored to disk

C. that is stripped of all nonessential components

Imagine that a host with IP address 150.55.66.77 wishes to download a file from the web server at IP address 202.28.15.123. Select a valid socket pair for a connection between this pair of hosts. A. 150.55.66.77:150 and 202.28.15.123:80 B. 150.55.66.77:80 and 202.28.15.123:80 C. 150.55.66.77:80 and 202.28.15.123:3500 D. 150.55.66.77:2000 and 202.28.15.123:80

D. 150.55.66.77:2000 and 202.28.15.123:80

Application programmers typically use ____ to access the services provided by OS? A. Both of them B. System Calls C. None of them D. API

D. API

Which of the following methods are used to pass parameters to the OS? A. Register B. Block C. Stack D. All of the above E. None of the above

D. All of the above

Which of the following statements is correct? A. An operating system provides an environment for the execution of programs B. An operating system manages system resources C. Operating systems must provide both protection and security D. All of the above E. None of the above

D. All of the above

Mac OS X adopts A. Microkernel structure B. Layer structure C. Modular structure D. Hybrid structure

D. Hybrid structure

Multiple child processes are created by the same parent program. Which one of the following is true? A. Heap and Stack sections are equivalent B. Data and Text sections are equivalent C. Only Data sections are equivalent D. Only Text sections are equivalent

D. Only Text sections are equivalent

Selecting which process should obtain CPU and execute next is A. Job scheduler B. Long-term scheduler C. Medium-term scheduler D. Short-term scheduler

D. Short-term scheduler

In Pthreads, a parent uses the pthread_join() function to wait for its child thread to complete. What is the equivalent function in Win32? A. wait() B. join() C. win32_join() D. WaitForSingleObject()

D. WaitForSingleObject()

A process is running on the CPU, when its CPU time slice is up, the state of this process is changed A. from running to terminated B. from new to ready C. from ready to running D. from running to ready E. from waiting to ready F. from running to waiting

D. from running to ready

The _____ model maps many user-level threads to one kernel thread. A. two-level B. one-to-one C. many-to-many D. many-to-one

D. many-to-one

Microkernels use _____ for communication A. system calls B. virtualization C. shared memory D. message passing

D. message passing

Which of the following info is contained in Process Control Block? A. Process state B. Process counter C. Registers D. Process number (ID) E. All of the above

E. All of the above

A process is in _____ when it is being created A. Ready state B. Running state C. Waiting state D. Terminated state E. New state

E. New state

A process is in _____ when it is waiting for an input signal. A. Ready state B. Terminated state C. Running state D. New state E. Waiting state

E. Waiting state

After a process complete its execution, the state of this process is changed A. from new to ready B. from waiting to ready C. from running to waiting D. from ready to running E. from running to terminated F. from running to ready

E. from running to terminated

A process is running on the CPU, when this process requests to print data, the state of this process is changed ____ A. from ready to running B. from new to ready C. from running to terminated D. from waiting to ready E. from running to waiting F. from running to ready

E. from running to waiting

Which of the following relationship on resource sharing is possible? A. Parent and children share all resources B. Children share a part of parent's resources C. Parent and child share no resources D. A and B E. B and C F. All of the above

F. All of the above

When a CPU scheduler selects a process to run on the CPU, the state of this process is changed A. from new to ready B. from running to waiting C. from waiting to ready D. from running to ready E. from running to terminated F. from ready to running

F. from ready to running

When a process finishes data printing, the state of this process is changed ____ A. from running to waiting B. from ready to running C. from running to terminated D. from new to ready E. from running to ready F. from waiting to ready

F. from waiting to ready


Conjuntos de estudio relacionados

Iggy Chapter 56: Care of Patients with Noninflammatory Intestinal Disorders

View Set

INFS2608 Lecture 1 - Introduction

View Set

Midterm Exam Exp. 1-9 Monday night

View Set

Health Care System/Organizations

View Set

Ch. 3: Financial Instruments, Financial Markets, and Financial Institutions - Money and Banking

View Set