Quiz
OS for Programmers
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (26)
1The ____ of a process contains temporary data such as function parameters, return addresses, and local variables.
- AText section
- BData Section
- CProgram Counter
- DStack
2When a child process is created, which of the following is a possibility in terms of the execution or address space of the child process?
- AThe child process runs concurrently with the parent.
- BThe child process has a new program loaded into it.
- CThe child is a duplicate of the parent.
- DAll of the above
3A _________________ saves the state of the currently running process and restores the state of the next process to run.
- Asave and restore
- Bstate switch
- Ccontext switch
- Dnone of the above
4A process may transition to the Ready state by which of the following actions
- Acompletion of an I/O event
- Bawaiting its turn on the CPU
- Cnewly admitted process
- Dall of the above
5Child processes inherit UNIX ordinary pipes from their parent process because:
- AThe pipe is part of the code and children inherit code from their parents.
- BA pipe is treated as a file descriptor and child processes inherit open file descriptors from their parents.
- CThe STARTUPINFO structure establishes this sharing.
- DAll IPC facilities are shared between the parent and child processes
6A process that has terminated, but whose parent has not yet called wait(), is known as a ________ process.
- Azombie
- Borphan
- Cterminated
- Dinit
7_____ is not considered a challenge when designing applications for multicore systems.
- ADeciding which activities can be run in parallel
- BEnsuring there are sufficient number of cores
- CDetermining if data can be separated so that it is accessed on separate cores
- DIdentifying data dependencies between tasks
8The most common technique for writing multithreaded Java programs is _____.
- Aextending the Thread class and overriding the run() method
- Bimplementing the Runnable interface and defining its run() method
- Cdesigning your own Thread class
- Dusing the CreateThread() function
9_________ involves distributing tasks across multiple computing cores.
- AConcurrency
- BTask parallelism
- CData parallelism
- DParallelism
10Grand Central Dispatch handles blocks by ____.
- Aplacing them on a dispatch queue
- Bcreating a new thread
- Cplacing them on a dispatch stack
- Dconstructing a parallel region
11what is the correct order of operations for protecting a critical section using mutex locks?
- Arelease() followed by acquire()
- Bacquire() followed by release()
- Cwait() followed by signal()
- Dsignal() followed by wait()
12Assume an adaptive mutex is used for accessing shared data on a Solaris system with multiprocessing capabilities. Which of the following statements is not true?
- AA waiting thread may spin while waiting for the lock to become available.
- BA waiting thread may sleep while waiting for the lock to become available.
- CThe adaptive mutex is only used to protect short segments of code.
- DCondition variables and semaphores are never used in place of an adaptive mutex.
13_____ is/are not a technique for managing critical sections in operating systems.
- APeterson's solution
- Bpreemptive kernel
- CNon-preemptive kernel
- Dsemaphores
14Which of the following statements is true?
- AOperations on atomic integers do not require locking.
- BOperations on atomic integers do require additional locking.
- CLinux only provides the atomic_inc() and atomic_sub() operations.
- DOperations on atomic integers can be interrupted. Incorrect
15Which of the following is true of multilevel queue scheduling?
- AProcesses can move between queues.
- BEach queue has its own scheduling algorithm.
- CA queue cannot have absolute priority over lower-priority queues.
- DIt is the most general CPU-scheduling algorithm.
16The Linux CFS scheduler identifies _____________ as the interval of time during which every runnable task should run at least once.
- Avirtual run time
- Btargeted latency
- Cnice value
- Dload balancing
17______ allows a thread to run on only one processor.
- Aprocesson affinity
- Bprocessor set
- CNUMA
- Dload balancing
18The two general approaches to load balancing are _______________ and ________________
- Asoft affinity, hard affinity
- Bcoarse-grained, fine-grained
- Csoft real-time, hard real-time
- Dpush migration, pull migration
19Which of the following would be an acceptable signal handling scheme for a multithreaded program?
- ADeliver the signal to the thread to which the signal applies.
- BDeliver the signal to every thread in the process.
- CDeliver the signal to only certain threads in the process.
- DAll of the above
20Consider 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?
- A10
- B8
- C13
- D12
21________ allows the parent and child processes to initially share the same pages, but when either process modifies a page, a copy of the shared page is created.
- Acopy on write
- Bzero fill on demand
- Cmemory mapped
- Dvirtual memory fork
22Consider 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?
- A262144
- B1024
- C1048576
- D18
23_____ occurs when a process spends more time paging than executing.
- AThrashing
- BMemory mapping
- CDemand paging
- DSwapping
24Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page offset?
- A0xAE
- B0xF9
- C0xA
- D0xF900
25Which of the following statements is false with regard to Solaris memory management?
- AThe speed at which pages are examined (the scan rate) is constant.
- BThe page out process only runs if the number of free pages is less than lotsfree.
- CAn LRU approximation algorithm is employed.
- DPages selected for replacement may be reclaimed before being placed on the free list.
26Consider a 32-bit address for a two-level paging system with an 8 KB page size. The outer page table has 1024 entries. How many bits are used to represent the second-level page table?
- A10
- B8
- C12
- D9
Information
- Description
- Information Technology Quiz on OS for Programmers, created by Arun Menon on 07/10/2016.
- Author
- Arun Menon
- Language
- English
- Views
- 4
- Tags
- Rating
- No ratings yet Rate this quiz