Sample Paper - CS609
Sample Paper - CS609
FINALTERM EXAMINATION
Fall 2022
CS609 – System Programming
Time: 90 min
Marks: 60
3. From which structure, we obtain the newly created child process’s handle and ID?
A. LPSTARTUPINFO structure
B. LPPROCESS_INFORMATION structure
C. lpEnvironment Variable
D. LPSECURITY_ATTRIBUTES
6. In Implicit linking, the library functions are linked to the source code at ______.
A. Written time
B. Compile time
C. Run time
D. Load time
17. A unit of execution that is scheduled by the application rather than by the OS Kernel, is
called as _______.
A. Fiber
B. Thread
C. Process
D. Mutex
18. A fiber can obtain its starting address by using the API __________.
A. CreateFiber()
B. GetFiberData()
C. GetCurrrentFiber()
D. ConvertThreadToFiber()
20. Which one of the following is not a Process or thread synchronization object?
A. Fiber
B. Critical Section
C. Mutex
D. Semaphore
22. Which one of the following is not a requirement for correct thread code?
A. Global Storage
B. Volatile Storage
C. Memory Barrier
D. Critical Code Region
24. The code region where only one thread can execute at a time is known as ___________.
A. program
B. critical section
C. non – critical section
D. Exception Handler
25. Which one of the following APIs block a thread if another thread is in the section?
A. InitializeCriticalSection
B. EnterCriticalSection
C. DeleteCriticalSection
D. LeaveCriticalSection
26. Which one of the following numbers is good spin count for heap management according
to MSDN?
A. 1000
B. 2000
C. 3000
D. 4000
27. Which one of the following concepts limit the number of active, contending threads?
A. Mutual Exclusion
B. Thread Contention
C. Semaphore Throttle
D. Parallelism
Question No: 28 (Marks: 01) - Please choose the correct option
28. Which one of the following APIs returns a pointer to a TP_WORK structure?
A. TrySubmitThreadpoolCallback
B. WaitForThreadpoolWorkCallbacks
C. CreateThreadpoolWork
D. SubmitThreadpoolWork
30. Which one of the following options best describe the mutex?
A. is a binary mutex
B. does not have handles
C. must be accessed from only one process
D. can be accessed from multiple processes
31. What will happen if a non-recursive mutex is locked more than once?
A. Starvation
B. Deadlock
C. Critical Section
D. Semaphore
34. Instead of starting a new thread for every task to execute concurrently, the task can be
passed to a _______.
A. process
B. thread pool
C. thread queue
D. CPU
35. Each process has its own process affinity mask, which is a _______ vector.
A. bit
B. byte
C. Nibble
D. Word
38. Which one of the followings has two handles: Read handle and Write handle?
A. Named Pipes
B. Anonymous Pipes
C. Unnamed Pipes
D. Interprocess Pipes
Question No: 39 (Marks: 01) - Please choose the correct option
What is Explicit Linking and which Windows API is used to load a DLL explicitly inside
a program?
Answer
Name the two Windows APIs that are used to return the pseudo and real handle of a
process.
Answer
Briefly describe the two parameters associated with the following Windows API.
FARPROC GetProcAddress(HMODULE hModule, LPCSTR lpProcName)
Answer
Question No: 44 (Marks: 03)
Mention the names of two type of events and which function is used to set these types?
Answer
Answer
Answer
Answer
Write the name of functions or APIs used for the following tasks.
1. Creating a job object
2. Opening a named job object
3. Adding a process to a job object
4. To destroy or close job object
Answer
Which Windows API is used to release the ownership of a mutex? Also write its
signature.
Answer
Answer