Java Basic Programs For Interview Pdf

Posted on

Frequently asked Basic UNIX Interview Questions With Answers Download PDF file. Frequently asked Basic UNIX Interview Questions With Answers Download PDF file. Also you can Download this UNIX Interview Questions With Answers as a PDF file. How do you execute one program from within another The system calls used for low level process creation are execlp and execvp. The execlp call overlays the existing program with the new one, runs that and exits. The original program gets back control only when an error occurs. NULLA variant of execlp called execvp is used when the number of arguments is not known in advance. NULL2.     What is IPCWhat are the various schemes available The term IPC Inter Process Communication describes various ways by which different process running on some operating system communicate between each other. Various schemes available are as follows Pipes One way communication scheme through which different process can communicate. The problem is that the two processes should have a common ancestor parent child relationship. However this problem was fixed with the introduction of named pipes FIFO. Message Queues Message queues can be used between related and unrelated processes running on a machine. Shared Memory This is the fastest of all IPC schemes. The memory to be shared is mapped into the address space of the processes that are sharing. The speed achieved is attributed to the fact that there is no kernel involvement. But this scheme needs synchronization. Various forms of synchronisation are mutexes, condition variables, read write locks,     record locks, and semaphores. What is the difference between Swapping and Paging Swapping Whole process is moved from the swap device to the main memory for execution. Process size must be less than or equal to the available main memory. It is easier to implementation and overhead to the system. Swapping systems does not handle the memory more flexibly as compared to the paging systems. Paging Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter. Java Basic Programs For Interview Pdf' title='Java Basic Programs For Interview Pdf' />Java Basic Programs For Interview PdfJava Collection Framework Interview Question with Answer for experienced Java developers, programmers. This page has a good collection of SOAP interview questions and answers. At the end of this section there is a PDF guide about SOAP which will give some more. Read to. VB. NET what is the difference between java technology and. Answers are available for this question. Learn Java Security by Interview Questions and Answers. Java Tutorial for Beginners Learn Java in simple and easy steps starting from basic to advanced concepts with examples including Java Syntax Object Oriented. It is C programming FAQ code examples to Crack Interview. It has C language basic and simple source code by examples. It has arranged just like c tutorials with examples. Java-Enterprise-Edition-Tutorial.png' alt='Java Basic Programs For Interview Pdf' title='Java Basic Programs For Interview Pdf' />Java Basic Programs For Interview PdfGives the concept of the virtual memory. It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in the main memory simultaneously. Allows the greater process size than the available physical memory. Demand paging systems handle the memory more flexibly. What is major difference between the Historic Unix and the new BSD release of Unix System V in terms of Memory ManagementHistoric Unix uses Swapping entire process is transferred to the main memory from the swap device, whereas the Unix System V uses Demand Paging only the part of the process is moved to the main memory. Historic Unix uses one Swap Device and Unix System V allow multiple Swap Devices. In what way the Fault Handlers and the Interrupt handlers are different Fault handlers are also an interrupt handler with an exception that the interrupt handlers cannot sleep. Fault handlers sleep in the context of the process that caused the memory fault. The fault refers to the running process and no arbitrary processes are put to sleep. What is validity fault If a process referring a page in the main memory whose valid bit is not set, it results in validity fault. The valid bit is not set for those pages that are outside the virtual address space of a process, that are the part of the virtual address space of the process but no physical address is assigned to it. What does the swapping system do if it identifies the illegal page for swapping If the disk block descriptor does not contain any record of the faulted page, then this causes the attempted memory reference is invalid and the kernel sends a Segmentation violation signal to the offending process. This happens when the swapping system identifies any invalid memory reference. What are states that the page can be in, after causing a page fault On a swap device and not in memory, On the free page list in the main memory, In an executable file, Marked demand zero, Marked demand fill. In what way the validity fault handler concludes It sets the valid bit of the page by clearing the modify bit. It recalculates the process priority. At what mode the fault handler executes At the Kernel Mode. What do you mean by the protection fault Protection fault refers to the process accessing the pages, which do not have the access permission. A process also incur the protection fault when it attempts to write a page whose copy on write bit was set during the fork system call. How the Kernel handles the copy on write bit of a page, when the bit is set In situations like, where the copy on write bit of a page is set and that page is shared by more than one process, the Kernel allocates new page and copies the content to the new page and the other processes retain their references to the old page. After copying the Kernel updates the page table entry with the new page number. Then Kernel decrements the reference count of the old pfdata table entry. In cases like, where the copy on write bit is set and no processes are sharing the page, the Kernel allows the physical page to be reused by the processes. By doing so, it clears the copy on write bit and disassociates the page from its disk copy if one exists, because other process may share the disk copy. Then it removes the pfdata table entry from the page queue as the new copy of the virtual page is not on the swap device. It decrements the swap use count for the page and if count drops to 0, frees the swap space. For which kind of fault the page is checked first The page is first checked for the validity fault, as soon as it is found that the page is invalid valid bit is clear, the validity fault handler returns immediately, and the process incur the validity page fault. Kernel handles the validity fault and the process will incur the protection fault if any one is present. In what way the protection fault handler concludes After finishing the execution of the fault handler, it sets the modify and protection bits and clears the copy on write bit. It recalculates the process priority and checks for signals. How the Kernel handles both the page stealer and the fault handler The page stealer and the fault handler thrash because of the shortage of the memory. If the sum of the working sets of all processes is greater that the physical memory then the fault handler will usually sleep because it cannot allocate pages for a process. Biohazard 4 Pc. This results in the reduction of the system throughput because Kernel spends too much time in overhead, rearranging the memory in the frantic pace. What are conditions on which deadlock can occur while swapping the processes All processes in the main memory are asleep. All ready to run processes are swapped out. There is no space in the swap device for the new incoming process that are swapped out of the main memory. There is no space in the main memory for the new incoming process. What are conditions for a machine to support Demand Paging Memory architecture must based on Pages, The machine must support the restartable instructions. What is the principle of locality Its the nature of the processes that they refer only to the small subset of the total data space of the process.