0% found this document useful (0 votes)
149 views21 pages

CS609 Solved Subjective Final Term by Junaid

by junaid

Uploaded by

fur66786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views21 pages

CS609 Solved Subjective Final Term by Junaid

by junaid

Uploaded by

fur66786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

CS609-System Programming

(Solved Macq’s)
For Final Term
CURRENT
SUBJECTIVE
Junaidfazal08@gmail.com FOR MORE VISIT JUNAID MALIK
Bc190202640@vu.edu.pk VULMSHELP.COME 0304-1659294
AL-JUNAID TECH INSTITUTE
1. What are the number of handles assigned to single anonymous pipe,
mention their names also.
Answer:
Anonymous pipes allow one-way (half-duplex) communication. They
can be used to perform byte-based IPC.
Each pipe has two handles:
 a read Handle
 a write Handle
2. What are the 2 types of time required for computing elapsed time of
process?
Answer:
 User Time
 System Time
3. During the creation of a process, how is the image executable name
specified when using CreateProcess() API, also write the two
parameters used for it?
Answer:
When using the CreateProcess API in Windows to create a new
process, the image executable name can be specified using the Following
Parameters
 lpApplicationName
 lpCommandLine
Either lpApplicationName or lpCommandLine specifies the executable image.
Usually lpCommandLine is used, in which case lpApplicationName is set to
NULL.
4. What is the function used to move a running thread to wait or suspend
state. Write the general syntax of the function.
Answer:
In Windows, the function used to suspend a running thread and move
it to the wait or suspend state is SuspendThread. This function decreases the
suspend count of a thread and can eventually cause the thread to stop
executing if the count is greater than zero.
AL-JUNAID TECH INSTITUTE
DWORD SuspendThread(
HANDLE hThread
);

5. What is the return value of WaitForSingleObject if the object has been


abandoned?
Answer:
The WaitForSingleObject function in Windows can return several values
indicating the result of the wait operation. If the object being waited on has
been abandoned, the function returns WAIT_ABANDONED.
Return Values
Here are the possible return values of WaitForSingleObject:
 WAIT_OBJECT_0: The state of the specified object is signaled.
 WAIT_TIMEOUT: The time-out interval elapsed, and the object’s
state is nonsignaled.
 WAIT_ABANDONED: The wait was satisfied because the thread that
owned the mutex object terminated without releasing it. Ownership of
the mutex object is granted to the calling thread, and the mutex is set
to nonsignaled.
 WAIT_FAILED: The function has failed. To get extended error
information, call GetLastError.

6. Write the function signature of CreatePipe(). Also write its parameters


and return type.
Answer:
The CreatePipe function in Windows is used to create an anonymous
pipe, which can be used for interprocess communication.
BOOL CreatePipe (
PHANDLE phRead,
PHANDLE phWrite,
LPSECURITY_ATTRIBUTES lpsa,
DWORD cbPipe);
The return type is BOOL

7. Write the signature of OpenFileMapping


Answer:
HANDLEOpenFileMapping (
AL-JUNAID TECH INSTITUTE
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCTSTR lpMapName )

8. Write the general structure of GetProcessTime (it has 5 parameters


Answer:
BOOL GetProcessTimes (
HANDLE hProcess,
LPFILETIME lpCreationTime,
LPFILETIME lpExitTime,
LPFILETIME lpKernelTime,
LPFILETIME lpUserTime );
9. What is the name and signature of the API used to set and retrieve
process priority classes
Answer:
BOOL SetPriorityClass(
HANDLE hProcess,
DWORD dwPriority)

DWORD GetPriorityClass(
HANDLE hProcess)
10.How a DLL file is loaded inside a program during explicit linking?
Mention the API that is used for this purpose.
ANSWER:
Explicit linking requires the program to explicitly a specific DLL to be
loaded or freed. Once the DLL is loaded then the program obtains the
address of the specific entry point and uses that address as a pointer in
function call. The function is not declared in the calling program.
Rather a pointer to a function is declared. The functions required are:
HMODULE LoadLibrary( LPCTSTR lpLibFileName );
11.Write the names of functions that are used to determine the amount of
time consumed by:
1. Process
2. Thread
ANSWER:
AL-JUNAID TECH INSTITUTE
 GetProcessTime()
 GetThreadTime()
12.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
13.Write the first two steps required for mapping a file to a region in
virtual address space of a calling process.
ANSWER:
 Open File with at least GENERIC_READ access.
 Map the file using CreateFileMapping() or OpenFileMapping ()
14.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)
15.What is Explicit Linking and which Windows API is used to load a DLL
explicit inside a program?
ANSWER
Explicit linking requires the program to explicitly a specific DLL to be
loaded or freed. Once the DLL is loaded then the program obtains the
address of the specific entry point and uses that address as a pointer in
function call. The function is not declared in the calling program.
Rather a pointer to a function is declared. The functions required are:
HMODULE LoadLibrary( LPCTSTR lpLibFileName );
The Windows API used to load a DLL explicitly inside a program is called
"LoadLibrary".
AL-JUNAID TECH INSTITUTE
16.Name any Two Windows API That are used to return the Pseudo and
real handle of a process.
ANSWER:
 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.
17.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.
18.In what situation the termination handler is ignore by a process
ANSWER:
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.
19.Which window function is used to convert thread into fiber?
ANSWER:
ConvertThreadToFiber
20.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
21.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:
AL-JUNAID TECH INSTITUTE
LPVOID MapViewOfFile( HANDLE hFileMappingObject,
DWORD dwDesiredAccess,
DWORD dwFileOffsetHigh,
DWORD dwFileOffsetLow,
SIZE_T dwNumberOfBytesToMap );
Note: The name of the API is MapViewOfFile.
22.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?
ANSWER:
HANDLE OpenFileMapping(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCSTR lpMapName );
Note: The name of the API is openFileMapping.
23.Suppose we have a semaphore named as hThrottleSem objects current
count is to be increased by 1 and the previous count is not required. you
need to write the code to release this semaphore using the above-
mentioned information.
Note: Make use of Windows API to release semaphore.
ANSWER:
ReleaseSemaphore function. code snippet to release the hThrottleSem
semaphore and increase its count by 1:
ReleaseSemaphore(hThrottleSem, 1, NULL);
OR
#include <windows.h>

// Assuming hThrottleSem is a global or shared handle to the semaphore


object

BOOL bPreviousCountNotNeeded = TRUE; // Set to TRUE to indicate


previous count is not required
AL-JUNAID TECH INSTITUTE
LONG lReleaseCount = 1; // Increase semaphore count by 1

LONG* lpPreviousCount = (bPreviousCountNotNeeded ? NULL :


&lReleaseCount); // Pass NULL if previous count is not needed

BOOL bSuccess = ReleaseSemaphore(hT\hrottleSem, lReleaseCount,


lpPreviousCount);

if (!bSuccess) {
// Handle error
}
24.Pointer declaration Windows: LPTSTR pFile = Null; define two based
pointers on the above pointer. take pSize and pIn as their names. their
types should be DWORD and TCHAR respectively.
ANSWER:
Assuming that TCHAR is defined as a wide-character (Unicode)
character type, here's how you can define two base pointers pSize and pIn
based on the LPTSTR pointer pFile:
Code:
DWORD* pSize = nullptr;
TCHAR** pIn = nullptr;

pSize = reinterpret_cast<DWORD*>(pFile);
pIn = reinterpret_cast<TCHAR**>(pFile + sizeof(DWORD));

Here, pSize is a pointer to a DWORD, and pIn is a pointer to a pointer to a


TCHAR.
25.What is the purpose of *Addend and Value parameter used in
InterlockedExchangeAdd() API?
ANSWER:
Increment is added to the *addend and the original value of *addend is
returned.
LONG InterlockedExchangeAdd(
LONG volatile *Addend,
LONG Increment);
26. VOID sleep(DWORD dwMilliseconds);
i. In above API if the parameter dwMilliseconds is specified as
INFINITE then what happened with threads.
ii. If the parameter dwMilliseconds is specified as 0 then what
happened with threads?
ANSWER:
AL-JUNAID TECH INSTITUTE
dwMilliseconds is the time period for wait
 If the dwMilliseconds parameter is specified as INFINITE:
INFINITE for indefinite wait
 If the dwMilliseconds parameter is specified as 0:
0 for no wait
27.(Give answer in Yes No)
I. Is it incorrect that Actual handle has its own security and
access attributes while the Pseudo handle has, no?
II. Name the API used for getting Pseudo handle.
III. Name the API used for getting Actual handle.
ANSWER:
I. Yes, it is incorrect. Both actual handles and pseudo handles have
security and access attributes associated with them, which are
used to determine whether a process or thread has permission to
access the object represented by the handle.
II. The API used for getting a pseudo handle is GetCurrentProcess.
III. The API used for getting an actual handle depends on the type of
object being opened.
OR
The API used for getting an Actual handle is process ID

28.Write the names of 4 functions used to create and manage Semaphores.


ANSWER:

 CreateSemaphore()
 CreateSemaphoreEx()
 OpenSemaphore()
 ReleaseSemaphore().
29.Briefly describe the following parameters that are used with
CreateProcess0 API.
I. LPCSIR lpApplication Name
II. BOOL bInheritHandles
III. LPVOID IpEnvironment
IV. LPCSIR 1pCurrentDirectory
ANSWER:
 LPCSTR lpApplicationName: It specify the program name
 BOOL bInheritHandles: It specifies weather the new inherit copies
of the calling process inherited handle.
 LPVOID lpEnvironment: This parameter is a pointer to an
environment block for the new process. If this parameter is NULL, the
AL-JUNAID TECH INSTITUTE
process uses parent’s process.
 LPCSTR lpCurrentDirectory: This parameter is a pointer to a null-
terminated string that specifies the current directory for the new
process.
30.Write the naming convention for the client and server when they are on
the same machine versus a different machine in Named Pipes?
ANSWER:
The client and server of the same machine
\\.\pipe\[path]pipename
The client and server of the same machine
 \\servername\pipe\pipename
31.What are based pointers. Write their syntax.
ANSWER:
Base pointer is actually offset and related to the other pointer.
Syntax:

 Type__ based (base) declarator


32.Multi-threaded network, is it possible to attach same DLL file?
Entry point in DLL file is Compulsory or optional?
ANSWER:
Yes, it is possible to attach the same DLL file in a multi-threaded network
application. The entry point in a DLL file is optional.
33.If CreateProcess() returns successfully then it returns 2 handles, write
their resources.
ANSWER:
When CreateProcess() returns successfully
It returns two handles:
 process handles
 thread handles.
The process handle is used to manipulate the process object, while the primary
thread handle is used to manipulate the main thread of the newly created
process.
34.What WaitForSingleObject() Returns if mutex is abandoned?
ANSWER:
WaitForSingleObject() is used to wait for a single specified object
If mutex is abandoned the return type is WAIT_ABANDONED
AL-JUNAID TECH INSTITUTE
35.WaitForMultipleObjects
ANSWER:
WaitForMultipleObjects can be used for more than 1 object, those objects are
defined in the form of an array.
return type is DWORD.
36.How many synchronization objects Windows Provide?
ANSWER:
Windows Provide four synchronization objects
 Mutexes
 Semaphores
 Events
 Critical Section
37.What is the return type of dwopenmutex
ANSWER:
The return type is a HANDLE.
38.Write the Syntax of InterlockedIncrement and InterlockedDecrement
ANSWER:
LONG InterlockedIncrement(
LONG volatile *lpAddend
);

LONG InterlockedDecrement(
LONG volatile *lpAddend
);
39.Threadpool Ky parameter and return type.
ANSWER:
the Ky parameter in the Threadpool API is a void pointer that can be used to
pass additional data to the callback function executed by the thread pool
worker thread, and the return type of the callback function depends on the
specific implementation and requirements of the application.
40.Return type of ThreadPool() is Boolean
ANSWER:
 CreateThreadpool()
 SubmitThreadpoolWork()
 WaitForThreadpoolWorkCallbacks().
41.WaitForThreadpoolWorkCallbacks() function explain
ANSWER:
The WaitForThreadpoolWorkCallbacks() function is used to wait for all
callbacks for a specified work object to complete before continuing execution.
which waits for all pending work associated with a thread pool to complete.
AL-JUNAID TECH INSTITUTE
The function takes a handle to a thread pool, and an optional flag to indicate
whether to cancel any remaining work items before waiting.
42.How many threads can enter the critical section?
ANSWER:
Only one thread can enter a critical section at a time. If another thread
tries to enter the same critical section while it is already occupied by another
thread, it will be blocked until the first thread exits the critical section.
43.Briefly explain system mask and process mask.
ANSWER:
In Windows programming, the system mask and process mask are
bitmaps used to indicate which processor(s) a thread is allowed to run on.
The system mask represents all available processors on the system,
while the process mask represents the subset of processors that are available
to a particular process.
44.Briefly describe each parameter in the following Widows API.
BOOL GetProcessTime(HANDLE hProcess,
LPFILETIME lpCreationTime,
LPFILETIME lpExitTime,
LPFILETIME lpKernelTime,
LPFILETIME lpUserTime );
ANSWER:
The GetProcessTimes() Windows API is used to retrieve timing
information about a specified process. The timing information include the
process that is creation time, exit time, kernel mode execution time and user
mode execution time. It’s return type is BOOL and it has Five parameters.
45.What is the purpose of dwPipeMode parameter in CreateNamedPipe()
API and mention the names of its two commonly used values.
ANSWER:
dwPipeMode parameter in CreateNamedPipe() can affect the behavior of
Writing to the Pipe.
The two commonly used values for this parameter are
 PIPE_WAIT
 PIPE_NOWAIT
46.Which Windows API is used to release the Ownership of mutex? Also
AL-JUNAID TECH INSTITUTE
Write its Signature
ANSWER:
The Windows API used to release the ownership of a mutex is called
ReleaseMutex().
The signature of the ReleaseMutex() API is as follows:
BOOL ReleaseMutex( HANDLE hMutex);
47.Name any third-party frameworks that are used for thread optimization.
ANSWER:
 OpenMP
 cilk++
48.Synchronization mutex thread thread model.
ANSWER:
A synchronization mutex is used in thread synchronization to ensure that only
one thread can access a critical section or a shared resource at a time. This is
a key component of the thread synchronization model, which is used to
coordinate and control the execution of multiple threads in a concurrent
program.
OR
Synchronization refers to the coordination of multiple threads or processes
to ensure that they access shared resources in a mutually exclusive and
coordinated manner. The mutex model is widely used in multithreaded
programming to prevent race conditions and ensure data consistency in shared
resources.
49. Syntax allocate and deallocate function
ANSWER:
Allocate:
allocate(<data_type>, <size>)
Deallocate:
deallocate(<pointer>)
50.Interlocked Function.
ANSWER:
Interlocked are mostly suited if the variables with volatile scopey only need
to incremented, decremented and exchange. It is faster, simpler and easy to
use.
The most basic of these functions are InterlockedIncrement() and
InterlockedDecrement().
51.Types of callback Functions.
ANSWER:
 CreateThreadpoolTimer()
 CreateThreadpoolIO()
AL-JUNAID TECH INSTITUTE
 CreateThreadpoolWait()
52.What is Critical section?
ANSWER:
Critical section is the part of the code that can only executed by one
thread at a time. CRITICAL_SECTION objects are initialized and deleted
but not a handle and not shared among process. Only one process can enter
into the critical section. If another thread enters into the critical section while
it has already occupied by another thread it will be blocked until when the
first thread exit from the critical section.

53.Write the name of setting pointer.


ANSWER:
 SetFilePointer()
 SetFilePointerEx()
54.Write the types of floating-point exception?
ANSWER:
 Invalid operation
 Division by zero
 Overflow
 Underflow
 Inexact calculation
55.Write the name of API that is used to remove the lock from the locked
file area?
ANSWER:
The name of API is used to remove the lock from the locked file area
depends on the operating system and programming being used.
56.CreatePipe parameters API
ANSWER:
BOOL CreatePipe (
PHANDLE phRead,
PHANDLE phWrite,
LPSECURITY_ATTRIBUTES lpsa,
DWORD cbPipe);
57.SetThreadAffinityMask
ANSWER:
DWORD_PTR SetThreadAffinityMask (
HANDLE hThread,
DWORD dwThreadAffinityMask);
58.Write the GetProcessAffinityMask parameters API for get and set these
masks a set of APIs
AL-JUNAID TECH INSTITUTE
ANSWER:
BOOL GetProccessAffinityMask (
HANDLE hprocess,
LPDWORD lpProcessAffinityMask,
LPDWORD lpSystemAffinityMask);
59.SetProcessAffinityMask()
ANSWER:
BOOL SetProcessAffinityMask (
HANDLE hNamedPipe,
DWORD_PTR dwProcessAffinityMask);
60.InterlockedExchangeAdd write the parameter or return type
ANSWEWR:
LONG InterlockedExchangeAdd(
LONG volatile *Addend,
LONG increment)
return type and parameters is Loong Integer
61.When thread Object is created, the space stack memory?
ANSWER:
Yes, when thread object is created a space in memory is allocated for
Thread’s Stack. The stack is a portion of memory that is used to store local
variables, function parameters, and return addresses for the functions called
by the thread.
62.Write the name of functions or APIs used for the following tasks.
I. Creating a job object
II. Opening a named job object
III. Adding a process to a job object
IV. To destroy or close job object
ANSWER:
I. The function used for creating a job object is CreateJobObject.

II. The function used for opening a named job object is OpenJobObject.

III. The function used for adding a process to a job object is


AssignProcessToJobObject.

IV. The function used for destroying or closing a job object is CloseHandle.

63.Mention the names of two type of events and which function is used to set
these types?
AL-JUNAID TECH INSTITUTE
ANSWER:
Two types of events are
 Manual-reset events
 Auto-reset events.
A manual-reset event can signal several waiting threads simultaneously
and can be reset. An auto-reset event signals a single waiting thread, and the
event is reset automatically.
64.What is the name of Windows API that is used to get and report error to
the user?
ANSWER:
The Windows API that is commonly used to get and report errors to the user
is called getlasterror() and FormatMessage
65.Write the name of three windows functions that are used to manage
Mutexes?
ANSWER:
 CreateMutex()
 ReleaseMutex()
 OpenMutex()
66.Write the general syntax of APIs thar are used for:
I. Allocating index in the Thread Local Storage (TLS)
II. Deallocating index in the Thread Local Storage (TLS)
ANSWER:
I. Allocating index in the Thread Local Storage (TLS)
DWORD TlsAlloc(VOID);
II. Deallocating index in the Thread Local Storage (TLS)
BOOL TlsFree(DWORD dwTlsIndex);

67.Write the Functionalities of the Following APIs.


I. GetLastError()
II. FormatMessage()
III. LocalFree()
ANSWER:
 GetLastError(): It will be used to get Last error.
AL-JUNAID TECH INSTITUTE
 FormatMessage(): retrieves the system error message associated with
a given error code and formats it into a user-readable string.
OR:
It translate the error code into a meaningful Languag
 LocalFree() frees: It is also used with formateMessage() to deallocate
the allocate memory
68.In the CreateNamePipe() API function the dwOpenMode specifies manay
flags. Name any Three
ANSWER:
 PIPE_ACCESS_DUPLEX
 PIPE_ACCESS_INBOUNT
 PIPE_ACCESS_OUTBOUND
69.Keeping in View the following syntax of DuplicationHandle() API,
answer the questions.
BOOL DuplicateHandle (
HANDLE hSourceProcessHandle,
HANDLE hSourceHandle,
HANDLE hTargetProcessHandle,
LPHANDLE lpTargetHandle,
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwOptions );

I. Mention the name of parameter that shows the original or real


handle.
OR
Which argument will provide the original source handle?

II. Mention the name of parameter that receives a copy of the original
handle.
OR
Which target handle will receive the pointer of original source?
NOTE: HERE is TWO type Question can be asked
ANSWER:
I. hSourceHandle
II. lpTargetHandle
AL-JUNAID TECH INSTITUTE
70.Consider the Following Code given below for using Thrtead pools.
Int_tmain(DWORD argc,LPTSTR argv[]){
INT nThread;
HANDLE *pWorkobjects;
THARG *pThreadArg;
TP_CALLBACK_ENVIRON cbe;
Nthread-_ttoi(argv[]);

You need to write code to first allocate memory to pWorkobjects using


maloc() then use CreateThreadpoolWork() api function to create a
thread pool worker object.
Considering the name of work call back is “Worker”.
ANSWER:

// Allocate memory for the array of work objects


pWorkobjects = (HANDLE*)malloc(nThread * sizeof(HANDLE));

// Initialize the thread pool callback environment


InitializeThreadpoolEnvironment(&cbe);

// Create the thread pool worker objects


for (int i = 0; i < nThread; i++) {
pThreadArg = (THARG*)malloc(sizeof(THARG));
pThreadArg->worknum = i;
pWorkobjects[i] = CreateThreadpoolWork(Worker, pThreadArg, &cbe);
}
71.Pulseevent its return type and parameters
ANSWER:
BOOL PulseEvent (HANDLE hEvent)
Return type is BOOL
72.SetEvent its return type and parameters
ANSWER:
BOOL SetEvenet (HANDLE hEvent)
AL-JUNAID TECH INSTITUTE
Return type is BOOL
73.ResetEvent its return type and parameters
ANSWER:
BOOL ResetEvent (HANDLE hEvent)
Return type is BOOL
74.Write the APIs Parameter of Openfilemapping.
ANSWER:
HANDLE OpenFileMapping (
DWORD dwDesiredAccess,
BOOL bInheritHandle,
LPCTSTR lpMapName
);
return type is Handle
75.Explain Memory barrier
ANSWER:
A memory is access in desired order use memory barrier. The
interlocked functions provide memory barrier. A Memory barrier is a
Hardware or software mechanism used memory is access in specific order. It
is used Synchronize data access between Multiple threads and prevent
unexpected result caused by inconsistent data ordering.
76. While CreatingNamedPipe, which options are available in
dwOpenMode
ANSWER:
dwOpenMode is the open mode which can be.
 PIPE_ACCESS_DUPLEX,
 PIPE_ACCESS_INBOUNT,
 PIPE_ACCESS_OUTBOUND along with many other options.

77.In Create file mapping, use these characteristics and show the API
 Given file name is hIN
 You do not want to set any security attributes.
 You want to use the file size.
 The file should be only PAGE_READONLY
 You do not want to share the map with any other process.

78.How many Simple Job management Command Line?


AL-JUNAID TECH INSTITUTE
ANSWER:
There are three Simple Job Management Command Line.
 Jobs
 Jobbg
 Kill
79.What is set functions?
ANSWER:
Set functions typically refer to a group of system calls or functions that allow
processes to manipulate sets of file descriptors or other types of system
resources.
Some common set functions in operating systems include
 Select()
 waitpid()
 sigprocmask()
80.Write the Functionality of flags?
ANSWER:
Flags are variables or values that can be set or cleared to indicate a
specific condition or status within a program or system. They are commonly
used to control program flow, enable or disable features, and represent binary
states. The main functionality of flags is to provide a simple and efficient way
for programs to store and check the status of various conditions or settings.
They allow programs to make decisions based on specific conditions or states,
which can improve efficiency and accuracy.
81.Write the parameter of DLLMain().
ANSWER:
BOOL DllMain
(
HINSTANCE hDll,
DWORD Reason,
LPVOID lpReserved
)
82.Is this statement correct fiber are scheduled by OS and thread are
scheduled by application? Is this correct or incorrect.
ANSWER:
It is incorrect statement,
Because Fiber schedule by Application and thread Schedule By OS
83. CreateThreadpoolWork
AL-JUNAID TECH INSTITUTE
ANSWER:
PTP_WORK CreateThreadpoolWork (
PTP_WORK_CALLBACK pfnwk,
PVOID pv,
PTP_CALLBACK_ENVIRON pcbe);
84. As a default, if a system Affinity mask=24 bits, then What is indicate?
ANSWER:
24-bit affinity mask in a system indicates that the mask can represent up to 24
processors or processor groups
85. Which type of problem is solved through Memory Barrier? main drawback of
Memory Barrier
ANSWER:
The problem is given
 Memory Consistency
 Cache Coherent
The Main Draw back of Memory Barrier is Decrease Performance
86.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy