Quiz
OS First Test Review
Este quiz tem tipos de pergunta que abrem no player de sempre.
Perguntas do quiz (200)
1Many of the statements in "C" are similar to those in "Java" since
- AC is based on the design of Java.
- BC is a design ancestor of C++ and Java.
- CAll programming languages use the same
style of statements. - DBoth C and Java share Eiffel as a common design ancestor.
- ENone of the above
- AC is based on the design of Java.
2C has primitive types that are built into the language, but which of the following are not primitive types in C?
- Abool
- Bstring
- Cint
- Dchar
- ENone of the above
3Whenever a boolean type result is required in C (e.g., in
an "if" statement),- AAny non-zero value represents false.
- BOnly the zero value represents false.
- COnly one value represents true.
- DAny non-zero value represents true.
- ENone of the above
- AAny non-zero value represents false.
4In C, "&&" and "||" are short-circuit boolean operators just like in
Java, while the "&" and "|" operators in C- APerform full boolean evaluation.
- BAre undefined.
- CAre synonyms for "&&" and "||".
- DPerform the bitwise-and and bitwise-or functions.
- ENone of the above
- APerform full boolean evaluation.
5The "!" operator in C is used to perform
- ALogical negation (e.g., turn "true" into "false").
- BNumeric negation (e.g., turn "-3" into "3").
- CNumeric inversion (e.g., turn "5" into "1/5").
- DArray reversal (reversing the items within an array).
- ENone of the above
6The assignment operator (=) in C
- Aworks exactly like assignment in Java.
- Bcannot be used in boolean expressions.
- Ccannot be used in arithmetic expressio
- Dreturns the value assigned as its value.
- ENone of the above
7Which pairs of operators can be easy to confuse but difficult to notice
and debug because they can often (though not always) yield the same
results?- A+ and ++
- B= and ==
- C& and &&
- D| and ||
- ENone of the above
8This example of a pre-increment operator, "x = 12; array[++x] = 3;",
assigns- A"array[12]" the value of 3
- B"array[13]" the value of 3
- C"array[12]" the value of 4
- D"array[13]" the value of 4
- ENone of the above
- A"array[12]" the value of 3
9This example of a compound assignment, "x = 12; array[x += 2] = 5;",
- Ais not allowed.
- Bassigns "array[12]" the value of 5
- Cassigns "array[14]" the value of 5
- Dassigns "x" the value of 7
- ENone of the above
- Ais not allowed.
10Which of the following are not used for
either input or output in C?- Ascanf
- Bgetc
- Cprintf
- Dfprintf
- ENone of the above
- Ascanf
11Which of the following are used for input in C?
- Ascanf
- Bgetc
- Cprintf
- Dfprintf
- ENone of the above
12Which of the following are used for output in C?
- Ascanf
- Bgetc
- Cprintf
- Dfprintf
- ENone of the above
13All C programs should contain a "main"
function with a signature matching- Avoid main(char* argv[])
- Bint main(string argv[])
- Cvoid main(int argc, string argv[])
- Dint main(int argc, char* argv[])
- ENone of the above
- Avoid main(char* argv[])
14The int value returned by the "main" function is used to indicate
- Awhether or not the program terminated normally.
- Bnothing, this is a holdover from early Unix that is no longer used.
- Chow long (in milliseconds) the program took to complete.
- Dthe error a program experienced if there was a problem.
- ENone of the above
- Awhether or not the program terminated normally.
15Function declarations in C must always have
- Aan implementation given as part of the declaration.
- Bonly primitive types given as formal parameters.
- Ca non-empty set of formal parameters.
- Da non-void return type.
- ENone of the above
- Aan implementation given as part of the declaration.
16Function declarations (though not necessarily their implementations) in C
- Amust be given inside of a class definition.
- Bmust appear within the source code file in
which they are used. - Ccan be nested within another function's implementation/body.
- Dmust be given in a separate file
(a ".h" file) from their implementation. - ENone of the above
- Amust be given inside of a class definition.
17Function implementations in C
- Acannot be given within another function's implementation/body.
- Bbegin with the "function" reserved keyword, if given separate from the
function declaration. - Cmust always be given at the same time the
function is declared. - Dappear within curly braces (i.e., { }) directly after the function
signature. - ENone of the above
- Acannot be given within another function's implementation/body.
18A "static" variable declaration within a function
- Areserves space for the variable apart from the run-time stack.
- Ballows the variable to be accessed outside of the function implementation.
- Censures that only one version of the variable exists, so that recursive
calls to the function share the exact same variable storage. - Dis optional as all variables within function
implementations are treated as "static" by default. - ENone of the above
- Areserves space for the variable apart from the run-time stack.
19Variables declared as "static"
- Amay only appear within a function implementation.
- Bcan be accessed outside the scope of the function in which it is declared.
- Ccannot change their values (i.e., they're constants).
- Dhave space for their values reserved outside of the run-time stack.
- ENone of the above
- Amay only appear within a function implementation.
20Large C programs are often broken up into files ending with ".c" and ".h",
but- A".c" files must contain only function
implementations. - B".h" files should contain declarations used by multiple ".c" files.
- Cthe "#include" directives allow ".c" files to use the declarations in the
named ".h" file. - Dvariables should never be delcared in a
".h" file. - ENone of the above
- A".c" files must contain only function
21The "extern" declaration in C is
- Aused to declare variables without setting
aside storage space. - Bimplicit for all function declarations.
- Cused for variables declared within a function so that they can be accessed
outside of the function. - Dhave space for their values reserved outside of the run-time stack.
- ENone of the above
- Aused to declare variables without setting
22Arrays in C are indexed starting with
- A-1
- B0
- C1
- Dthe value indicated when they are declared.
- ENone of the above
23The index given for an array reference in C
- Aonly needs to be checked at compile time to ensure
that it's within range. - Bis always checked at
run time to ensure that it's within range. - Cnever needs to be checked as it is
always within range. - Dis not checked since it doesn't have to
be within its range. - ENone of the above
- Aonly needs to be checked at compile time to ensure
24A "string" value in C is really an array of type "char".
So the- Astring value needs to be null terminated.
- Barray must be exactly as long as the
desired string. - Carray should be at least one char longer than the desired string.
- Dprogramer must use another variable to
keep track of the length of the string. - ENone of the above
- Astring value needs to be null terminated.
25If an array index in C is outside the bounds of the array, then
- Aan error may or may not occur as a result of accessing the array element.
- Ban error always occurs and the program
stops execution. - Cthere may or may not be accessible storage associated with that array
location. - Dthere is always accessible storage
associated with that array location. - ENone of the above
- Aan error may or may not occur as a result of accessing the array element.
26The declaration of an array (e.g., variables, function formal parameters)
must always include the- Astarting index of the array.
- Bsize of the array.
- Ccorresponding "#define" declaration for the array size.
- Dtype of the array elements.
- ENone of the above
- Astarting index of the array.
27Arrays in C
- Agrow dynamically as more items are added (similar to
ArrayLists in Java). - Balways have an associated length that can
be queried to determine the number of items in the array. - Care polymorphic, meaning that any mix of items can be stored in the same
array. - Dare really just pointers to their item type
(e.g., "int x[]" and "int *x" are the same). - ENone of the above
- Agrow dynamically as more items are added (similar to
28A pointer is another name for the
- Atype of values that can be assigned to a variable.
- Bforward declaration of a function.
- Cdeclaration of a "struct"ure.
- Daddress of the memory location holding a desired value.
- ENone of the above
- Atype of values that can be assigned to a variable.
29In C, pointers are declared
- Aonly for declarations of arrays.
- Bby giving an asterisk (*) before the variable name declaration.
- Cby giving an ampersand (&) before the variable name declaration.
- Dfor all formal parameters of functions.
- ENone of the above
- Aonly for declarations of arrays.
30In C, if "x" and "y" are declared by "int x, *y;", then "y = &x;"
- Ais undefined.
- Bassigns "y" the value of "x".
- Cmakes "y" an alias for "x" so that any value assigned to one is
automatically assigned to the other. - Dassigns "y" the memory address where the value for "x" is located.
- ENone of the above
- Ais undefined.
31This array declaration in C, "char name[10];",
- Areserves 10 contiguous bytes (characters) of storage for "name".
- Bis equivalent to the declaration "string name;".
- Cdeclares "name" as a pointer to the reserved storage.
- Ddeclares each element of the array "name" as a pointer to a "char".
- ENone of the above
- Areserves 10 contiguous bytes (characters) of storage for "name".
32Which of the following declarations in C is equivalent to "char *var;"?
- Achar &var;
- Bchar var[10];
- Cchar var[];
- Dchar &var[];
- ENone of the above
- Achar &var;
33Strings in C are represented as an array of "char"acters
- Awith the length kept separately so that the size of the string is known
(e.g., when printing). - Bthat are terminated by a null value to denote their end.
- Cand can be referenced via a "char"acter pointer (e.g., "char *").
- Dwhich are immutable, so that the value cannot be changed (only copied).
- ENone of the above
- Awith the length kept separately so that the size of the string is known
34The address operator in C, ampersand (&),
- Aconverts a variable into a pointer, so that "&y" makes "y" a pointer to an
"int" when "y" was declared via "int y;". - Bis only used when passing parameters.
- Creturns the memory address of any expression it is applied to
(e.g., "&(2*x + 3)"). - Dreturns the memory address of the variable it is applied to (e.g., "&x").
- ENone of the above
- Aconverts a variable into a pointer, so that "&y" makes "y" a pointer to an
35In C, if the following declaration/initialization is made,
"int *x = &y;", then "x++"- Amakes "x" point to the next address in memory (following "y") that can hold
an "int" value. - Bis undefined and causes a compilation error.
- Cis defined but causes a run-time error.
- Dincreases the value of "y" by 1.
- ENone of the above
- Amakes "x" point to the next address in memory (following "y") that can hold
36A "struct" declaration in C can group together
- Amultiple data items.
- Bdata of the same type.
- Cdata of different types.
- DNone of the above
- Amultiple data items.
37A "struct" declaration in C always creates
- Aa new type name that can be used in declaring variables (e.g.,
"person bob;"). - Ba named structure form that can be referred to by "struct" followed by the
structure name (e.g., "struct person"). - Ca recursive structure so that linked structures (e.g., lists, graphs) can
be coded. - Da non-recursive structure since recursive structures
must be declared as types instead
of "struct"s. - ENone of the above
- Aa new type name that can be used in declaring variables (e.g.,
38A self-recursive "struct" requires that at least one of its elements be
declared as- A"struct NAME", where "NAME" is the name given the "struct" and the pointer
type is inferred. - B"struct NAME *", where "NAME" is the name given the "struct".
- C"struct" where the current structure and pointer type are
inferred. - D"struct *" where the current structure name is inferred.
- ENone of the above
- A"struct NAME", where "NAME" is the name given the "struct" and the pointer
39The "typedef" declaration in C declares the new type NAME
corresponding to a specified TYPE_DESCRIPTION (either an existing
type name or other type specification -
such as a "struct") via- A"typedef NAME = TYPE_DESCRIPTION;"
- B"typedef TYPE_DESCRIPTION NAME;"
- C"typedef NAME TYPE_DESCRIPTION;"
- D"NAME = typedef TYPE_DESCRIPTION;"
- ENone of the above
- A"typedef NAME = TYPE_DESCRIPTION;"
40Assuming the legal C variable declaration "person bob;" then the following
declaration must also have been previously
given ("..." represents other appropriate declarations):- A"struct bob { ... };"
- B"typedef struct person { ... } bob;"
- C"typedef struct bob bob;"
- D"typedef person bob;"
- ENone of the above
- A"struct bob { ... };"
41Assuming the legal C variable declaration "person bob;" then the following
declaration must also have been
previously given ("..." represents other appropriate declarations):- A"struct person { ... };"
- B"typedef struct { ... } person;"
- C"typedef struct person bob;"
- D"typedef person bob;"
- ENone of the above
- A"struct person { ... };"
42Given the following legal C declarations
typedef struct node {
int x;
struct node *next;
} *nodeType;- A"nodeType" is a type equivalent to "struct node".
- B"nodeType" is a type equivalent to the type of the "next"
field. - C"nodeType" is not a type,
but really a variable of type "struct node". - D"nodeType" is not a type,
but really a variable of type pointer to a "struct node". - ENone of the above
- A"nodeType" is a type equivalent to "struct node".
43In C, the standard way to request heap storage space while a program is
running is to use the function- Agetmem
- Bnew
- Cmalloc
- Dheap_request
- ENone of the above
44The standard way in C to return heap storage that was previously allocated
is to use the function- Adelete
- Breturn
- Cfree
- Dputmem
- ENone of the above
45In C, it is possible to determine the size of a type
(in bytes) by using the function- Agetsize
- Bsizeof
- CsizeOfType
- DtypeSize
- ENone of the above
46Which of the following C statements is a typical way that dynamic storage
might be allocated?- Aint x = new int();
- Bint *x = (int) getmem(int);
- Cint x = malloc(typeSize(int));
- Dint *x = (int*) malloc(sizeof(int));
- ENone of the above
- Aint x = new int();
47An operating system (OS) provides
- Aa clean and simple model of the computer.
- Bmanages the computer's resources.
- Csupport for the creation and use of user programs.
- Dan abstract view of the computer, independent of the specific hardware.
- ENone of the above
- Aa clean and simple model of the computer.
48Which of the following are program types in an
operating system (OS)?- ASystem programs
- BAdventure games.
- CApplication programs
- DCAPTCHAs (Completely Automated Public Turing test to tell
Computers and Humans Apart). - ENone of the above
- ASystem programs
49Which of the following are layers within an
operating system (OS)?- AMachine language
- BCommand interpreter (shell)
- CPhysical devices
- DMicrocode
- ENone of the above
- AMachine language
50The operating system (OS) is that part of the system which
- Aimplements the editors, compilers, and interpreters used to
create other programs. - Bprovides the command line interpreter (e.g., shell) for users.
- Ccomes pre-loaded on purchased computer hardware.
- D runs in supervisor (or kernel) mode.
- ENone of the above
- Aimplements the editors, compilers, and interpreters used to
51When viewed as an abstract machine, the operating system (OS)
- Aenables Windows and Unix to run at the same time.
- Bhides the details of lower level facilities (e.g., writing data to disk).
- Coperates exactly the way a Turing machine does.
- Dprovides the implementations for data abstractions (e.g., stack,
queue) leveraged by user programs. - ENone of the above
- Aenables Windows and Unix to run at the same time.
52When viewed as a resource manager, the operating system (OS)
- Acoordinates the sharing of parts of the computer by different programs.
- Benables different programs to share the computer hardware.
- Cdetermines when more memory or disk should be purchased.
- Densures that the computer hardware is utilized with optimal
efficiency regarding every user's needs. - ENone of the above
- Acoordinates the sharing of parts of the computer by different programs.
53The most common small computer architecture is the
- Apacket switched.
- Bbus
- Ccircuit switched.
- Dfully connected backplane.
- ENone of the above
- Apacket switched.
54Match the components in the below diagram (indicated by the letters A-G) of a typical small computer system to their names. [Note: No choice is
used more than once, and some may not be used.]
[blank_start]______[blank_end] A
______ B
______ C
______ D
______ E
______ F
______ G- ACPU
- BMemory
- CInput and Output
- DControl bus (or Data bus)
- EAddress bus
- FSystem bus
55The system bus on a small computer system is typically composed of the
- Acontrol bus.
- Baddress bus
- Cdata bus.
- Dmemory bus.
- ENone of the above
- Acontrol bus.
56A bus architecture typically allows
- Aonly a single pair of components to communicate at a time.
- Bone or two different pairs of components to communicate simultaneously.
- Cup to three different components (<strong>not</strong> pairs) to
communicate simultaneously. - Dall components to communicate simultaneously.
- ENone of the above
- Aonly a single pair of components to communicate at a time.
57The internet is an example of a
- Apacket switched architecture.
- Bbus architecture.
- Ccircuit switched architecture.
- Dfully connected architecture.
- ENone of the above
- Apacket switched architecture.
58A computer processor is commonly composed of
- Aan instruction fetch unit.
- Ban instruction decoder.
- Can arithmetic logic unit.
- Da memory interface.
- ENone of the above
- Aan instruction fetch unit.
59Registers in those processors which utilize them
- Aare always grouped into sets of
"register windows". - Bare sometimes dedicated to specific
purposes (e.g., program counter, stack pointer). - Care always general purpose, meaning
they can be used for any activity needing to use a register. - Dusually have the same number of bits as the address bus.
- ENone of the above
- Aare always grouped into sets of
60Processor designs that can speed up computation include:
- Apipelining
- Bmulti-register
- Chyperthreaded
- Dmulti-core
- ENone of the above
61The memory hierarchy in computer design primarily reflects the
- Adesire to reduce single points of failure.
- Btradeoff between speed and cost for a given amount of memory.
- Cdifference between volatile and non-volatile memory technologies.
- Dlarge amounts of certain types of memories.
- ENone of the above
- Adesire to reduce single points of failure.
62A hard disk drive (HDD) can have access times that are
- Aup to 10 million times slower than a register.
- B10-100 times slower than a solid state disk (SSD).
- Conly 100 times slower than main memory (e.g., RAM).
- D1 million times slower than main memory (e.g., RAM).
- ENone of the above
- Aup to 10 million times slower than a register.
63Physical devices are accessed via their
- Acorresponding user level resource managers.
- Bassociated (physical) controllers.
- Cdevice drivers by the operating system (OS).
- Dassociated command interpreter (e.g., shell) programs.
- ENone of the above
- Acorresponding user level resource managers.
64Which of the following are device communications styles used by
operating systems?- ANotify and Sleep
- BBusy waiting
- CInterrup driven
- DDirect Memory Access
- ENone of the above
- ANotify and Sleep
65Approaches currently in common use for "installing" a new device driver
include- Arelinking the device driver object code with the OS kernel.
- Badding the device driver file to an OS config and rebooting.
- Cadding the ".h" file to the OS config, recompiling the kernel,
and then rebooting the system. - Ddynamically loading the device driver code (no reboot).
- ENone of the above
- Arelinking the device driver object code with the OS kernel.
66Device drivers that start an I/O then sit in a tight loop, checking to
see when the operation is complete are using the- ADirect Memory Access communication style.
- BNotify and Sleep communication style.
- CBusy waiting communication style.
- DInterrup driven communication style.
- ENone of the above
- ADirect Memory Access communication style.
67Device drivers that start an I/O but then block, returning control so
that other work can be done until the driver is awakened by an
interrupt are using the- ANotify and Sleep communication style.
- BBusy waiting communication style.
- CInterrup driven communication style.
- DDirect Memory Access communication style.
- ENone of the above
- ANotify and Sleep communication style.
68Device drivers that utilize special hardware to initiate and complete
an entire data transfer are using the- ANotify and Sleep communication style.
- BBusy waiting communication style.
- CInterrup driven communication style.
- DDirect Memory Access communication style.
- ENone of the above
- ANotify and Sleep communication style.
69While the operating system (OS) is handling an interrupt
- Aall other interrupts are disabled to
ensure it completes. - Bonly higher-priority interrupts are enabled.
- Call interrupts continue to be enabled,
since none should be missed. - Donly interrupts of the same kind are enabled.
- ENone of the above
- Aall other interrupts are disabled to
70The boot process for most small computer systems begins with the
execution of the- Ahard disk drive device driver to allow loading of the OS executable file.
- BBasic Input/Output System (BIOS).
- COS executable file directly from the boot device (e.g., HDD, SSD).
- DGRand Unified Bootloader (GRUB).
- ENone of the above
- Ahard disk drive device driver to allow loading of the OS executable file.
71The system calls that an OS makes available
- Acan only be used by the OS.
- Bmust never be used by the OS
- Care the OS interface for user programs.
- Dare provided as a convenience, but aren't really necessary.
- ENone of the above
- Acan only be used by the OS.
72The difference(s) between a program and a process are
- Aprograms are static (non-executing).
- Bprograms are never part of the
operating system. - Cprocesses also contain a run-time stack and program counter.
- Dprocesses make use of system calls, but programs don't.
- ENone of the above
- Aprograms are static (non-executing).
73A process
- Amust use system calls to accomplish
anything useful. - Busually only directly communicates with its parent (or child) process(es).
- Cmay create a child process.
- Dcannot use system calls unless it is being run by the
administrator/root user. - ENone of the above
- Amust use system calls to accomplish
74When a problem or unusual condition is encountered, a process can send
signals to other processes. Processes receiving a signal- Aare required to provide a signal handler.
- Bcan specify specific functions to be called when a particular
type of signal is received. - Crun the function named "sighand" to handle the signal.
- Drun the specified signal handler function, which takes over
execution when the signal is received. - ENone of the above
- Aare required to provide a signal handler.
75Every process is limited by the restrictions placed upon it by the
OS as determined by the process' associated- Aprogramming language in which the code was written.
- Bprogram source code file.
- Cworking directory in the file system.
- Duser identification (uid).
- ENone of the above
- Aprogramming language in which the code was written.
76The address space of a process
- Ais the size of the program file for the process.
- Bis the range of addressable bytes starting at 0 up to a maximum, usually
2^N - 1 (where N is the number of address bits). - Cis the amount of main memory initially
requested/needed by the process. - Dcan be broken into smaller chunks so that programs larger than
the amount of main memory can be executed. - ENone of the above
- Ais the size of the program file for the process.
77System calls must be used to create new
- Aprocesses.
- Buser accounts.
- Cprograms.
- Dfiles or directories.
- ENone of the above
- Aprocesses.
78Every process has an associated
- Asystem call for accessing it.
- Bworking directory in the file system.
- Cuser identification (uid).
- Daddress space.
- ENone of the above
- Asystem call for accessing it.
79A file descriptor is a unsigned number that processes use to reference
(e.g., read, write)- Afiles that the process currently has open.
- Bany file in the file system that the process is permitted to access/open.
- Centries in the process' table of active/open files.
- Dall directories with the same user
identification (uid) as the process. - ENone of the above
- Afiles that the process currently has open.
80In addition to normal user files (e.g., text files) there are
also special files that enable- Ausers to create new file systems.
- Bhard disk drives (HDDs) to look like files.
- Ckeyboards and mice to look like files.
- Dprocesses to directly communicate with one another.
- ENone of the above
- Ausers to create new file systems.
81Every OS has an I/O subsystem that
- Aimplements the details of all read/write
operations. - Bperforms all of the cryptographic functions.
- Cmanages the devices attached to the computer.
- Denforces all of the OS security measures.
- ENone of the above
- Aimplements the details of all read/write
82The command interpreter which provides the non-GUI interface to the OS is
- Aan ordinary program that uses system calls to access the
capabilities of the OS. - Ba special program that directly implements all
of the available commands. - Coften called the "shell".
- Dunique, with each system having only one such program available.
- ENone of the above
- Aan ordinary program that uses system calls to access the
83Which system organization is best described
as having: a set of service procedures that perform system calls;
utility procedures to assist in service procedure implementation;
and a main program that calls requested service procedures?- AMonolithic System
- BLayered System
- CMicorkernel
- DClient-Server
- ENone of the above
- AMonolithic System
84Which system organization is best described
as a sequence of abstractions built one on top of the other?- ALayered System
- BMicorkernel
- CExokernel
- DClient-Server
- ENone of the above
- ALayered System
85Which system organization is best described
as having the absolute minimal portion of the OS facilities running
in kernel/supervisor mode, with the remaining portions running in
user mode?- ALayered System
- BMicorkernel
- CExokernel
- DClient-Server
- ENone of the above
- ALayered System
86Which system organization best enables the
clean separation of policy and mechanism?- ALayered System
- BMicorkernel
- CExokernel
- DClient-Server
- ENone of the above
- ALayered System
87Which system organization is best suited
for distributed systems?- AMonolithic System
- BLayered System
- CMicorkernel
- DClient-Server
- ENone of the above
- AMonolithic System
88Which of the following are examples of a layered OS?
- AMinix v1
- BTHE
- CWindows NT
- DMULTICS
- ENone of the above
- AMinix v1
89Which of the following are examples of a microkernel OS?
- AMinix v1
- BTHE
- CWindows NT
- DMULTICS
- ENone of the above
- AMinix v1
90A virtual machine is designed to
- Amimic any type of hardware so that older software can be run.
- Bprovide "copies" of the existing hardware so that multiple
operating systems can be run at the same time. - Callow the remote (aka "virtual") execution of programs on
non-local hardware. - Denable the use of virtual memory to run processes that require
a larger address space than is otherwise supported by the hardware. - ENone of the above
- Amimic any type of hardware so that older software can be run.
91An OS that runs directly on the hardware with other OSes running on top
of it, is called a(n)- Atype 1 hypervisor.
- Btype 2 hypervisor.
- Cexokernel.
- Dmicrokernel
- ENone of the above
- Atype 1 hypervisor.
92An OS that runs on top of a host OS (that in turn is running on top of
the physical hardware), and which can host other OSes running on top of
it, is called a(n)- Atype 1 hypervisor.
- Btype 2 hypervisor.
- Cexokernel
- Dmicrokernel
- ENone of the above
- Atype 1 hypervisor.
93Software that divides up the underlying physical hardware so that each
running OS has sole access to its assigned hardware is called a(n)- Atype 1 hypervisor.
- Btype 2 hypervisor.
- Cexokernel
- Dmicrokernel
- ENone of the above
- Atype 1 hypervisor.
94A type 1 hypervisor
- Aruns directly on the hardware and the operating systems run in
the hypervisor. - Bruns on top of the host OS (which is running directly on the
hardware). Additional operating systems run in the hypervisor. - Cdivides the hardware up into slices, with each OS running
directly on the hardware. It ensures that each OS
only uses the parts of the hardware is was assigned. - Dprovides a microkernel used by each of the operating systems
running in the hypervisor. Each OS uses the microkernel
system calls to interact with the hardware. - ENone of the above
- Aruns directly on the hardware and the operating systems run in
95A type 2 hypervisor
- Aruns directly on the hardware and the operating systems run in
the hypervisor. - Bruns on top of the host OS (which is running directly on the
hardware). Additional operating systems run in the hypervisor. - Cdivides the hardware up into slices, with each OS running
directly on the hardware. It ensures that each OS
only uses the parts of the hardware is was assigned. - Dprovides a microkernel used by each of the operating systems
running in the hypervisor. Each OS uses the microkernel
system calls to interact with the hardware. - ENone of the above
- Aruns directly on the hardware and the operating systems run in
96An exokernel is different from a virtual machine in that it
- Aruns directly on the hardware and the operating systems run in
the hypervisor. - Bruns on top of the host OS (which is running directly on the
hardware). Additional operating systems run in the hypervisor. - Cdivides the hardware up into slices, with each OS running
directly on the hardware. It ensures that each OS
only uses the parts of the hardware is was assigned. - Dprovides a microkernel used by each of the operating systems
running in the hypervisor. Each OS uses the microkernel
system calls to interact with the hardware. - ENone of the above
- Aruns directly on the hardware and the operating systems run in
97Which of the following mechanisms for running multiple operating systems
make the most efficient use of the common underlying physical hardware?- Atype 1 hypervisor
- Btype 2 hypervisor
- Cmicrokernel
- Dexokernel
- ENone of the above
- Atype 1 hypervisor
98The illusion that multiple processes are running at the same time is
known as- Aparallelism
- Bpseudoparallelism
- Chyperthreading
- Dmultiprocessing
- ENone of the above
99Pseudoparallelism is commonly achieved on a single processor system by
- Aletting each process run to completion.
- Bexecuting each process until it blocks before running the next process.
- Crunning exactly one instruction from each process in
round-robin fashion. - Drapidly switching of the CPU between processes (multiprogramming).
- ENone of the above
- Aletting each process run to completion.
100A process is
- Aanother name for a program.
- Bthe compiled (executable) version of a program.
- Ca program in execution.
- Da program that is either running (in the CPU) or ready, but
not blocked. - ENone of the above
- Aanother name for a program.
101Existing processes in a Unix/Linix/POSIX system can be viewed using
which command/facility?- Atask manager
- Bpwd
- Cps
- DlistAll
- ENone of the above
- Atask manager
102Existing processes in a (Microsoft) Windows system can be viewed using
which command/facility?- Atask manager
- Bpwd
- Cps
- DlistAll
- Enone of the above
- Atask manager
103Which of the following are voluntary reasons for
a process to terminate/exit?- ANormal
- BError
- CFatal
- DKilled
- ENone of the above
104Which of the following are INvoluntary reasons
for a process to terminate/exit?- AKilled
- BNormal
- CError
- DFatal
- ENone of the above
105Processes in a POSIX system exist as a hierarchy because
- Aeach process corresponds to a program file (and files are hierarchical).
- Bexcept for the first process, all other
processes are created by an existing process. - Ceach process corresponds to a user identification, and uids are
arranged hierarchically. - Dof the time frames in which they were created.
- ENone of the above
- Aeach process corresponds to a program file (and files are hierarchical).
106Which of the following is not a state
in which an executing process can exist?- ARunning
- BBlocked
- CReady
- DWaiting
- ENone of the above
107Which of the following is not a
transition between process states?- Arunning to blocked
- Brunning to ready
- Cready to running
- Dblocked to running
- ENone of the above
- Arunning to blocked
108Which of the following transition(s) are accomplished by the scheduler?
- Arunning to blocked
- Brunning to ready
- Cready to running
- Dready to blocked
- ENone of the above
- Arunning to blocked
109Which of the following transition(s) occur as the result of receiving
a signal?- Aready to blocked
- Bblocked to ready
- Crunning to ready
- Dready to running
- ENone of the above
- Aready to blocked
110Which of the following transition(s) are accomplished when an I/O
operation is completed?- Arunning to blocked
- Brunning to ready
- Cblocked to running
- Dblocked to ready
- ENone of the above
- Arunning to blocked
111Which state is a process in when it terminates normally?
- ARunning
- BBlocked
- CReady
- DWaiting
- ENone of the above
112Which state does a process first start in when it is created?
- ARunning
- BBlocked
- CReady
- DWaiting
- ENone of the above
113The process table is an array with each entry containing
- Athe file of the corresponding program.
- Bonly the current program counter for that process.
- Conly the process id number for that process.
- Dall of the associated information for a
single process. - ENone of the above
- Athe file of the corresponding program.
114A process that has been started but has not
yet terminated, is represented by an entry in the process table when
the process is in which of the following states?- ARunning
- BBlocked
- CReady
- DWaiting
- ENone of the above
115The POSIX system call that creates a new process is called
- Anew
- Bcreate
- Cdup
- Dfork
- ENone of the above
116The family of POSIX system calls that replace the current process with a
new one is called- Areplace
- Bexec
- Cdup2
- Dgetpid
- ENone of the above
117The POSIX system call that causes a parent process to wait for a specific
child process to finish is called- Await
- Bwaitpid
- Cfini
- Ddone
- Egetpid
118The POSIX system call, signal is used to
- Asend a signal to another process.
- Bdeclare what signals may be sent to a process.
- Crespond back to a signal sent from another process.
- Dindicate which function should be called when a particular
signal is received by the process. - ENone of the above
- Asend a signal to another process.
119The POSIX system call that moves a running process to the blocked state
is called- Await
- Bbreak
- Cpause
- Dblock
- ENone of the above
120Threads are also commonly referred to as
- Ahyperthreads
- Blightweight processes
- Cexecution traces
- Dshared libraries
- ENone of the above
121When compared to processes, threads
- Aare more limited in the size of their address space.
- Bcannot be used for multiprogramming.
- Ctake the same amount of time for a context switch.
- Dcan be created and destroyed 10-100 times faster.
- ENone of the above
- Aare more limited in the size of their address space.
122Each thread must maintain its own
- Aaddress space.
- Bprogram counter.
- Crun-time stack.
- Dstate (blocked, ready, running).
- ENone of the above
- Aaddress space.
123Every process contains at least
- Aone thread.
- Btwo threads, one each for execution and garbage collection.
- Cthree threads, for execution, signal management, and garbage collection.
- Done child process.
- ENone of the above
- Aone thread.
124Which of the following items belong to the process (rather than to
each of its threads)?- AProgram counter
- BAddress space
- CStatic variables
- DRun-time stack
- EHeap storage
- FRegisters
- GFile descriptors
- HSignal handlers
- IState (blocked, ready, running)
- JNone of the above
- AProgram counter
125Which of the following items belong to each thread (rather than to
the process)?- AProgram counter
- BAddress space
- CStatic variables
- DRun-time stack
- EHeap storage
- FRegisters
- GFile descriptors
- HSignal handlers
- IState (blocked, ready, running)
- JNone of the above
- AProgram counter
126Because the address space is shared by the process' threads, care
must be taken (to avoid race conditions)
when- Acalling the same function from multiple threads.
- Breading/setting values for the same static variables and heap
allocated objects from multiple threads. - Ccreating new threads.
- Da thread terminates.
- ENone of the above
- Acalling the same function from multiple threads.
127The POSIX pthread library call that creates a new thread is called
- Apthread_new
- Bpthread_fork
- Cpthread_create
- Dpthread_dup
- ENone of the above
128The POSIX pthread library call that returns the thread's identification is
called- Apthread_getid
- Bpthread_self
- Cpthread_pid
- Dpthread_thread_id
- ENone of the above
129The POSIX pthread library call that terminates the calling thread is called
- Apthread_exit
- Bpthread_terminate
- Cpthread_yield
- Dpthread_return
- ENone of the above
- Apthread_exit
130The POSIX pthread library call that blocks the calling thread, resuming
when the indicated thread completes, is called- Apthread_wait
- Bpthread_block
- Cpthread_pause
- Dpthread_join
- ENone of the above
131The POSIX pthread library call that moves a running thread to the blocked
state is called- Apthread_block
- Bpthread_yield
- Cpthread_stop
- Dpthread_pause
- ENone of the above
132Threads that are managed in user/process space
- Arequire the OS to be thread aware.
- Brequire the process to keep track of the threads via a thread
table (in addition to the process table that the OS maintains). - Cenable context switching that is about 10x faster than kernel space threads.
- Dcause the entire process to block if any one of its threads blocks
for a system resource. - ENone of the above
- Arequire the OS to be thread aware.
133Threads that are managed in kernel space
- Arequires the OS to be thread aware.
- Brequires the process to keep track of the threads via a thread
table (in addition to the process table that the OS maintains). - Cenables context switching that is about 10x faster than
user/process space threads. - Dcause the entire process to block if any one of its threads blocks
for a system resource. - ENone of the above
- Arequires the OS to be thread aware.
134Thread pools are collections of already allocated/created threads that
- Aare assigned as requested to reduce the costs of thread creation
and destruction. - Bare only beneficial for user/process space managed threads.
- Care only beneficial for kernel space managed threads.
- Dprevent an over abundance of threads, if the pool is the only
means for acquiring a thread. - ENone of the above
- Aare assigned as requested to reduce the costs of thread creation
135Hybrid User-Kernel space thread management allocates
- Aone or more kernel threads to a process, with the process able
to start multiple user threads within each kernel thread. - Bexactly one user space and one kernel space thread to each process.
- Cany number of user space and kernel space threads to each process as long as
they are requested from the corresponding user and kernel thread pools. - Donly user space threads, but enables the kernel to recognize when
a user thread is blocked. - ENone of the above
- Aone or more kernel threads to a process, with the process able
136Scheduler activations use
- Akernel space threads, but only the process schedules them.
- Bkernel space threads, but the process recommends to the OS
which thread to schedule/run next. - Cuser space threads, but the kernel recognizes when a blocked
thread doesn't prevent other threads from running. - Dboth user and kernel space threads for a process, with each
thread type being scheduled as it normally would be. - ENone of the above
- Akernel space threads, but only the process schedules them.
137The key issues for interprocess communication are
- Amessage passing.
- Bsharing information.
- Csemaphores
- Dsequencing process interactions.
- ENone of the above
- Amessage passing.
138A race condition exists when
- Atwo or more processes share the same variable.
- Bonly user space threads are used for multiprogramming.
- Conly kernel space threads are used for multiprogramming.
- Ddifferent execution orderings of instructions in multiple threads/processes
can produce different results. - ENone of the above
- Atwo or more processes share the same variable.
139Race conditions can occur when
- Atwo or more threads/processes can read (but
not change) the same variable(s). - Btwo or more threads/processes can read and write the same
variable(s) via UNinterruptible actions. - Ctwo or more threads/processes can read and write the same
variable(s) via interruptible actions. - Dwhen there is a mix of user space and kernel space threads
within the same process, but no shared variable(s). - ENone of the above
- Atwo or more threads/processes can read (but
140A critical section is a portion of executable code
- Athat makes system calls.
- Bin which only one thread (or process) should be active at a time.
- Cthat is protected by one or more semaphores.
- Dwhich is shared by multiple threads.
- ENone of the above
- Athat makes system calls.
141Critical sections should be as small as possible because
- Alarger critical sections run more slowly.
- Bthis reduces the amount of process blocking.
- Cthere is a maximum code size for which semaphores will work.
- Dthey must run completely through
without blocking. - ENone of the above
- Alarger critical sections run more slowly.
142Which of the following help to prevent difficulties when simultaneous
threads/processes share data?- ANo 2 threads/processes are in their critical sections at the same time.
- BNo assumptions are made about process execution speeds.
- CNo thread/process should wait arbitrarily long to enter its
critical section. - DNo thread/process outside its critical section should block other
threads/processes. - ENone of the above
- ANo 2 threads/processes are in their critical sections at the same time.
143Allowing processes to disable interrupts to prevent their being
interrupted while in their critical section(s) is
not a desirable solution since- Ait requires process threads to run in kernel space.
- Bit requires process threads to run in user space.
- Ca user program could use this to hog the CPU.
- Dit fails to work if there are multiple CPUs.
- ENone of the above
- Ait requires process threads to run in kernel space.
144Strict alternation of processes can be accomplished by setting and
repeatedly checking a shared variable (i.e., spin locking), but this- Ais only suitable if the expected wait time is very short.
- Bsolution only works for two processes (or threads).
- Csolution only works if there is only a single CPU involved.
- Dis wasteful of the CPU resource.
- ENone of the above
- Ais only suitable if the expected wait time is very short.
145Peterson's solution uses what mechanism(s) to implement mutual exclusion
for a critical section?- Adisabling interrupts.
- Bkernel space threads.
- Clock variable(s).
- Dbusy waiting.
- ENone of the above
- Adisabling interrupts.
146A test and set instruction is special because it
- Aruns with interrupts disabled.
- Bdoes the value copy and set as a single indivisible action.
- Cworks by performing the busy wait within a single instruction.
- Dlocks the memory bus.
- ENone of the above
- Aruns with interrupts disabled.
147The priority inversion problem occurs when a busy waiting solution
for critical section access is used and- Athe busy waiting process/thread has a higher priority.
- Bthe busy waiting process/thread has a lower priority.
- Cthe busy waiting process/thread is a user space thread.
- Dthe busy waiting process/thread is a kernel space thread.
- ENone of the above
- Athe busy waiting process/thread has a higher priority.
148The key feature(s) of the TSL instruction which allows it to implement
critical section access is- Aonly being callable by the OS (and not by
user programs). - Bsaving the current value of a register while the register's
value is set to a new value. - Cblocks if the value being assigned is different from the current
value of the register. - Dthat it is atomic (i.e., cannot be interrupted once begun).
- ENone of the above
- Aonly being callable by the OS (and not by
149Assuming that sleep (causing the calling process to
block) and wakeup (which unblocks the indicated
process) are system calls, then they can be used to implement critical
sections if the following condition(s) are kept:- Awakeup signals are not
buffered. - Bsleep cannot be called by an already blocked process.
- Conly strict alternation of critical sections is implemented.
- Dwakeup is never called
first. - ENone of the above
- Awakeup signals are not
150The sleep (causing the calling process to block) and
wakeup (which unblocks the indicated process)
calls enable- Astrictly alternating critical sections to be protected
without busy waiting. - B2) strictly alternating critical sections to be protected but only
when a test and set instruction is available. - Cthe protection of any critical section so long as
wakeup is never
called first. - Dthe protection of any critical section so long as
sleep is never
called twice in a row. - ENone of the above
- Astrictly alternating critical sections to be protected
151The sleep (causing the calling process to block) and
wakeup (which unblocks the indicated process)
calls, can only support strictly alternating critical sections because- Asleep only blocks a process for a maximum period of
time. - Bsleep cannot be called by an already blocked process.
- Cwakeup cannot unblock a process that called
sleep twice in a row. - Dwakeup calls are not
buffered. - ENone of the above
- Asleep only blocks a process for a maximum period of
152Semaphores were introduced in 1965 by
- AGary Peterson
- BAndrew Tannenbaum
- CEdgar Dijkstra
- DAlan Turing
- AGary Peterson
153The P (DOWN) semaphore operation is best
described by- Acount--; if (count <= 0) { sleep(); }
- Bsleep(); if (count <= 0) { count--; }
- Cif (count <= 0) { count--; } sleep();
- Dif (count <= 0) { sleep(); } count--;
- Acount--; if (count <= 0) { sleep(); }
154The V (UP) semaphore operation is best
described by- Aif (count == 1) { wakeup(sleeping_process); } count++;
- Bif (count == 1) { count++; } wakeup(sleeping_process);
- Cwakeup(sleeping_process); if (count == 1) { count++; }
- Dcount++; if (count == 1) { wakeup(sleeping_process); }
- Aif (count == 1) { wakeup(sleeping_process); } count++;
155The starting value (count) of a semaphore indicates the number of
- Atotal times that the semaphore can be used (e.g., P/DOWN operations).
- Bavailable items of that resource.
- Cdifferent types of resources.
- Dconcurrent processes (but not threads)
that can share the resource(s).
- Atotal times that the semaphore can be used (e.g., P/DOWN operations).
156If semaphores are compared to having copies of a book in the library, then
- AP/DOWN is the equivalent of checking out a book.
- BP/DOWN is the equivalent of returning a book.
- CV/UP is the equivalent of checking out a book.
- DV/UP is the equivalent of returning a book.
- AP/DOWN is the equivalent of checking out a book.
157The semaphore operations of P/DOWN and V/UP
must- Abe system calls.
- Bbehave atomically (i.e., uninterruptible).
- Cbe implemented in the OS kernel.
- Dbe implemented by the computer hardware.
- Abe system calls.
158A mutex is a binary semaphore that
- Ais implemented using lock variables.
- Buses sleep and wakeup calls
for its implementation. - Cis implemented using monitors.
- Dis optimized for having only two values/states.
- Ais implemented using lock variables.
159Monitors, unlike semaphores, must be
implemented as- Aa (system) library so that different languages can share the
same implementation. - Bpart of the programming language design.
- Cpart of the OS design.
- Da feature within the computer hardware.
- Aa (system) library so that different languages can share the
160Monitors are most easily adapted to programming languages that support
- Aclasses (e.g., Java).
- Brecords/structures (e.g., C).
- Cfunctions (e.g., C, Cobol, Fortran).
- Dconditional looping constructs, like "while" (e.g., C, Java).
- Aclasses (e.g., Java).
161What feature in Java can be used to implement a monitor?
- Avirtualized
- Btry-catch
- Cfinalized
- Dsynchronized
162A different semaphore associated with each object instance can be used
to implement a monitor by having each- Aobject do P/DOWN when it is created and a V/UP when it is destroyed.
- Bobject do V/UP when it is created and a P/DOWN when it is destroyed.
- Cobject method do P/DOWN when begun, and V/UP just before returning.
- Dobject method do V/UP when begun, and P/DOWN just before returning.
- Aobject do P/DOWN when it is created and a V/UP when it is destroyed.
163Which of the following interprocess communication mechanisms is well
suited for distributed sharing (i.e., across multiple computer systems)?- Alock variables
- Bsemaphores
- Cmonitors
- Dmessage passing
- Alock variables
164Message passing, like semaphores (and unlike monitors),
- Acan easily be implemented as a (system) library so that different
languages can share the same implementation. - Bmust be part of the programming language
design. - Cmust be part of the OS design.
- Dmust be a feature within the computer hardware.
- Acan easily be implemented as a (system) library so that different
165The "send" and "receive" system calls for message passing generally
- Amust be used in conjunction with semaphores
to perform the coordination (e.g., to ensure the "receive"r is ready
and waiting when the "send" is done). - Bcan only be used when the communicating processes are on different systems.
- Care considered impractically for efficiency reasons, and thus are
seldom used. - Dmust indicate the message contents and
destination (for "send") and a place to store the message and the
source (for "received").
- Amust be used in conjunction with semaphores
166Which of the following are typical design issues associated with messages?
- AHandling lost (or missing) messages.
- BMinimum message size.
- CMaximum time between messages.
- DMessages are received in the order they were sent.
- AHandling lost (or missing) messages.
167A popular system that implements message passing, developed in the
early 1990s, and available for a variety of different languages
(e.g., Java, Python, C) is called- AThe Messaging Library (TML)
- BMessage Passing Interface (MPI)
- CDistributed Messaging Library (DML)
- DDistributed Process Communication (DPC)
- AThe Messaging Library (TML)
168When a message passing system causes the sender to block until the
receiver is ready (and vice versa), these semantics are called a- Arendezvous
- Bdate
- Ccoupling
- Dsynch-up.
169The mechanism in POSIX systems that provides a maximum size "mailbox"
that causes the writing/sending process to block once the "mailbox"
becomes full (allowing the writer/sender to proceed only when there
is room in the "mailbox" - perhaps due to the receiver reading/removing
items), is called- Amail
- Bspooling
- Cpipes
- Dconduits
170Barriers are useful when a number of different threads/processes need to
- Atake turns working on a common task.
- B<strong>must all meet at a common place before
proceeding to the next phase of a computation. - Cshare a set of common variables/objects.
- Dnone of the threads/processes are allowed to go past
a certain point in the computation.
- Atake turns working on a common task.
171If all the threads/processes take very
close to the same amount of time to reach the barrier, then a good
way of implementing the barrier is- Aspin locks.
- Bsemaphores
- Cmonitors
- Dmessage passing.
- Aspin locks.
172The Dining Philosophers Problem is a synchronization problem developed
by Edgar Dijkstra to- Ashow how monitors can handle situations that semaphores cannot.
- Bshow how semaphores can handle situations that message passing cannot.
- Cdemonstrate the use of semaphores.
- Ddemonstrate the use of message passing.
- Ashow how monitors can handle situations that semaphores cannot.
173The Dining Philosophers Problem is comprised of
- A5 philosophers each with a plate of slippery pasta.
- Bphilosophers needing to take turns eating, going around the
table in a clockwise fashion. - C5 forks, one between each philosopher.
- Dphilosophers needing 2 forks to eat.
- A5 philosophers each with a plate of slippery pasta.
174If no process within a group of processes is able to run because they
are all in the blocked state, and each
is waiting for the other to do something before it can continue, this
situation is called- Astarvation
- Bdeadlock
- Clivelock
- Dmutual stall.
175If all the processes within a group of
processes is able to run (i.e., none are in the blocked state), but
none is able to accomplish any useful work for lack of a resource,
this situation is called- Astarvation
- Bdeadlock
- Clivelock
- Dresource hogging.
176In the Dining Philosophers Problem, if each philosopher grabs a fork and
holds it until they are able to grab a second fork, this- Aleads to starvation.
- Bleads to deadlock.
- Cleads to livelock.
- Dprovides a correct solution.
- Aleads to starvation.
177In the Dining Philosophers Problem, if each philosopher grabs the fork
to their right, then seeing that the left fork is unavailable (having
been grabbed by the philosopher to their left) puts down the fork they
are holding, counts to 10, then tries again. This algorithm- Aleads to livelock.
- Bleads to deadlock.
- Cleads to resource hogging.
- Dprovides a correct solution.
- Aleads to livelock.
178The key to one working solution of the Dining Philosophers Problem is to
have philosophers exist in one of three states (THINING, HUNGRY, EATING)
and that when a philosopher is- Afinished EATING, she ensures that any HUNGRY philosopher sitting
next to her gets an opportunity to eat. - BHUNGRY, she waits until each of her neighbors is THINKING before
trying to pick up forks. - CTHINKING, she waits until a neighbor is also THINKING before becoming HUNGRY.
- Dfinished THINKING, she waits until one of her neighbors is EATING
before becoming HUNGRY.
- Afinished EATING, she ensures that any HUNGRY philosopher sitting
179The Readers and Writers Problem involves multiple processes trying to
read or write to the same shared variable, in which- Aonly one reader or writer can access the variable at a time.
- Bonly one reader or multiple writers can access the variable at a time.
- Cmultiple readers or a single writer can access the variable at a time.
- Dmultiple readers or multiple writers can access the variable at a time.
- Aonly one reader or writer can access the variable at a time.
180The primary types of solutions to the Readers and Writers Problem are when
- Awriters are given preference over readers.
- Breaders are given preference over writers.
- Creaders and writers have simultaneous access so that no
preference is given to either one. - Dreaders and writers strictly alternate, with every read followed
by a write and every write followed by a read.
- Awriters are given preference over readers.
181The scheduler is that part of the OS that
- Astarts a new process.
- Bmanages the CPU.
- Cdetermines when a blocked process becomes ready.
- Ddetermines when a running process blocks.
- Astarts a new process.
182The ability of the OS to switch from running one process to another
process VERY quickly is important because it- Areduces the chance of an OS bug causing a problem.
- Bincreases the efficient use of the CPU.
- Chelps reduce the response time for interactive users.
- Densures peripheral resource availability.
- Areduces the chance of an OS bug causing a problem.
183Regarding the set of concerns that a process scheduling algorithm
should address,- Aall of them can be effectively address by a
single algorithm. - Ban OS should use two or more scheduling algorithms alternately
so as to address all of the concerns. - Conly a couple of the concerns are truly important, and the
remainder can be safely ignored. - Dsome of the concerns are contradictory, so invariably
not all concerns can be addressed by
the OS.
- Aall of them can be effectively address by a
184With respect to process scheduling, it is helpful to view a process as
- Abeing primarily CPU bound.
- Bbeing primarily I/O bound.
- Can intense period of CPU usage.
- Dalternating sequences of CPU usage and waiting for I/O.
- Abeing primarily CPU bound.
185A CPU bound process is one in which
- Ait spends most of its time in the ready or running state.
- Bit spends most of its time in the blocked state.
- Conce it obtains the CPU, it runs to completion.
- Dmost of the time it's waiting for the memory to be available.
- Ait spends most of its time in the ready or running state.
186An I/O bound process is one in which
- Ait spends most of its time in the ready or running state.
- Bit spends most of its time in the blocked state.
- Conce it obtains the CPU, it runs to completion.
- Dmost of the time it's waiting for the memory to be available.
- Ait spends most of its time in the ready or running state.
187Preemptive scheduling is when a process
- Aspends most of its time in the ready or running state.
- Bspends most of its time in the blocked state.
- Ccan be booted out of the CPU by the scheduler, before the
process is finished. - Dcan be booted out of the CPU by another user process, before the
process is finished.
- Aspends most of its time in the ready or running state.
188Non-preemptive scheduling is when a process
- Aspends most of its time in the ready or running state.
- Bspends most of its time in the blocked state.
- Cnever becomes blocked.
- Dalways runs to termination
once it's in the CPU. - ENone of the above
- Aspends most of its time in the ready or running state.
189Which type of process scheduling is
best
suited for interactive processing?- Anon-preemptive.
- Bdedicated
- Cbusy wait.
- Dpreemptive
- Anon-preemptive.
190Which of the following are batch process scheduling algorithms?
- APriority Scheduling.
- BFirst Come, First Serverd.
- CGuaranteed Scheduling.
- DShortest Remaining Time.
- APriority Scheduling.
191The following steps describe which process scheduling algorithm?
Processes are added to a single queue in the order they are started.
The process at the front of the queue is run until it either completes, or blocks.
Once a process becomes ready again (after being blocked), it joins the end of the queue.- ARound Robin Scheduling.
- BFirst Come, First Served.
- CGuaranteed Scheduling.
- DFair-Share Scheduling.
- ARound Robin Scheduling.
192Which of the following process scheduling algorithms needs to know the
typical amount of time that a process often takes to complete?- AGuaranteed Scheduling.
- BShortest Job First.
- CPriority Scheduling.
- DFair-Share Scheduling.
- EShortest Remaining Time.
- AGuaranteed Scheduling.
193Which of the following process scheduling algorithms favors CPU bound
over I/O bound processes?- AFirst Come, First Served
- BShortest Job First
- CShortest Remaining Time
- DGuaranteed Scheduling.
- AFirst Come, First Served
194Which of the following process scheduling algorithms improves the average
turnaround time on a batch system?- AFirst Come, First Served
- BShortest Job First
- CShortest Remaining Time
- DGuaranteed Scheduling.
- AFirst Come, First Served
195Which of the following process scheduling algorithms improves the average
throughput on a batch system?- AFirst Come, First Served
- BShortest Job First
- CShortest Remaining Time
- DGuaranteed Scheduling.
- AFirst Come, First Served
196The following steps describe which process scheduling algorithm?
Processes are chosen to run from the front of a single ready queue.
Each process can run a max time called a quantum.
Processes may block before all of their time quantum is used.
As processes become ready, they go to the end of the ready queue.- AFirst Come, First Served.
- BRound Robin Scheduling.
- CPriority Scheduling.
- DFair-Share Scheduling.
- AFirst Come, First Served.
197The following steps describe which process scheduling algorithm?
Each process has a priority.
The ready process with the highest priority runs next.
Priorities can be set statically and/or dynamically.- ARound Robin Scheduling.
- BGuaranteed Scheduling.
- CPriority Scheduling.
- DFair-Share Scheduling.
- ARound Robin Scheduling.
198The following steps describe which process scheduling algorithm?
Each queue corresponds to a different max time quantum to run.
If a process uses all of its time quantum, it's added to the end of the next highest quantum queue when it's moved to the ready state.
If a process blocks before exhausting its time quantum, it's added to the end of the next lowest quantum queue when it's moved to the ready state.
The processes in queues with larger quantum are run less frequently.- ARound Robin Scheduling.
- BMultiple Queues.
- CPriority Scheduling.
- DFair-Share Scheduling.
- ARound Robin Scheduling.
199Which process scheduling algorithm(s) are particularly well suited to
very slow context switching?- AGuaranteed Scheduling.
- BMultiple Queues.
- CLottery Scheduling.
- DFirst Come, First Served.
- AGuaranteed Scheduling.
200Which process scheduling algorithm(s) are particularly well suited to
enforcing an advertised policy?- AMultiple Queues.
- BGuaranteed Scheduling.
- CLottery Scheduling.
- DFair-Share Scheduling.
- AMultiple Queues.
Informações
- Descrição
- Midterm review
- Autor
- sosa_savannah
- Idioma
- English
- Visualizações
- 50
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz