Quiz
osstudy1
Erstelle ein kostenloses Konto, um dieses Quiz zu beenden
Speichere deinen Fortschritt und sieh dir dein Endergebnis an.
oder mit deiner E-Mail registrieren
Schon ein Konto? Anmelden
Fragen in diesem Quiz (200)
1According to file-io.pdf from Week 5, which answer choice is called after all I/O has been completed, in order to release the file descriptor fd and its associated kernel resources?
- Astatus = close(fd)
- Bfd = open(pathname, flags, mode)
- Cnumread = read(fd, buffer, count)
- Dnumwritten = write(fd, buffer, count)
- EThere is no answer choice that has that behavior
2According to Dr. Grant's lecture on September 27, 2022 (processes-ia.pdf), which of the following statements about the process control block (PCB) are NOT true?
- ACan control the entire operating system's information
- BContains the process elements
- CPossible to interrupt a running process and later resume execution
- DCreated and managed by the operating system
- EKey tool that allows support for multiple processes
3According to Table 3.2 in processes-i.pdf from Week 6, which of these is NOT a reason for process termination?
- ANew batch job
- BI/O failure
- CParent request
- DInvalid Instruction
4According to Dr. Grant’s week 6 presentation and lecture “Processes”, which of the following is true?
- AVariables that are defined within contexts are stored on the stack and will be there until we free it
- BVariables stored on the heap are only alive within the context of the function
- CIf you create something dynamically within a function, it would still exist once we leave the context of that function
- DGlobal variables are stored in the same place as local variables (stack and heap)
5According to Dr. Grant's lecture 12, what will be the output of the following code?
#include <stdio.h>
#include <string.h>
int main() {
unsigned char str[] = {'s', 't', 'r', 'i', 'n', 'g', '\0'};
printf("%s", str);
printf("%lu",strlen(str));
printf("%lu",sizeof(str));
return 0;
}- Astring67.
- Bstring66.
- Cstring77.
- Dstring76.
- Egnirts67.
6According to Dr. Grant's lecture on processes-i on September 27th, what mode are Unix SVR4's system processes run?
- Akernel mode
- Buser mode
- Cexecution mode
- Dstate mode
- Eprogram mode
7During Dr. Grant's lecture on September 27th [Processes-i], which of the following variables is a string literal?
- Achar *name = "name";
- Bchar name[4] = {"n","a","m","e"};
- Cstring name = "name";
- Dchar name[4] = "name";
8In Dr. Grants lecture 10 & 12 (File io) & (Project 0 tips) from week 5 & 6, The GNU Debugger (GDB) was discussed and used to debug a segmentation fault. What command can be used in GDB to enter the Text User Interface to see your code while you debug it?
- ATUI enable
- BTUI disable
- Cbreak
- Dnext or n
- Erun or r
9According to the processes-i.pdf from Week 6, what should be inserted into the given field in the following code to successfully let both parent and child run their corresponding code and keep track of the child?
pid_t childPid;
switch({CODE TO INSERT}) {
case -1:
/* Handle errors */
case 0:
/*Perform child actions*/
default:
/* Perform parent actions */
}- AchildPid = fork()
- BparentPid = fork()
- Cfork()
- DchildPid
10According to syscall lecture from Week 5, which answer is not correct about syscall process?
- AEach sys call is referenced by same number
- BThere is one common entry point for all system calls: this is done through the sys call "trap" instruction
- CEach has its own set of argument to be transferred
- DThe trap instruction switches the processor state from user to kernel mode
- EThe trap handler function then translates the sys call number into an appropriate function call
11According to process-i.pdf from week 6, after a process has been created, the Kernel can do one of the following as part of the dispatcher routine, which one can/should it not do?
- Aignore all and not send the signals
- Bstay in the parent process
- Ctransfer control to the child process
- Dtransfer control to another process
12According to "processes-i.pdf" covered in week 6, which of the following is NOT a task completed by the OS in Kernel mode during process creation?
- ATransfer control to the child process
- BAssign the child process to the Ready to Run state
- CCopy process image of the parent, with the exception of shared memory
- DAllocate slot in process table for the new process
- EAssign unique process ID to the child process
13According to processes-ia.pdf from Week 6, which of the following statements are true about traps and interrupts?
- AInterrupts relate to events external to a running process. Traps relate to errors and exceptions generated inside of a running process.
- BTraps make use of a 'Time Slice' which is the maximum amount of time a process can run before the trap is executed.
- CInterrupts execute due to memory faults and clock interrupts, while traps are typically executed due to I/O interruptions.
- DInterrupts handle errors and exceptions while traps react to events that are asynchronous and external to a process.
- EBoth interrupts and traps make calls to an operating system function.
14According to Dr. Grant's lecture on processes from week 6, In the memory layout of a C program, what is the order of memory from lowest to highest?
- A1. text 2. initialized data 3. uninitialized data 4. heap 5. stack 6. argc/argv
- B1. uninitialized data 2. initialized data 3. heap 4. stack 5. argc/argv 6. text
- C1. heap 2. stack 3. initialized data 4. uninitialized data 5. argc/argv 6. text
- D1. argc/argv 2. heap 3. text 4. initialized data 5. stack 6. uninitialized data
- E1. argc/argv 2. stack 3. heap 4. uninitialized data 5. initialized data 6. text
15According to file-io.pdf from Week 5, which of the commands below runs a program called progTest and takes an input from the file input.txt and outputs to the file output.txt with errors being put into the file errorCapture.txt.
- A./progTest >output.txt 2>errorCapture.txt <input.txt
- BprogTest > input.txt <output.txt 2<errorCapture.txt
- C./progTest >errorCapture.txt >output.txt <input.txt
- D./progTest >errorCapture.txt 2>output.txt <input.txt
- E./progTest <output.txt 2<errorCapture.txt >input.txt
16According to Dr. Grants lecture on September 20th 2022 (Syscalls), Which of the following is NOT a example of a syscall function?
- Astrcpy()
- Bread()
- Cclose()
- Dcreat()
- Ewrite()
17According to the processes-i powerpoint, which of these is lowest in the memory layout of a C program?
- Ainitialized data
- Barc, argv
- Cheap
- Dstack
- Euninitialized data
18According to Dr. Grant's Lecture 11 (processes i) not all types of files can moved through with the lseek() function. Which of the following *cannot* be navigated with lseek()?
- Apipe
- Bzip
- Cjson
- Ddat
- Etxt
19Some processes simply perform a task and exit or have no need to interact with other processes on the system. These are called independent processes. When a process needs to communicate information or affect another process on the system, it is called a cooperating process. According to Silberschatz (Operating System Concepts), the principal reasons for cooperating processes are:
- AInformation sharing, computation speedup, and modularity
- BModularity and transparency
- CComputation speedup, obfuscation, and memory reduction
- DRedundancy, data retention, and networking
- ELower latency and improved context switching
20Dr. Grant's September 27, 2022 lecture references process-ia.pdf in week 6.
The Change of Process State slide shows the steps in a full process switch.
What are the last three steps in order?- AUpdate the process control block of the process selected -> Update memory management data structures -> Restore the context of the processor to that which existed at the time, the selected process was last switched out
- BRestore the context of the processor to that which existed at the time, the selected process was last switched out -> Update memory management data structures -> Update the process control block of the process selected
- CRestore the context of the processor to that which existed at the time, the selected process was last switched out -> Update the process control block of the process selected -> Update memory management data structures
- DUpdate the process control block of the process selected-> Restore the context of the processor to that which existed at the time, the selected process was last switched out -> Update memory management data structures
21According to file-io.pdf from Week 5, how to open file to read only? File* fd=open(pathname, ******);
- AO_RDONLY
- BO_WRONLY
- CO_RDWR
- DO_CREAT
- EreadOnly
22According to file-io.pdf from Week 5, which answer choice describes what happens with this system call?
fd = open(pathname, flags, mode)- Aopens the file identified by pathname, returning a file descriptor.
- Breads at most count bytes from the open file referred to by fd and stores them in buffer.
- Cwrites up to count bytes from buffer to the open file referred to by fd.
- Dis called after all I/O has been completed, in order to release the file descriptor fd and its associated kernel resources.
- EThis is an invalid system call.
23According to file-io.pdf from the Week 5 module, as well as Dr. Grant's Lecture #9 (Syscalls) from September 20th, 2022, which of the following answer choices is NOT an example of a standard file descriptor in C?
- Astdex
- Bstdin
- Cstdout
- Dstderr
24According to syscalls.pdf from Week 5, which answer choice is true regarding the following terminal input
./myprog <input.txt >output.txt 2>error.txt- Astdin is mapped to input.txt
- Bstdout is mapped to input.txt
- Cstderr is mapped to output.txt
- Dinput.txt is the new process/program to be run
- Emyprog is deleted
25According to system_calls.pdf from the Week 5 module, which of the following system calls creates a new file independent of passed in flags and returns the file descriptor, or -1 on error?
- Aint creat(const char *pathname, mode_t mode);
- Bssize_t read(int fd, void *buffer, size_t count);
- Cssize_t write(int fd, void *buffer, size_t count);
- Dint close(int fd);
- Eint open(pathname, flags, mode);
26From Week 5: Project 0's instructions and summary of how Unicode + code points work.
Question:
Assume you are working with Unicode. You want to encode in a character with 2 bytes. What would the first bits of the leading byte look like?- A110
- B10
- C1110
- D0
- E11110
27According to the project 0 instructions, when looking at a binary representation of a character, which of the following is true?
- A4 bits is a nibble and two nibbles is a byte
- Ba byte and a nibble have the same number of bits
- Ceach number is a nibble and two nibbles is a byte
- Dtwo bits is a nibble and two nibbles is a byte
- Eyou take two nibbles and a bite of a cookie to eat it
28According to file-io.pdf from the Week 5 module, as well as Dr. Grant's Lecture #9 (Syscalls) from September 20th, 2022 what are the parameters for the open system Call?
- Aopen(pathname, flags, mode)
- Bopen(fd)
- Copen(mode, flags, pathname)
- Dopen(fd, buffer, count)
- Eopen(pathname, fd, buffer)
29According to Dr. Grant's CS-3113 Powerpoint File-IO Lecture 10, which of the following operations correctly represent permissions that are listed: The user has permission to read, write, and execute; the group has permission to read and execute; Others have permission to read?
- AS_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH
- Bdrwxrw-rwx
- CChmod 777
- DS_IRUSR | S_IWUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IWOTH
- EChmod 745
30According to Dr. Grant's Lecture 11 (processes-i) on September 27, 2022 and processes-i.pdf from Week 6, which of the following is the highest memory in the memory layout of a C program?
- Acommand line arguments
- Bstack
- Cheap
- Duninitialized data
- Etext
31According to Dr. Grant's lecture on September 20th, 2022 (Lecture 9 File-io), which of the following is not a flag for the open() function?
- AO_PEDANTIC
- BO_RDONLY
- CO_RDWR
- DO_WRONLY
- EO_CREAT
32According to Dr. Grants lecture 9 (Syscalls) from week 5, if you wanted to print out a description of your error to STDOUT which syscall would you use?
- Aperror()
- Bopen()
- Cread()
- Dwrite()
- Eclose()
33According to Dr. Grant's week 5, lecture 10 (File io), given the binary octet file permissions: [000] [000] [111] who can read, write, and execute?
- Athe world
- Bthe user
- Cthe group
- Duser, group, and world
- EDr. Grant only
34According to file-io.pdf from Week 5, which of the following values is returned when there is a error trying to close a file.
Example code for closing a file: int close(int fd);- A-1
- B0
- C1
- D2
- ENULL
35According to Dr. Grant's CS 3113 lecture 10 on File IO, when using malloc or calloc, how can memory leak be prevented?
- Afree(myarray)
- Bclose(myarray)
- Copen(myarray)
- Dopen(fd)
- EThere won't be memory leak issues
36According to system_calls.pdf from Week 5, what is the proper way to type a Macro?
- A#define KEY
- B//define KEY
- C/* define KEY */
- D"""define KEY
- E<!-- define key -->
37According to Dr. Grant's lecture and syscalls.pdf on Thursday, September 22, 2022, which is not a way to assign macros to help with defining the compiling context?
- Afd = open("macros", O_MCRO);
- B#define MY_CONTEXT
- C#define MY_VERSION 7
- Dgcc -DMY_CONTEXT hello.c -o hello
- Egcc -DMY_VERSION=7 hello.c -o hello
38According to system_calls.pdf from week 5, which syscall is used to print an error message and a description of the error encoded by errno to STDERR?
- AerrExit(<str>)
- Bperror(<str>)
- Cprintf(<str>)
- Dread(fd, buffer, count);
- Ewrite(fd, buffer, count);
39According to processes-i.pdf from Week 6, what does the wait() function return on error?
- A-1 on error
- BNULL
- C0
- DID of terminated child
- E2
40According to Dr. Grant's lecture on on September 20th, 2022 (Lecture 9 Syscalls), what line of code do we need to add above the printf( "The input data was: %s\n", buffer); line in order for the string to be complete?
#define MAX_read 20
char buffer[MAX_READ + 1];
ssize_t numRead;
numRead = read(STDIN_FILENQ, buffer, MAX_READ);
if (numRead == -1)
errExit("read");
What line goes here?
printf("The input data was: %s\n", buffer);- Abuffer[numRead] = '\0';
- Bbuffer[numRead] = '\n';
- Cbuffer[numRead] = "\n";
- Dbuffer[numRead] = numRead;
- Ebuffer[numRead] = MAX_READ;
41According to Dr. Grant's CS-3113 Lecture 10: File IO and the system_calls.pdf from Week 5, what does the command strace do?
- Astrace lets you actually see the system calls that are run by each of our programs, by any program that we have.
- Bstrace traces your last few commands used.
- CIt gives a dump of data in hexadecimal format.
- DIt returns a value indicating success/status or an error of a system call wrapper.
- EIt is GDB which is a GNU debugger.
42According to Dr. Grant on September 27th, which of the follow can you not call lseek on? (i.e. it will return an error)
- ATerminal input.
- B.zip
- C.json
- D.txt
- E.rtf
43According to Dr. Grant's lecture on September 27th 2022 (Processes), where are global variables initialized global variables stored in the attached diagram?
- AInitialized data
- BUninitialized data
- Cargc/argv
- DStack
- EHeap
44According to Dr. Grant's Lecture on Sep. 27, 2022, and the file-io.pdf slides, which of the following lseek calls returns the current location of the cursor in a given file?
- Alseek(fd, 0, SEEK_CUR)
- Blseek(fd, 1, SEEK_CUR)
- Clseek(fd, -1, SEEK_CUR)
- Dlseek(fd, 0, SEEK_SET)
- Elseek(fd, 0, SEEK_END)
45According to the file-io.pdf listed in the week 5 module, which open command would open a file with the read-only flag whose name was passed in through the command line?
- Aopen(argv[1], O_RDONLY);
- Bopen(argv[0], O_RDONLY);
- Copen(argv[1], O_RDWR);
- Dopen(argv[0], O_RDWR);
- Eopen(argv[1]);
46Based on Dr. Grant's code during his lecture on 9/27,
---
Suppose you are given the following code:
char a[] = "it's spooky season!";
char *b = "it's spooky season!";
a[5] = 'a';
b[5] = 'b';
printf("This character is %c\n", a[5]);
printf("This character is %c\n", b[5]);
What will be printed?- ANothing. Since char *b is a pointer to a literal string, not an array like char a[], you cannot change individual elements by assignment. char a[] allows changes due to it copyng the contents of the string into an array.
- B"a". Although it is legal to change a[5] to 'a', b[5] = 'b' will cause a segmentation fault so the printf() functions will not be reached.
- C"a" "b". Same reason as a.) and b.)
- D"s" "s" Same reason as c.)
47While a process is waiting to be executed on a CPU core they are put into the ___ where the ___ allocates cores to one of the processes in the queue.
- AReady Queue; CPU Scheduler.
- BWait Queue; Context Switch
- CWait Queue; Parent Process
- DReady Queue; Context Switch
- EStack; Context
48According to Dr. Grant's lecture on syscalls, what definition did he give for "the universality of I/O"?
- AIf a program uses only four system calls - open(), read(), write(), and close() - then that program will work on any type of file.
- BFiles created on a Linux machine can be opened on a Windows machine.
- CIf an input device can work on one system, it can work on any system.
- DAll programming languages have the same interface for implementing I/O.
- EAll programs are capable of handling I/O.
49According to Dr. Grant's lecture 10 (file io) and Project 0 instructions, which would be the correct way to check if the first byte of a unicode character stored in the variable 'buf' will be made up of 4 bytes? Consider the following code:
unsigned char buf;
int readval;
readval = read(0, &buf, 1);- Aif((buf & 0xF0) == 0xF0)
- Bif((buf & 0xE0) == 0xE0)
- Cif((buf & 0xC0) == 0xC0)
- Dif((buf & 0x80) == 0x80)
50According to Dr. Grant's CS-3113 Lecture 11 on September 27th, 2022, Processes i, which of the following process states does the Running State go to if there is an interrupt?
- AReady State
- BWaiting State
- CTerminated State
- DNew State
- ERemains in the Running State
51According to Dr. Grant's Lecture (Syscalls) on September 20, when a system call is initiated, the wrapper function calls which function when transitioning to Kernel mode?
- ATrap handler
- BApplication program
- CSystem call service routine
- DTimeout
- EMain
52According to the processes-i.pdf from Week 6. For the UNIX Process States, which part of the role here is awaiting an event and being swapped to secondary storage?
- ASleeping, Swapped
- BAsleep in Memory
- CPreempted
- DReady to Run, Swapped
- ECreated
53According to Dr. Grant's Lecture 11 (processes-i) on September 27, 2022 and processes-i from Week 6, which of the following is the lowest memory in the memory layout of a C program?
- Atext
- Bstack
- Cheap
- Dcommand line arguments
- Euninitialized data
54According to section 3.3 Operations on Processes of our book Operating System Concepts, what is the return value from fork() when the child process is successfully created?
- A0
- B-1
- Cpositive value
- Dnegative value
- Espork
55When using malloc, calloc, or realloc, what is a common compiler warning that may occur when implemented correctly?
- A"Void* doesn't equal type of [Type]*", where [Type] is the type of the new object.
- B"Cannot allocate memory to object because it is an array"
- C"Insufficient memory on the stack"
- D"Cannot use an uninitialized object as a reference"
56According to system_calls.pdf from week 5, what does the syscall errExit(<str>) do?
- Aprints <str> and a description of the error encoded by errnoto STDERR
- Bprints <str> and a description of the error to STDOUT
- CReturns file descriptor, or -1 on error
- DReturns number of btyes read, 0 on EOF, or -1 on error
- EReturns 0 on success or -1 on error
57According to the processes-i pdf listed in the week 6 module, What is the Unix process state that signifies that the process no longer exists, but leaves a record for its parent process?
- AZombie
- BPreempted
- CCreated
- DAsleep in memory
- EUser running
58According to the file-io.pdf from the Week 5 module, what is NOT true of the file offset?
- AThe file offset is not adjusted by calls to read() or write().
- BThe file offset points to a byte in the file.
- CThe first byte of a file is at offset 0
- DThe file offset can be repositioned.
- EThe file offset can be positioned past the EOF.
59According to Dr. Grant's "processes-i.pdf" presentation from week six, what form of memory is the highest form of memory in a C program?
- Aargc, argv
- Binitialized data
- Cuninitialized data
- Dtext
- Eheap
60According to Dr. Grant's lecture on September 29, what is the best way to copy the contents from one string to the location of another?
- Astrcpy
- Bmemcpy
- Cwriting a for loop
- Dwriting a while loop
- Esimply assigning the string to another one
61According to Dr. Grant's lecture on September 27th for system processes, there are 5 different states a process can be in when executed. Of those 5 different states, which 3 states work dependent of each other when processes are being executed?
- ARunning, waiting, and ready states.
- BNew, execution, and terminating states.
- CIdentification, creation, and execution states.
- DBinary, waiting, and execution states.
62According to processes-i.pdf from Week 6, what does the process state Ready mean?
- AThe process is waiting to be assigned to a processor
- BThe process is being created
- CInstructions are being executed
- DThe process is waiting for some event to occur
- EThe process has finished execution
63According to processes-i.pdf from Week 6, which of the following is the first step of the Process Creation?
- AAllocate a slot in the process table for the new process
- BAssign a unique process ID to the child process
- CAssign the child state to the Ready to Run state
- DMake a copy of the process image of the parent, with the exception of any shared memory
- EIncrements counters for any files owned by the parent, to reflect that an additional process now also owns those files
64According to Dr. Grant's lecture on September 27, 2022 (processes i), after a process finishes the state of "waiting" for I/O or event wait, which process state will it change to?
- AReady
- BRunning
- CNew
- DTerminated
65According to Dr. Grant's CS-3113 Lecture 10: File IO and the system_calls.pdf from Week 5, what happens when you use the command strace?
- Astrace lets you see the system calls being called by a program from any other program.
- BShows your history
- Cit returns a binary representation of the object passed in
- DIt starts watching for a stack overflow error
- EIt’s used to access a track back error
66According to file-io-pdf from Week 5, which of the answers below is not a key I/O system call?
- Alseek
- BOpen
- CRead
- DWrite
- EClose
67According to Dr. Grant's Lecture #13 (Processes) from October 4th, 2022, while a program is executing, it can be uniquely characterized by a number of elements, EXCLUDING?
- AInterpreter
- BProgram Counter
- CState
- DI/O status information
- EMemory Pointers
68According to Prof. Grant's lecture on Threads and Concurrency (10/13/20220), which one is NOT a Kernel thread?
- APOSIX
- BWindows
- CLinux
- DSolaris
- EMac OS X
69According to processes-ia.pdf and lecture 13 from Week 7, which answer choice is true regarding the Process Control Block
- AYou can resume the execution of an interrupted running process
- BIt is a key tool that allows for a single process.
- CIt contains five different process elements.
- DIt's not possible to interrupt a process once it's running
- ECreated and managed by the user
70According to zyBooks CS3113: Introduction to Operating Systems Chapter 4 Section 5, what is the Java function call that causes a parent thread to wait for a child thread to finish?
- Ajoin()
- Bpthread_join()
- CWaitForSingleObject()
- Dpthread_create()
- Esleep()
71According to Zybooks chapter 4.4, which type of multithreading model takes a lot of user-level threads and multiplexes them to "a smaller or equal number of kernel threads" without allowing a user-level thread to be bound to a kernel-level thread?
- AMany-to-Many Model
- BMany-to-One Model
- CTwo-level Model
- DOne-to-One Model
72According to zyBooks CS3113: Introduction to OS Chapter 4 Section 7, what answer is most correct when asked how a signal may be handled by what possible handlers?
- AA user-defined signal handler and user-defined signal handler
- BA default signal handler
- CA user-defined signal handler
- DAsynchronous cancellation
73According to processes-ia.pdf and lecture 13 from Week 7, What does a memory table NOT do?
- ALocation in memory being used as the source/destination of the I/O transfer
- BAllocation of main memory to processes
- CAllocation of secondary memory to processes
- DProtection attributes of blocks of main memory or virtual memory
- EInformation needed to manage virtual memory
74According to zybooks CS3113 3.2, Which of the following is not a valid state of a thread?
- AParsing
- BRunning
- CWaiting
- DReady
- ETerminated
75According to processes-ia.pdf and lecture 13 from Week 7, What do file tables NOT provide information about?
- AThe contents inside a file
- BExistence of files
- CLocation on secondary memory
- DCurrent status
- EOther attributes
76According to the “processes-ia.pdf”, Which of the following is not part of the Two-State Process Mode?
- ATimeout.
- BNot Running
- CRunning
- DDispatch
77According to Dr. Grant's Lecture 13 (processes) from Week 7, What is NOT a reason for Process Creation?
- ASpawned by memory table
- BNew batch job
- CInteractive logon
- DCreated by OS to provide a service
- ESpawned by existing process
78According to Dr. Grant's Lecture #13 (processes) and processes-ia.pdf, what is it called when the OS needs to release sufficient main memory to bring in a process that is ready to execute, in regards to process suspension?
- ASwapping
- BTiming
- CParent process request
- DInteractive user request
79According to Dr. Grant's Lecture #13 (Processes) on. 10-4-22, what is the main responsibility of the dispatcher in process execution?
- AIt decides what process should be running and when it should be running.
- BIt decides when a process should be running.
- CIt decides what process should be running.
- DIt creates processes to be executed.
- EIt gets rid of bad code.
80According to Dr. Grant's Lecture 13 (Processes) on October 4, 2022, and processes-ia.pdf, which best describes process control information?
- AThe additional information needed by the OS to control and coordinate the various active processes
- BEach process is assigned unique numeric identifier
- CUsage of program status word (PSW)
- DA process must include a program or a set of programs to be executed
- EThe collection of program, data, stack, and attributes
81According to Dr.Grant Lecture 13 Processes, what are the five states of the Five-State Process Model?
- ANew, Ready, Running, Exit, Blocked
- BNew, Dispatch, Release,Exit,Running
- CAdmit, Dispatch, Release, Exit, Blocked
- DBlocked, Timeout, Release, New, Admit
- EReady, Running, Exit, Release, Admit
82According to Dr. Grant's Lecture #13 (Processes) from October 4th, 2022 and ZyBooks Section 4.4, which of the following does NOT require kernel mode privileges?
- AThread switching
- BHalt operations
- CMemory management
- DI/O device access
- ERecompiling the kernel
83According to Table 3.3 in the processes-ia.pdf slide deck, which of the following agents cannot cause a process to be placed into a suspended state?
- Aa child process
- Bthe parent process
- Cthe operating system
- Dthe user
- Ea timer
84According to Dr. Grant's 13th lecture on October 4th, 2022, what is a child process that has been terminated but is still located in memory called?
- AZombie process
- BOrphan process
- CSleeping process
- DUnallocated process
85From Zybooks CS3113: Introduction to Operating Systems 4.2
What are some of the benefits of multi-threaded programs?- AResponsiveness
- BLower Cost
- CLess Storage Space
- DRedundancy
- ECan be woven into a net
86According to Dr.Grant Lecture 13 Processes, in the five-state process model why is the New state needed?
- AIt takes time to allocated and copy into memory what is going to be run.
- BIt is there to represent a program starting, no processing happens here.
- CIt is a state for when a process has a new request for the OS.
- DThe process is waiting for the CPU to finish the process that is currently working on
- EIt a notification that lets the process know that its ran into a new wild Pokémon
87According to Dr Grant's Lecture 13 and Table 3.2: Which answer below is not one of the reasons of process termination? (Table 3.2 is located on page 111 in the textbook)
- AChild termination
- BParent termination
- CParent request
- DData misuse
- EBounds violation
88According to processes-ia.pdf from Dr. Grant's Lecture on 10/4/2022, which is not true of swapping?
- AIt will always enhance performance.
- BIt is an I/O operation.
- CIt happens when no processes in main memory are in the Ready state.
- DIt involves moving part or all of a process from main memory to disk.
- EIt moves a blocked process into a suspend queue.
89According to ZyBooks Section 4.6: Implicit Threading, what is the order of events for fork-join?
- Amain thread, fork, task, join
- Bmain thread, task, fork, join
- Ctask, fork, join, main thread
- Dtask, join, main thread, fork
- Efork, join, main thread, task
90According to Zybooks chapter 3.7, a blocking send() and a blocking receive() is known as a what?
- ARendezvous
- BAsynchronous communication
- CSynchronous Communication
- DMiscommunication
91According to Dr. Grant's lecture #14 on 10/13/2022, what are the benefits of using threads?
- AResponsiveness, resource sharing, economy, and scalability
- BMultiple processes, parallelism, and concurrency
- CData parallelism and task parallelism
- DDividing activities, balance, data splitting, data dependency, testing and debugging
- E:You can sew clothes together
92According to Dr. Grant's Lecture about Threads on October 13, 2022, what is the correct order of steps for a multithreaded server?
- AClient Requests Server, Server Creates new Thread to service the request, Server resumes listening for additional Client requests.
- BClient Requests Server, Thread resumes listening for additional client requests, Server creates new Thread to service the request.
C: Server requests Client, Thread creates new Thread to service the request, Thread resumes listening to additional Client requests. - CThread requests Server, Server creates new Thread to service the request, Client resumes listening for additional Client requests.
- DClient requests Thread, Server sits there, Nothing happens
93According to Dr. Grant's lecture on Oct 13, what is a downside of multithreading?
- Ait makes it harder for programmers to debug
- Byou have to do concurrent execution on a single-core system
- Cyou have to do parallelism on a multi-core system
- Dyou can't share information in between the threads
- Ethere are both bugs and rats that you have to deal with
94According to Dr. Grant's Lecture #14 (Threads) from October 13th, 2022 and ch04.pdf from Week 8 Module, which is NOT a benefit to using multi-threaded server architecture?
- AMessage passing
- BResponsiveness
- CResource Sharing
- DEconomy
- EScalability
95According to Dr. Grant’s lecture #14 from October 13, 2022, which of the following is a challenge due to multicore systems?
- ABalance
- Bparallelism
- Cconcurrency
- Dresponsiveness
- EAmdahl’s law
96According to Dr. Grants lecture 14 from week 8, When you want to end a thread but not end the parent thread, what function should you use?
- Apthread_exit(0);
- Bexit(0);
- Cpthread_join
- Dpthread.h
- Epthread_create()
97According to Dr.Grant's Lecture 14 (Threads) on October 13, 2022, and ch04.pdf, which of the following characteristics is NOT matched with the correct multithreading model?
- AEach user-level thread maps to a kernel thread : Many-to-One
- BAllows many user level threads to be mapped to many kernel threads : Many-to-Many
- CMultiple threads may not run in parallel on muticore system because only one may be in kernel at a time : Many-to-One
- DCreating a user-level thread creates a kernel thread : One-to-One
98According to Dr. Grant's Lecture #14 (Threads) from October 13, 2022, in the one to one thread model, what is a disadvantage of using this thread technique?
- AThe number of user threads is restricted to the available amount of kernel threads
- BCreating kernel processes slows down the system
- CAllows OS to create a certain amount of kernel threads
- DMany user threads can hold up an assigned kernel thread, thus creating thread blocking
- EThere are no disadvantages to one to one thread model, it is the single greatest technique in the history of computers.
99According to Dr.Grant's Lecture 14 (Threads) on October 13, 2022, and ch04.pdf, which of the following models is NOT an example of a multithreading model?
- AOne-to-Many
- BMany-to-One
- COne-to-One
- DMany-to-Many
100According to Dr. Grant's CS-3113 Lecture 16 on October 13th, 2022, Threads, and zyBooks CS3113: Introduction to Operating Systems, Chapter 4 Section 4, Multithreading models, and ch04.pdf, which of the following is NOT true about a One-to-One multithreading model?
- AMultiplexes numerous User-Level Threads to a less than or equal to number of Kernel Threads.
- BEach User-Level Thread connects to a Kernel Thread.
- CCreation of a User-Level Thread also creates a Kernel Thread.
- DHas more concurrency than Many-to-One multithreading model.
- ENegatively impacts the performance of a system if there are a large number of user threads.
101According to Dr. Grant's Lecture about Threads on October 13, 2022, which of the following functions cancels a specified POSIX thread (thread)?
- Apthread_cancel(tid)
- Bpthread_exit(0)
- Cpthread_join(tid, NULL)
- DCloseHandle(Handle)
- Ejoin()
102According to Dr. Grant's CS-3113 Lecture, 16 on October 13th, 2022, which of the following implies a system can perform more than one task
simultaneously?- AParallelism
- BConcurrency
- CMulticore Programming
- DMany-to-one multi-threading models.
- EParallel systems
103According to the process-ia.pdf slides, which of these functions for an operating system kernel is not correctly matched up with the correct category?
- AAllocation of address space to processes; process management
- BManagement of process control blocks; process management
- CBuffer management; I/O management
- DSwapping; Memory management
- EPage and segment management; Memory management
104According to section 4.1 Threads & Concurrency of our book Operating System Concepts, which one of the following is NOT shared by the threads of the same process?
- AStack
- BAddress space
- COpen files
- DSignals
- EData section
105According to Dr. Grant's Lecture on October 4, 2022, process-ia.pdf, and process-i.pdf, what defines a process to be an orphan process?
- AIt is a process where the parent process terminates before the current child process
- BIt is a process running in the background waiting for an event
- CIt is a process that has been terminated but is not immediately deallocated from memory
- DIt is a process that has been terminated and deallocated from memory
106According to threads-i.pdf, What method of creating 100,000 processes takes the least amount of time?
- Aclone()
- Bfork()
- Cvfork()
- Dfork() + exec()
- Evfork() + exec(
107According to Dr. Grant's Lecture 14 on Oct 13 and ch04.pdf from week 8, which is not introduction to multithreading models Many-to-One?
- AEach user-level thread maps to kernel thread.
- BMany user-level threads mapped to single kernel thread
- COne thread blocking causes all to block
- DMultiple threads may not run in parallel on multicore system because only one may be in kernel at a time
- EFew systems currently use this model
108Which is the main difference between the user thread and Kernel threads?
- AUser threads are managed by the user while the operating system manages kernel threads.
- BKernel threads are managed by the user while the operating system manages user threads.
- CKernel threads are faster than User threads
- DKernel threads are mapped to a user thread
- EThere is no difference
109According to Introduction to Operating Systems Zybooks Chapter 4.5 "Thread libraries", Synchronous Threading is similar to vfork() in which when the parent creates a child(ren),
- Ait must wait for all of its children to terminate.
- Bthe parent resumes and both execute concurrently.
- Cthe child(ren) cannot be guaranteed to be called.
- Dthe parent and child(ren) share little data between them.
110According to Dr. Grant's Lecture #13 (Processes) from 2022-10-04,
How do you voluntary exit a process?- Aexit(status);
- Bkill(pid, signal);
- Cpthread_exit(void *retval);
- Dreturn -1;
- Eclose(int fd);
111According to the ch04.pdf and section 4.6 of the textbook, which is NOT an advantage of threading pools?
- ASynchronous tasks can be completed with more efficiency
- BUsually slightly faster to service a request with an existing thread than create a new thread
- CAllows the number of threads in the application(s) to be bound to the size of the pool
- DSeparating task to be performed from mechanics of creating task allows different strategies for running task
112During Dr. Grant's lecture #16 on Threads, he showed an example of a Java multithreaded program and a C multithreaded program that calculates the sum of a number. In both programs, run()/runner() had a return type of void. Why would we not return the sum instead?
- AIf the program has to wait for the thread to return some data, then this defeats the purpose of running more than one thread at a time.
- BWe should wait until we need the data before retrieving it from the thread.
- CThe API won't allow us to return a value.
- DThe thread may still be processing the data, so it might return an incomplete value.
- ESome threads may not have anything to return, so the API is written in such a way so they are not forced to return a value.
113What are parallel regions?
- Ablocks of code that can run in parallel
- Bmanagement done by user-level threads library
- Ca communication mechanism from the kernel to the upcall handler in the thread library
- Dthey notify a process that a particular event has occurred.
114According to Dr. Grants Lecture over Chapter 4 (chp4.pdf) from October 13th, 2022, which of the following is NOT true about thread cancellation?
- ACancellation of a target thread may occur in three different scenarios.
- BThread cancellation involves terminating a thread before it has completed.
- CThe difficulty with cancellation occurs in situations where resources have been allocated to a canceled thread.
- DCanceling a thread asynchronously may not free a necessary system-wide resource.
- EDeferred cancellation occurs only after the target thread has checked a flag to determine whether or not it should be canceled.
115According to Dr.Grant's Lecture 16 (Threads) on October 13, 2022, which of the following methods of process creation results in the shortest time required to create large amounts of processes.
- Aclone()
- Bvfork()
- Cfork()
- Dfork() + exec()
116According to Dr. Grant's Lecture Slides "ch04.pdf", all of the following are benefits of multi-threading, EXCLUDING?
- AHigh Cost
- BResponsiveness
- CResource Sharing
- DEconomy
- EScalability
117According to threads-i.pdf which of the following is NOT a trait of a vfork?
- AThere is no duplication of virtual memory
- BParent memory is not shared
- CThe child of vfork() is not always guaranteed to run
- DChanges to stack or heap in child are not seen by the parent
- Evfork() Creates 2 child processes
118According to Dr. Grant's slideshow presentation titled "threads-i.pdf", which of the following is the correct clone() flag to write the thread ID of a child into ptid?
- ACLONE_PARENT_SETTID
- BCLONE_NEWPID
- CCLONE_PID
- DCLONE_THREAD
- ECLONE_VFORK
119According to ch04.pdf slide #43, from Week 8. What windows thread structure can be defined as containing a thread id, user mode stack, and thread local storage, in user space?
- AThread environment block
- BKernel thread block
- CExecutive thread block
- DDynamic link libraries
- EDynamic hotdog block
120According to zyBooks Section 4.6 - CS 3113, Grand Central Dispatch (GCD) is a combination of which of the following?
- Arun-time library, an API, and language extensions
- Brun-time library and language extensions
- CAn API and language extensions
- Drun-time library and OpenMP
- EAn API, language extensions, and OpenMP
121According to Dr. Grant's Lecture Slides "ch04.pdf", which of these is NOT a primary thread library?
- ALinux
- BPOSIX Pthreads
- CWindows threads
- DJava threads
122According to Dr. Grant's Lecture on Oct 13, 2022 , What is the fast method of process creation that Pthreads uses?
- Aclone()
- Bfork()
- Cvfork()
- Dexec()
123According to ch04.pdf and Dr. Grant's lecture 16 from Week 8, Which of the following is NOT a parameter for the creation of a Windows thread (pthread_create(?);)
- Alist of joined threads
- Bcreation flags
- Csecurity attributes
- Dstack size
- Ethread function
124According to Dr. Grant’s lecture 16(Threads) from October 13, 2022, Which of the following is used in UNIX systems to notify a process that a particular event has occurred?
- ASignals
- BThreads
- CThread Library
- DParallelism
- EProgram Counter
125According to Dr. Grant's lecture on processes, what signal flag is passed to the kill() function when pressing "ctrl+c" while running a process in the terminal?
- ASIGINT
- BSIGTERM
- CSIGQUIT
- DSIGHUP
- ESIGEND
126According to Dr. Grant's lecture on Oct 13, what is an advantage of multithreading?
- AThere is simultaneous and parallelized occurrence of tasks.
- BDecreased potential for deadlock occurrence.
- CIt eliminates overhead switching of context
- Dit makes it easier for programmers to debug
127According to 'threads-i.pdf' and 'ch04.pdf' (Week 8): Which of the following statements is not true about threads and processes?
- AEach thread exclusively references different code, data and files, regardless of whether a process is single or multi-threaded.
- BSharing between threads is easier than sharing between processes.
- CA process is an executing program, while threads operate within an executing program.
- DEach thread has its own stack and registers, regardless of whether a process is single or multi-threaded.
- ESharing between processes can include implementing shared memory.
128According to "Operating Systems 10th Edition", what are the two main types of parallelism?
- AData parallelism and Task parallelism
- BThread parallelism and Process parallelism
- CComputational parallelism and Balanced parallelism
- DImplicit parallelism and Explicit parallelism
- ESingle parallelism and Multi-parallelism
129According to Dr. Grant's Threads lecture on Thursday, October 13, which system call is the fastest to create processes?
- Aclone()
- Bvfork()
- Cfork()
- Dfork() + exec()
- Evfork() + exec
130According to Dr. Grants "processes-ia" slides and his lecture on October 4th, Which of the following are not a characteristic of the System mode of execution?
- Aless privilege of the mode
- Bmore privilege mode
- Creferred to as control mode
- DKernel of the Operating system
131Which of these is an example of a many-to-one thread?
- AGNU Portable Threads
- BPOSIX Pthreads
- CWindows threads
- DAhmdal's Threads
- ELunaris Blue Threads
132According to Dr. Grant's lecture on October 13th, which of the following lists best describes what is shared between multi-threaded processes?
- Acode, data, and files
- Bdata, files, stack
- Cfiles, registers, stack
- Dcode, files, registers
- Enothing is shared between them
133According to threads-i.pdf from the week 8 modules, the Pthread datatype pthread_once_t is best described by which of the following?
- AOne-time initialization control context
- BCondition variable
- CThread attributes object
- DThread identifier
- EMutex attributes object
134which type of multithreading model that allows user thread to be bound to kernel thread and allows many user level threads to be
mapped to many kernel threads?- ATwo-level Model
- BMany-to-One Model
- CMany-to-Many Model
- DOne-to-One Model
135According to Dr.Grant's Lecture 16 (Threads) , Which of the following is NOT a benefit of Multithreaded Architecture
- AImplementation
- BScalability
- CEconomy
- DResource Sharing
- EResponsiveness
136According to Operating System Concepts, section 4.3, which of the following options describe the drawback(s) of a many-to-many multithreading model?
- Ahe many-to-many model is the most difficult to implement, and limiting the number of kernel threads has become less important as technology has advanced.
- BWith the many-to-many model, only one thread can access the kernel at a time, so multiple threads can not run in parallel on multicore systems.
- CBecause creating a user thread requires creating a corresponding kernel thread, a large number of threads may be created and burden the performance of a system.
- DOn a many-to-many model, when a thread performs a blocking system call, the kernel may schedule another thread for execution, preventing blocking of the entire process.
- Etwo-level model is superior to the many-to-many model, as it allows a user-level thread to be bound to a kernel thread.
137According to Dr. Grant's Lecture 13 (processes) from Week 7, what happens if no interrupts are pending the processor?
- AProceeds to the fetch stage and fetches the next instruction of the current program in the current process
- BSets the program counter to the starting address of an interrupt handler program
- CSwitches from user mode to kernel mode so that the interrupt processing code may include privileged instructions
- DAn error or exception condition generated within the currently running process
138According to Dr. Grant's lecture on October 13th, 2022 (Threads) and the threads-i slides, which of the following is the correct TID for the thread group leader in a process with PID of 2001 and a thread count of 4?
- ATID = 2001
- BTID = 2002
- CTID = 2004
- DTID = 2003
139According to Dr. Grant's Lecture 13(processes), In a global trace of running processes which of the following which of the following is NOT true.
- AAfter a Timeout the next process in the queue immediately starts either resuming a previous process or starting a new one.
- BHow long processes can run before Timeouts are controlled by the dispatcher
- CGiven a process shorter than the Timeout by the dispatcher, the dispatcher is run once that process has ended.
- DGiven a process longer than the Timeout the process is paused, and then the dispatcher runs.
- EThe dispatcher runs after I/O Requests
140According to Dr. Grant's lecture 13, what is not an example of an event that would cause a process creation?
- AParent request
- BUser login
- CNew batch job
- DProviding service to OS
- EParent calling
141According to Dr. Grant's Lecture #13 (Processes) from October 4th, 2022 and the process-ia.pdf, the order of the simplified process control block on the image 3.1 is:
- AIdentifier, state, priority, program counter, memory pointers, context data, I/O status information, accounting information.
- Baccounting information, Identifier, state, priority, program counter, memory pointers, context data, I/O status information.
- CI/O status information, state, priority, context data, program counter, Identifier, memory pointers, accounting information.
- Dprogram counter, memory pointers, I/O status information, accounting information, Identifier, state, priority, context data.
- Econtext data, I/O status information, accounting information, Identifier, state, priority, program counter, memory pointers.
142Which of the following is not a state that a thread can be in?
- Askipped
- BRunning
- CWaiting
- DReady
- ETerminated
143According to ch04.pdf, which implicit threading method is designed to create a pool of pre-built threads ready for work commands?
- AThread Pools
- BOpenMP
- CGrand Central Dispatch
- DThread Library
- EPThread
144According to the Chapter 4 PDF, what does 'N' represent in Amdahl's law?
- AProcessing Cores
- BSerial Portion
- CSpeedup
- DParallel Components
- EChicken
145what type of scheduling is based on the order of process arrival?
- AFirst-come first-served (FCFS)
- BShortest-job-first (SJF)
- CMultilevel Queue
- DRound-robin (RR)
- EExponential Average
146According to zyBooks CS3113: Introduction to Operating Systems Chapter 5 Section 3, Which of the following is not a criteria used for comparing CPU-scheduling algorithms?
- AQueue Time
- BThroughput
- CTurnaround Time
- DWaiting Time
- EResponse Time
147According to zyBooks CS3113: Introduction to Operating Systems Chapter 5 Section 2, process execution begins with what?
- Aa CPU Burst
- Ban I/O Burst
- Ca cycle
- Ddispatch latency
- ELittle's Formula
148According to zyBooks CS3113: Introduction to Operating Systems Chapter 5 Section 3, which of the following is the section of code where a process is actually changing data?
- ACritical Section
- BEntry Section
- CExit Section
- DRemainder Section
- EMain Section
149which of the following is the SIMPLEST CPU-scheduling algorithm?
- Afirst-come, first-served (FCFS)
- Bshortest-job-firs (SJF)
- Cpriority scheduling
- Dprocess contention scope (PCS)
- Esystem-contention scope (SCS)
150when a shortest-job-first (SJF) scheduling algorithm is used, which of the following processes will be selected first?
- AP3, burst time: 4
- BP5, burst time: 8
- CP4, burst time: 5
- DP1, burst time: 9
- EP2, burst time: 6
151Referencing ch05.pdf, suppose we have three processes arrive at a CPU that utilizes FCFS scheduling in order P1, P2, and P3, and they have burst times of 14. 2, and 4 respectively. What would the average waiting time be for these processes?
- A10
- B14
- C16
- D20
- E20/3
152According to Dr Grant's lecture 17 on 10/18/2022 - Week 9 what is the use of dup with file descriptors?
- Adup duplicates an open file descriptor.
- Bdup is used to execute a file which is residing in an active process.
- Cdup creates a new process, which becomes the child process of the caller.
- Ddup directs the output of one process to another.
- EThere is no real use for dup.
153According to Dr.Grant's Powerpoint released on October 18, 2022, ch05.pdf (CPU Scheduling), which is the correct ordering of multilevel queue scheduling from LOWEST priority to HIGHEST priority?
- Astudent processes, batch processes, interactive editing processes, interactive processes, system processes
- Bsystem processes, interactive processes, interactive editing processes, batch processes, student processes
- Cstudent processes, interactive processes, interactive editing processes, batch processes, system processes
- Dinitial processes, batch of cookies processes, student of OS processes, digestive processes, food processing
154According to Dr. Grant's Lecture on October 18th about CPU Scheduling, what is not a potential result of CPU Scheduling decisions when dealing with a process?
- ASwitches from user state to waiting state.
- BTerminates.
- CSwitches from running to ready state.
- DSwitches from running to waiting state.
- ESwitches from waiting to ready state.
155According to Dr. Grant's lecture on Oct 18, which one of these should you aim for to optimize schedule algorithm?
- AMax CPU utilization, Max throughput
- BMax turnaround time, Max CPU utilization
- CMax throughput, Max response time
- DMax waiting time, Max response time
- EMin CPU utilization, Max throughput
156According to Dr. Grant's CPU Scheduling Lecture on October 18, which of the CPU Scheduling criteria describes the amount of time it takes to execute a particular process?
- ATurnaround time
- BResponse time
- CWaiting time
- DThroughput
- ECPU utilization
157According to zyBooks Section 5.4 - CS 3113, what is the length in time of a time quantum?
- A10-100 milliseconds
- B1-10 milliseconds
- C1-10 seconds
- D10-100 seconds
- E100-1000 milliseconds
158According to Dr. Grant's lecture #17 on 10/18/2022 and ch05.pdf, what is a CPU burst followed by?
- AI/O burst
- BConvoy effect
- CDispatch latency
- DShort-term scheduler
- EAnother CPU burst
159According to Dr. Grant's lecture #17 on 10/18/2022 and ch05.pdf, which of the following is an example of preemptive scheduling?
- AA CPU scheduling decision is made when a process switches from waiting to ready state
- BA CPU scheduling decision is made when a process switches from running to waiting state
- CA CPU scheduling decision is made when a process switches from ready to running state
- DA CPU scheduling decision is made when a process terminates
160According to ch05.pdf of Module Week 9, how do we prevent low-priority processes from never executing?
- AAs time progresses, we increase the priority of the process
- BWe build a second queue that orders by the length of time elapsed of each process waiting.
- CEvery fixed amount of CPU time, we invert the priorities in the queue to make sure that low-priority processes are executed.
- DWe cycle back and forth running the front and rear of the priority queue so the CPU attacks from both sides.
- ESome processes are just not important enough to execute sometimes and are forever forgotten.
161According to Dr. Grant's Lecture #17 on 10/18/2022 and ch05.pdf, consider the following CPU scheduling decisions:
1. Process switches from running to waiting state.
2. Process switches from running to ready state.
3. Process switches from waiting to ready.
4. Process terminates
Which of the following CPU scheduling decisions are considered non-preemptive scheduling?- A1 and 4
- B2 and 3
- C1 and 2
- D3 and 4
- E1 and 3
162According to Dr. Grant's Lecture on October 18th, 2022, the ch05.pdf slides, and the zyBooks for CS 3113 Intro to Operating Systems Chapter 5 Section 2, which component of the CPU Scheduler's functions is described as "the kernel routine that gives control of a core to the thread selected by the scheduler"?
- ADispatcher
- BCooperative Scheduling
- CDispatch latency
- DCPU Burst
- EPreemptive Scheduling
163ZyBooks 5.3 CS 3113 : What is the criteria that measures how long it takes a single process to execute once it has been submitted?
- ATurnaround Time.
- BWaiting Time.
- CThroughput.
- DResponse Time.
- ECPU Utilization.
164According to Dr. Grant's lecture on 10/18/22 and the Chapter 5 slide deck, what CPU scheduling algorithm provides the shortest average waiting time for a set of processes?
- ASJF (Shortest Job First)
- BFCFS (First-Come, First-Served)
- CPriority Scheduling
- DRound Robin Scheduling
165According to the ch05 pdf (pg 18), what is an issue with priority scheduling?
- AStarvation
- BAging
- CFirst- Come, First-Served (FCFS)
- DRound Robin
- EDeath
166According to Dr. Grant's Lecture on October 18th about CPU Scheduling and ch05.pdf, which of the following is the best description for the throughput scheduling criteria?
- AThe number of processes that complete their execution per unit time.
- BThe amount of time to execute a particular process.
- CThe amount of time a process has been waiting in the ready queue.
- DThe amount of time it takes from when a request was submitted until the first response was produced, not output.
- EHow busy the CPU is.
167According to Dr. Grant's Lecture on October 18th about CPU Scheduling, which CPU scheduling criteria is the amount of time it takes from when a request was submitted until the first response is produced, not output?
- AResponse Time
- BWaiting Time
- CTurnaround Time
- DThroughput
- ECPU Utilization
168According to Dr.Grant's Lecture on 10/20, Which of these is the amount of time a process has been waiting in the ready queue?
- AWaiting time
- BTurnaround time
- CResponse Time
- DThroughput
- EProcessing time
169According to Dr. Grant's lecture on Chapter 5: CPU scheduling (10/20/2022), which one of the following statements is correct?
- AThroughput is the number of completed processes per time unit.
- BSmall amounts of CPU bursts is desired.
- CWaiting time is the time a process waits in the terminate state.
- DLarge amounts of Waiting time is desired.
- ETurnaround time is the amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment)
170According to zyBooks CS3113: Introduction to Operating Systems Chapter 6.6: Mutex Locks, which of the following terms best describes a mutex lock that is contended?
- AA lock is considered contended if more than one thread is attempting to access it.
- BA lock is considered contended if a lock is available when a thread attempts to acquire it.
- CA lock is considered contended only if there are a relatively large number of threads attempting to acquire the lock
- DA lock is considered contended only if there are a relatively small number of threads attempting to acquire the lock.
171According to Dr. Grant's lecture on October 20 about scheduling, what is the main disadvantage of using first come first serve (FCFS) scheduling?
- AIf the first process takes a lot of time, this can drastically increase the average waiting time.
- BThere is no way to change the process order.
- CCPU bursts are unpredictable.
- DIt takes extra CPU processes to handle each incoming process.
- EThere are absolutely no disadvantages to this kind of scheduling.
172According to Project 1's instructions and Dr. Grant's Lecture over Chapter 5 (ch05.pdf) from October 20th, 2022, what is the main difference between waiting time and response time in terms of CPU scheduling?
- AResponse time measures when the job is first reached by the CPU. Waiting time measures anytime when the job is on the CPU.
- BResponse time measures when the job is last reached by the CPU. Waiting time measures anytime when the job is on the CPU.
- CWaiting time measures when the job is first reached by the CPU. Response time measures anytime when the job is on the CPU.
- DWaiting time measures when the job is last reached by the CPU. Response time measures anytime when the job is on the CPU.
- EThere is no difference between response time and waiting time.
173According to zyBooks CS3113: Introduction to Operating Systems Chapter 5 Section 3, ____ is the number of processes that are completed per time unit.
- AThroughput
- BResponse Time
- CCPU Utilization
- DSeconds
174According to ch05.pdf and zyBooks CS3113: Introduction to Operating Systems, Chapter 5 Section 4, Scheduling algorithms, which of the following scheduling algorithm's makes it where each process receives a small unit of CPU time, known as time quantum?
- ARound Robin (RR) Scheduling
- BShortest-Job-First (SJF) Scheduling
- CFirst-Come, First-Served (FCFS) Scheduling
- DPriority Scheduling
- EGantt Chart Scheduling
175According to the ch6.pdf from week 9 modules, which is not an element for Monitor Implementation?
- Aacquire()
- B.mutex
- Cwait()
- Dsignal()
- Enext_count
176According to Dr. Grant's Lecture 17: If two file descriptors in two *different* processes point to the same file offset, which method was used?
- Afork()
- Bdup()
- Cdup2()
- Dlink()
- Esplit()
177According to section 5.2 of Zybooks, which of the following statements is not true of nonpreeemptive scheduling?
- ANonpreemptive scheduling incurs a cost associated with access to shared data
- BNonpreemptive scheduling does not require a timer
- CA process keeps the CPU until it releases the CPU either by terminating or by switching to the waiting state
- DMost modern operating systems do not use nonpreemptive scheduling algorithms
- ENonpreemptive scheduling can also be referred to as cooperative scheduling
178According to Dr. Grant’s lecture 18 (synchronization tools) (10-20-2022) and the synchronization tools pdf, which of the following is a race condition?
- AThe final result depends on the order of execution
- BSharing of global resources
- CThe need for mutual exclusion
- DMutual exclusion is not a control requirement
- EStarvation
179According to Dr. Grant's lecture on October 20th, 2022, what are issues with the Shortest-Job First scheduling style?
- AIt can be difficult to know how long a process will take unless explicitly given
- BAverage wait time is larger than other scheduling styles
- CLong tasks may never complete because of the scheduler constantly switches off of them
- DLong tasks can get backed up to the point where the scheduler has to cut them up
- ENothing, shortest-job first scheduling is perfect in a every way
180According to ch05.pdf from Week 9, which of these Windows Priority Classes is not variable?
- AREALTIME_PRIORITY_CLASS
- BHIGH_PRIORITY_CLASS
- CNORMAL_PRIORITY_CLASS
- DIDLE_PRIORITY_CLASS
181As shown in Dr. Grant's lecture 17 (Threads + Scheduling), if we have a collection of pthreads that all print a statement, we cannot assume that the statements will be printed in sequential order. Explain why the threads do not print in the order they are created.
- AWe cannot predict what order the CPU scheduler will run the processes.
- BThe issue is that each pthread was created from a different pthread_t object; instead, create them from one pthread_t and it will print correctly.
- CThe threads share a print buffer, and another thread may alter the buffer, causing the statements to print out of order.
- Dhe issue is that nothing will be printed until all of the threads are joined, and they may join out of order.
- EThe threads were created from the same pthread_t object, each thread should come from a distinct pthread_t object.
182According to Zybooks chapter 5, What level of priority scheme does windows use to determine the order of the thread schedule?
- A32.
- B8.
- C64.
- D16.
183According to Dr. Grant's Lecture 17 on 10/18/2022, what causes the variations in output order of printf when ran in parallel?
- Athe Scheduler
- BI/O Bus Operations
- Cthe buffer
- DReal Mode Operations
- ECPU Idle
184According to Dr. Grant's slides titled "synchronization-tools.pdf", which choice below is a section of code within a process that requires access to shared resources and that must not be executed while another process is in a corresponding section of code?
- ACritical Section
- BDeadlock
- CAtomic Operation
- DStarvation
- EMutual Exclusion
185According to Dr. Grant's slides titled "ch05.pdf", which term fits the definition, only one processor accesses the system data structures, alleviating the need for data sharing?
- AAsymmetric multiprocessing
- BHomogeneous processors
- CSymmetric multiprocessing
- DProcessor Affinity
186According to Dr. Grant's Lecture #17 (Threads + Scheduling) on October 18, what selects from among the processes in the ready queue and allocates the CPU to one of them?
- AShort-term Scheduler
- BLong-term Scheduler
- CMultilevel Queue
- DCritical Section
- EDispatcher
187According to Dr. Grant's lecture #18 on 10/20/2022, which command would you write to run the htop process at the highest priority?
- Anice -n -20 htop
- Bnice -n 15 htop
- Cnice -n 0 htop
- Dnice -n -5 htop
188According to Dr. Grant's lecture, ch05.pdf, what issues can arise with priority scheduling?
- AStarvation
- BAging
- CThe order of integer assignment
- Dthe CPU to reading the smallest integer as the highest priority
- EEach class section still having seats available
189According to Dr. Grant's Lecture on October 18th about CPU Scheduling, which CPU scheduling criteria is the amount of time a process has been waiting in the ready queue?
- AWaiting Time
- BCPU Utilization
- CThroughput
- DTurnaround Time
- EResponse Time
190According to ch05.pdf slide #35, from Week 9. There has been a recent trend in placing multiple processing cores on the same physical chip, what does the practice achieve?
- AIt is faster and consumes more power.
- BIt takes advantage of memory stall.
- CIt is slower but consumes less power.
- DIt prevents memory stall.
- EIt reduces heat.
191According to synchronization-tools.pdf from week 9, which of the following best describes multiprogramming?
- AThe management of multiple processes within a uniprocessor system
- BThe management of multiple processes executing on multiple, distributed computer systems
- CThe management of multiple processes within a multiprocessor
- DA situation in which two or more processes continuously change their states in response to changes in the other process(es) without doing any useful work
- EA situation in which two or more processes are unable to proceed because each is waiting for one of the others to do something
192According to the Chapter 6 Slides, which of the following is not a solution to the critical selection problem?
- ASignal and Wait
- BMutual Exclusion
- CProgress
- DBounded Waiting
193According to Dr. Grant's lecture on CPU scheduling, why is Shortest-Job-First (SJF) prioritization difficult to implement?
- AIt is difficult to accurately predict how long a process will need to run.
- BSJF requires a large amount of memory.
- CSJF results in a long average wait time
- DShortest-Job-First can only work effectively for Linux machines.
- EThere is no prioritization method called Shortest-Job-First.
194According to Operating Systems Concepts 10th Edition, Scheduling tasks using the Rate-Monotonic Scheduling algorithm is based on a static priority policy where shorter more frequent processes get higher priority. What happens when a lesser priority process p1 is running and a higher priority process p2 becomes available?
- Ap1 pauses and p2 runs to completion then p1 runs and completes.
- BThe two processes run in tandem.
- Cp1 finishes then p2 runs and completes
- Dp1 pauses and p2 runs halfway and pauses. P1 resumes and finishes then p2 resumes and finishes.
- Ep1 would have never started knowing p2 was more frequent with higher priority
195According to Zybooks CS3113: Introduction to Operating Systems Chapter 5 Section 7 and ch05.pdf, What is true about Rate-Monotonic scheduling?
- AIt is where a priority is assigned based on the inverse of the period (ie, the shorter the period, the higher the priority).
- BIt is where a priority is assigned based on the order of a request for the next CPU burst period.
- CIt is where processes with longer periods have a higher priority than processes with shorter periods.
- DIt is where processes with a later deadline, have a higher priority than processes with an earlier deadline.
196According to 'synchronization-tools.pdf' which of the following is not true about process interactions?
- AIf two processes are unaware of each other, data coherence is a concern when it comes to potential control problems.
- BWith any kind of process interaction (i.e. directly/indirectly aware, unaware), deadlock is a potential control problem.
- CIf two processes are indirectly aware of each other, data coherence is a concern when it comes to potential control problems.
- DIf two processes are directly aware of each other, data coherence is not a concern when it comes to potential control problems.
- EProcesses that are indirectly aware of each other cooperate through sharing, while processes that are directly aware of each other cooperate through communication.
197According to Dr. Grant's Powerpoint released on October 18, 2022, ch05.pdf (CPU Scheduling), which of the following is NOT a parameter to define a Multilevel-feedback-queue scheduler?
- Amethod used to determine when to switch between queues
- Bscheduling algorithms for each queue
- Cmethod used to determine when to upgrade a process
- Dmethod used to determine when to demote a process
- Enumber of queues
198According to synchronization-tools.pdf, a semaphore is defined as which of the following?
- Avariable that has an integer value upon which only three operations are defined to manipulate the value.
- Bvariable that has an integer value upon which only three operations are defined and the value can not be changed.
- Cvariable that has an integer value upon which only five operations are defined to manipulate the value.
- Dvariable that has an integer value upon which only four operations are defined to manipulate the value.
- Evariable that has a string value upon which only three operations are defined and the value can not be changed.
199According to lecture not ch05.pdf. Which one of these is nonpreemptive which scheduling decision is made when?
- ASwitches from running to waiting state
- BSwitches from running to ready state
- CSwitches from waiting to ready
- DSwitches from waiting to Terminates
200According to the synchronization-tools.pdf, an atomic operation is what?
- AA function or action implemented as a sequence of one or more instructions that appears to be indivisible
- BA section of code within a process that requires access to shared resources and that must not be executed while another process is in a corresponding section of code
- CA situation in which two or more processes continuously change their states in response to changes in the other process without doing any useful work
- DA situation in which multiple threads or processes read and write a shared data item and the final result depends on the relative timing of their execution
- EA situation in which a runnable process is overlooked indefinitely by the scheduler
Informationen
- Beschreibung
- GRE OS study 2 Quiz am osstudy1, erstellt von Kevin T am 15/11/2022.
- Autor
- Kevin T
- Sprache
- English
- Aufrufe
- 15
- Schlagwörter
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz