Skip to content
VUBuddy

CS609 Final Term Solved Subjective by Junaid

System Programming PDF 856 KBUpdated 23 Oct 2026
Final term past paper CS609 Final Term Solved Subjective by Junaid PDF 856 KB
vubuddy.com
Type
Final term past paper
Course
CS609 System Programming
Size
PDF 856 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 856 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 2, 3, 4 of 18. Download the file for all 18 pages.

  1. How a DLL file is loaded inside a program during explicit linking? Mention the API that is used for this purpose.
  2. Write the names of functions that are used to determine the amount of time consumed by:

1. Process

2. Thread

 GetProcessTime()  GetThreadTime()

Q3. When a thread enters into the critical section and is not willing to leave the critical section, then what will its consequences?

Answer: If a thread enters into the critical section and is not willing to leave the critical section, the following consequences occurs.

  •  Deadlock
  •  Starvation
  •  Reduce System Performance
  1. Write the first two steps required for mapping a file to a region in virtual address space of a calling process.
  •  Open File with at least GENERIC_READ access.
  •  Map the file using CreateFileMapping() or OpenFileMapping ()
  1. What is the purpose of InitializeCriticalSection and Spin Count API? Also mention the names of its parameter.

Answer: The InitializeCriticalSectionAndSpinCount API is used to initialize a critical section object in Windows with a spin count, which allows for better performance by using spinning instead of waiting. Its parameters are the critical section object to initialize and the spin count.

The names of its parameter:

VOID InitializeCriticalSection(LPCRITICAL_SECTION lpCriticalSection)

Q6. What is Explicit Linking and which Windows API is used to load a DLL explicit inside a program?

ANSWER

The Windows API used to load a DLL explicitly inside a program is called " LoadLibrary".

  1. Name any Two Windows API That are used to return the Pseudo and real handle of a process.
  •  GetCurrentProress() GetCurrentProcess() is used to create a psuedohandle. It’s not inheritable and desired access attributes are undefined.
  •  GetCurrentProcessId() The OpenProcess() function is used to obtain the process handle using the process ID obtained by GetCurrentProcessId() or otherwise.
  1. Briefly Describe the two parameters associated with the following windows API. FARPROC GetProcessAddress(HMODULE hModule, LPCSTR lpProcName).

Answer: The Windows API " GetProcAddress" is used to retrieve the address of an exported function or variable from a specified dynamic-link library (DLL). It takes two parameters

  • HMODULE hModule: is an instance produced by LoadLibrary
  • LPCSTR lpProcName lpProcName cannot b UNICODE. It is the name of the function whose entry point is to be obtained. Its return type is FARPROC.

9. In what situation the termination handler is ignore by a process

A process can exit using the API ExitProcess(). The function does not return, in fact the process and all its associated threads terminate. Termination Handlers are ignored.

Q10. Which window function is used to convert thread into fiber?

Answer: ConvertThreadToFiber

11. Write the signature of InterlockedExchange() API with its return type and parameters

Answer: LONG InterlockedExchange( LONG volatile *Target, LONG Value

return type and parameters is Loong Integer

  1. Write the name of the API which is used to map the view of a file mapping into the address space of a process

Answer: LPVOID MapViewOfFile( HANDLE hFileMappingObject,

DWORD dwDesiredAccess,

DWORD dwFileOffsetHigh,

DWORD dwFileOffsetLow,

SIZE_T dwNumberOfBytesToMap );

Note: The name of the API is MapViewOfFile.

Q13. Write the name of the API which is used to open map the view of a file mapping into the address space of a process?

HANDLE OpenFileMapping(

DWORD dwDesiredAccess,

BOOL bInheritHandle,

LPCSTR lpMapName );

All CS609 files →
CS609 System Programming All CS609 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.