Practice Questions CMPS 500 – Operating Systems, Study Guides, Projects, Research of Operating Systems

A) An operating system provides an environment for the execution of programs. B) An operating system manages system resources. C) Operating systems provide both ...

Typology: Study Guides, Projects, Research

2021/2022

Uploaded on 09/07/2022

adnan_95
adnan_95 🇮🇶

4.3

(39)

918 documents

1 / 75

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1"
"
Graduate(Program(
Department(of(Computer(Science(
Comprehensive(Examination(–(Practice(Questions(
"
CMPS(500(–(Operating(Systems(
1.""In"what"way"is"an"operating"system"like"a"government?"
A)""It"seldom"functions"correctly."
B)""It"creates"an"environment"within"which"other"programs"can"do"useful"work."
C)""It"performs"most"useful"functions"by"itself."
D)""It"is"always"concerned"primarily"with"the"individual's"needs."
"
2.""____"operating"systems"are"designed"primarily"to"maximize"resource"utilization."
A)""PC"
B)""Handheld"computer"
C)""Mainframe"
D)""Network"
"
3.""The"most"common"secondary"storage"device"is"____."
A)""random"access"memory"
B)""solid"state"disks"
C)""tape"drives"
D)""magnetic"disk"
"
4.""Which"of"the"following"would"lead"you"to"believe"that"a"given"system"is"an"SMP-type"
system?"
A)""Each"processor"is"assigned"a"specific"task."
B)""There"is"a"boss–worker"relationship"between"the"processors."
C)""Each"processor"performs"all"tasks"within"the"operating"system."
D)""None"of"the"above"
"
5."What"statement"concerning"privileged"instructions"is"considered"false?"
A)"They"may"cause"harm"to"the"system."
B)"They"can"only"be"executed"in"kernel"mode."
C)"They"cannot"be"attempted"from"user"mode."
D)"They"are"used"to"manage"interrupts."
"
6."Which"of"the"following"statements"is"false?"
A)"Mobile"devices"must"be"concerned"with"power"consumption."
B)"Mobile"devices"can"provide"features"that"are"unavailable"on"desktop"or"laptop"computers.""
C)"The"difference"in"storage"capacity"between"a"mobile"device"and"laptop"is"shrinking."""
D)"Mobile"devices"usually"have"fewer"processing"cores"than"a"standard"desktop"computer."
"
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b

Partial preview of the text

Download Practice Questions CMPS 500 – Operating Systems and more Study Guides, Projects, Research Operating Systems in PDF only on Docsity!

Graduate Program Department of Computer Science Comprehensive Examination – Practice Questions CMPS 500 – Operating Systems

  1. In what way is an operating system like a government? A) It seldom functions correctly. B) It creates an environment within which other programs can do useful work. C) It performs most useful functions by itself. D) It is always concerned primarily with the individual's needs.
  2. ____ operating systems are designed primarily to maximize resource utilization. A) PC B) Handheld computer C) Mainframe D) Network
  3. The most common secondary storage device is ____. A) random access memory B) solid state disks C) tape drives D) magnetic disk
  4. Which of the following would lead you to believe that a given system is an SMP-type system? A) Each processor is assigned a specific task. B) There is a boss–worker relationship between the processors. C) Each processor performs all tasks within the operating system. D) None of the above
  5. What statement concerning privileged instructions is considered false? A) They may cause harm to the system. B) They can only be executed in kernel mode. C) They cannot be attempted from user mode. D) They are used to manage interrupts.
  6. Which of the following statements is false? A) Mobile devices must be concerned with power consumption. B) Mobile devices can provide features that are unavailable on desktop or laptop computers. C) The difference in storage capacity between a mobile device and laptop is shrinking. D) Mobile devices usually have fewer processing cores than a standard desktop computer.
  1. A(n) ________ is the unit of work in a system. A) process B) operating system C) timer D) mode bit
  2. The two separate modes of operating in a system are A) supervisor mode and system mode B) kernel mode and privileged mode C) physical mode and logical mode D) user mode and kernel mode
  3. A _____ is an example of a systems program. A) command interpreter B) Web browser C) text formatter D) database system
  4. If a program terminates abnormally, a dump of memory may be examined by a ____ to determine the cause of the problem. A) module B) debugger C) shell D) control card
  5. A message-passing model is ____. A) easier to implement than a shared memory model for intercomputer communication B) faster than the shared memory model C) a network protocol, and does not apply to operating systems D) only useful for small simple operating systems
  6. Policy ____. A) determines how to do something B) determines what will be done C) is not likely to change across places D) is not likely to change over time
  7. ______ is a mobile operating system designed for the iPhone and iPad. A) Mac OS X B) Android C) UNIX D) iOS
  8. The ________ provides a portion of the system call interface for UNIX and Linux. A) POSIX

A) Plug-in B) Renderer C) Sandbox D) Browser

  1. The ________ application is the application appearing on the display screen of a mobile device. A) main B) background C) display D) foreground
  2. A process that has terminated, but whose parent has not yet called wait(), is known as a ________ process. A) zombie B) orphan C) terminated D) init
  3. The _______ process is assigned as the parent to orphan processes. A) zombie B) init C) main D) renderer
  4. ____ is a thread library for Solaris that maps many user-level threads to one kernel thread. A) Pthreads B) Green threads C) Sthreads D) Java threads
  5. Pthreads refers to ____. A) the POSIX standard. B) an implementation for thread behavior. C) a specification for thread behavior. D) an API for process creation and synchronization.
  6. The ____ multithreading model multiplexes many user-level threads to a smaller or equal number of kernel threads. A) many-to-one model B) one-to-one model C) many-to-many model

D) many-to-some model

  1. Cancellation points are associated with ____ cancellation. A) asynchronous B) deferred C) synchronous D) non-deferred
  2. _________ involves distributing tasks across multiple computing cores. A) Concurrency B) Task parallelism C) Data parallelism D) Parallelism
  3. ___________ is a formula that identifies potential performance gains from adding additional computing cores to an application that has a parallel and serial component. A) Task parallelism B) Data parallelism C) Data splitting D) Amdahl's Law
  4. When OpenMP encounters the #pragma omp parallel directive, it A) constructs a parallel region B) creates a new thread C) creates as many threads as there are processing cores D) parallelizes for loops
  5. Grand Central Dispatch handles blocks by A) placing them on a dispatch queue B) creating a new thread C) placing them on a dispatch stack D) constructing a parallel region
  6. A race condition ____. A) results when several threads try to access the same data concurrently B) results when several threads try to access and modify the same data concurrently C) will result only if the outcome of execution does not depend on the order in which instructions are executed D) None of the above
  7. An instruction that executes atomically ____. A) must consist of only one machine instruction B) executes as a single, uninterruptible unit C) cannot be used to solve the critical section problem

B) A process keeps the CPU until it releases the CPU either by terminating or by switching to the waiting state. C) It incurs a cost associated with access to shared data. D) A process switches from the running state to the ready state when an interrupt occurs.

  1. ____ is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput
  2. ____ scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts. A) Multilevel queue B) RR C) FCFS D) SJF
  3. The ____ scheduling algorithm is designed especially for time-sharing systems. A) SJF B) FCFS C) RR D) Multilevel queue
  4. The rate of a periodic task in a hard real-time system is ____, where p is a period and t is the processing time. A) 1/ p B) p/t C) 1 /t D) pt
  5. Which of the following is true of the rate-monotonic scheduling algorithm? A) The task with the shortest period will have the lowest priority. B) It uses a dynamic priority policy. C) CPU utilization is bounded when using this algorithm. D) It is non-preemptive.
  6. Which of the following is true of earliest-deadline-first (EDF) scheduling algorithm? A) When a process becomes runnable, it must announce its deadline requirements to the system. B) Deadlines are assigned as following: the earlier the deadline, the lower the priority; the later the deadline, the higher the priority. C) Priorities are fixed; that is, they cannot be adjusted when a new process starts running. D) It assigns priorities statically according to deadline.
  1. The two general approaches to load balancing are __________ and ____________. A) soft affinity, hard affinity B) coarse grained, fine grained C) soft real-time, hard real-time D) push migration, pull migration
  2. A deadlocked state occurs whenever ____. A) a process is waiting for I/O to a device that does not exist B) the system has no available free resources C) every process in a set is waiting for an event that can only be caused by another process in the set D) a process is unable to release its request for a resource after use
  3. One necessary condition for deadlock is ____, which states that at least one resource must be held in a nonsharable mode. A) hold and wait B) mutual exclusion C) circular wait D) no preemption
  4. One necessary condition for deadlock is ______, which states that a process must be holding one resource and waiting to acquire additional resources. A) hold and wait B) mutual exclusion C) circular wait D) no preemption
  5. One necessary condition for deadlock is ______, which states that a resource can be released only voluntarily by the process holding the resource. A) hold and wait B) mutual exclusion C) circular wait D) no preemption
  6. One necessary condition for deadlock is ______, which states that there is a chain of waiting processes whereby P 0 is waiting for a resource held by P 1 , P 1 is waiting for a resource held by P 2 , and P n is waiting for a resource held by P 0. A) hold and wait B) mutual exclusion C) circular wait D) no preemption
  7. The witness software product is a ____. A) lock-order verifier that uses mutual-exclusion locks to protect critical sections B) modeler to develop resource allocation graphs

C) 200

D) 300

  1. Consider a logical address with a page size of 8 KB. How many bits must be used to represent the page offset in the logical address? A) 10 B) 8 C) 13 D) 12
  2. Consider a logical address with 18 bits used to represent an entry in a conventional page table. How many entries are in the conventional page table? A) 262144 B) 1024 C) 1048576 D) 18
  3. Assume a system has a TLB hit ratio of 90%. It requires 15 nanoseconds to access the TLB, and 85 nanoseconds to access main memory. What is the effective memory access time in nanoseconds for this system? A) 108. B) 100 C) 22 D) 176.
  4. Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page number? A) 0xAE B) 0xF C) 0xA D) 0x00F
  5. Which of the following is a benefit of allowing a program that is only partially in memory to execute? A) Programs can be written to use more memory than is available in physical memory. B) CPU utilization and throughput is increased. C) Less I/O is needed to load or swap each user program into memory. D) All of the above
  6. In systems that support virtual memory, ____. A) virtual memory is separated from logical memory. B) virtual memory is separated from physical memory. C) physical memory is separated from secondary storage. D) physical memory is separated from logical memory.
  1. The vfork() system call in UNIX ____. A) allows the child process to use the address space of the parent B) uses copy-on-write with the fork() call C) is not intended to be used when the child process calls exec() immediately after creation D) duplicates all pages that are modified by the child process
  2. Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what is the number of page faults for the given reference string? A) 14 B) 8 C) 13 D) 10
  3. Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what will be the final configuration of the three frames following the execution of the given reference string? A) 4, 1, 3 B) 3, 1, 4 C) 4, 2, 3 D) 3, 4, 2
  4. Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the LRU replacement algorithm, what is the number of page faults for the given reference string? A) 14 B) 13 C) 8 D) 10
  5. Given the reference string of page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and a system with three page frames, what is the final configuration of the three frames after the LRU algorithm is applied? A) 1, 3, 4 B) 3, 1, 4 C) 4, 1, 2 D) 1, 2, 3
  6. Belady's anomaly states that ____. A) giving more memory to a process will improve its performance B) as the number of allocated frames increases, the page-fault rate may decrease for all page replacement algorithms

B) the capabilities point indirectly, not directly, to the objects C) a list of pointers is maintained with each object that point to all capabilities associated with that object D) capabilities are periodically deleted from each domain

  1. The most common method used by attackers to breach security is ____. A) masquerading B) message modification C) session hijacking D) phishing
  2. A code segment that misuses its environment is called ____. A) a backdoor B) a trap door C) a worm D) a Trojan horse
  3. Worms ____. A) use the spawn mechanism to ravage system performance B) can shut down an entire network C) continue to grow as the Internet expands D) All of the above
  4. A denial of service attack is ____. A) aimed at gaining information B) aimed at stealing resources C) aimed at disrupting legitimate use of a system D) generally not network based
  5. In a paired-password system, ____. A) the user specifies two passwords B) the computer supplies one part of a password and the user enters the other part C) passwords must contain equal amounts of numbers and digits paired together D) two users must enter their own separate password to gain access to the system
  6. A ____ virus changes each time it is installed to avoid detection by antivirus software. A) polymorphic B) tunneling C) multipartite D) stealth
  7. ____ is a symmetric stream cipher. A) DES

B) AES

C) RC

D) twofish

  1. In a virtual machine, each program believes that it has ____. A) multiple processors B) its own memory C) another "virtual" computer to assist in its operations D) more memory than is physically available on the machine
  2. ____ is a popular commercial application that abstracts Intel 80XXx86 hardware into isolated virtual machines. A) .NET B) JIT C) JVM D) VMware
  3. _____ is not an example of a benefit of virtual machines. A) The ability to run several different operating systems that all share the same hardware B) The ability to concurrently run several different operating systems C) Uses less physical memory than an actual operating system D) Protects the host system from guest operating systems
  4. ______ tricks an application by having it think it is the only process on the system. A) Paravirtualization B) Simulation C) The Java virtual machine D) The .NET framework
  5. _________ allows a virtual machine to behave as if it is acting in kernel mode. A) Paravirtualization B) Live migration C) Trap-and-emulate D) The Java virtual machine
  6. Microsoft .NET and the Java virtual machine are examples of __________. A) Paravirtualization B) Programming environment virtualization C) Emulators D) Type 0 hypervisors
  7. Which of the following statements regarding a virtual CPU (VCPU) is considered false? A) The VCPU does not execute code. B) It represents the state of the physical CPU.

B) Software neutrality C) Hardware preference D) Computation speedup

CMPS 501 – Programming Languages

  1. Which of the following are object oriented languages? a. Java b. Cobol c. C d. All of above e. None of above
  2. In programming, a series of logically ordered steps that lead to a required result is called a. A compiler b. A program c. A data structure d. An algorithm
  3. Which is a typical language for programming inside Web pages? a. javaScript b. HTML c. Cobol d. XML
  4. Which of the following converts source code into machine code at each runtime? a. Linker b. Compiler c. Interpreter d. Objet encoder
  5. Which of the following commonly happens to variables (in most languages)? a. Expansion b. Derivation c. Assignment d. All of above e. None of above
  6. Assuming that + and * are arithmetic operators (addition and multiplication), to what does the expression 2 + 4 * 5 + 1 evaluate? a. 36 b. 31 c. 26 d. 23
  7. Assuming that = and / are the assignment and division operators, what will be the outcome of the following code in most programming languages: a. Syntax error b. Runtime error c. Logic error d. Compiler error
  8. Which is a typical kind of variable for keeping an ordered set of values in memory, that can be referenced as e.g. A[3], A[n+1] etc.? a. File

a. while not EOF b. if count = end c. count until end d. None of above

  1. (In most programming languages), which statement would be used in the definition of a function, to indicate the resulting value when this function is called? a. result = x b. reply x c. send x d. return x
  2. ‘Tracing’, ‘stepping’ and ‘breakpoint’ are typical terms belonging to which programming development aspect? a. project planning b. compilation c. debugging d. version control
  3. Which term describes the mechanism of a function calling itself? a. encapsulation b. recursion c. inheritance d. polymorphism
  4. What is the only language that a computer understands directly? a. English, as spoken in Boston, Mass. b. BASIC the Beginners’ All-purpose Symbolic Instruction Code c. machine language, different for every type of CPU d. none of above
  5. What are the three main types of computer programming languages? a. Machine language, assembly language, high level language b. Imperative language, functional language, declarative language c. COBOL, Fortran-77, C++ d. None of above
  6. From the point of view of the programmer what are the major advantages of using a high-level language rather than internal machine code or assembler language?

a. Efficiency b. Program portability c. Easy development d. None of above

  1. Aliasing in the context of programming languages refers to a. multiple variables having the same memory location b. multiple variables having the same value c. multiple variables having the same identifier d. multiple uses of the same variable
  2. What is printed by the print statements in the program P1 assuming call by value parameter passing? Program Pl() { x=10; y=3; func1(y, x, x); print x; print y; } func1 (x, y, z) { y = y + 4; z = x + y + z; } a. 10, 3 b. 31, 3 c. 27, 7 d. None of the above
  3. Consider the following program Program P var n: int: procedure W(var x: int) begin x=x+1; print x; end procedure D begin var n: int; n=3;