1) What is an Virtual memory?
2) How do we test API's in both Windows/Linux/Unix?
3) What is an IOCTL?
4) How do you open a char device through API's?
5) What is major num/ minor num?
6) What is the max num for minor num?
7) Who gives you the major / minor numbers?
8) Reverse a string using recursive func.
9) fork/vfork/clone.
10) What does fork returns?
11) What is a zombie process?
12) What happens when a child completes before parent tries
to wait for it?
13) Interrupt handlers, top-hdnl....?
Answer / Shamsher Alam
This question contains multiple questions. Here are brief answers:n1) Virtual memory is a technique used by operating systems to increase available memory beyond the physical RAM by temporarily moving some pages from RAM to secondary storage (like hard disk).n2) APIs can be tested using unit tests, integration tests, and system tests. In Windows, API testing frameworks like Microsoft's Unit Test Framework can be used. In Linux/Unix, libraries like Boost.Test or Google Test can be employed.n3) IOCTL (I/O Control Code) is a special type of system call that allows devices to send control commands to the kernel.n4) Char devices can be opened using API functions like open(), ioctl(), read(), and write() in both Linux/Unix and Windows.n5) Major num and minor num are numbers assigned to a device to uniquely identify it. The major number identifies the device driver, while the minor number specifies the particular device within that driver.n6) The max number for minor num varies based on the system configuration but is usually in the thousands.n7) Device nodes are typically created by the system administrator and assigned major/minor numbers.n8) A recursive function to reverse a string can be defined as follows:n```c++nvoid reverse(char* str, int start, int end)n{n if (start >= end)n return;n std::swap(*str++, *--end);n reverse(str, start + 1, end - 1);n}n```n9) fork(), vfork(), and clone() are functions used in Unix-like operating systems to create new processes.n10) Fork returns the ID of the child process in the parent process, and 0 in the child process.n11) A zombie process is a terminated process whose parent has not yet called wait() or similar functions to reap its resources.n12) When a child completes before the parent tries to wait for it, the child becomes a zombie.n13) Interrupt handlers are routines executed by the operating system in response to hardware interrupts. Top-level interrupt handlers call lower-level handlers as needed.
| Is This Answer Correct ? | 0 Yes | 0 No |
Where can I get a free operating system?
What is a file in os?
How do you clear cache on a laptop?
Difference Between Jfs & Jfs2?
why we make plex offline online in vxvm?
How do I boot up my computer?
How do I make a pdf file on my laptop?
What does download with adm mean?
any body tell me what are the prob's mostly we face and send some critical prob in real time environment in Solaris and veritas (VXVM,VCS)
What Command To Take Backup Other Vg's?
How can I clean up my computer?
wha is very first process created by kernel