Professional Documents
Culture Documents
What are Static and Shared libraries ? 3. What is dynamic linking ? What is static linking ? 4. What are the advantages of Dynamic linking or Shared libraries ? 5. Does gcc search for both static and shared libraries ? Which is searched initially by gcc compiler ? 6. What should be done for Shared library based linking in gcc ? 7. What should be done for static library based linking in gcc ? 8. What is object file and what are symbols ? 9. Can you tell the memory layout based on Data,BSS,HEAP and STACK ? 10. What are the ways in which linux kernel can be compiled ? 11. How will get the driver added into the kernel ? What are Kconfig files ? 12. What is a kernel module ? 13. What is the difference between insmod and modprobe ? 14. How will you list the modules ? 15. How do you get the list of currently available drivers ? 16. How will you Access userspace memory from kernel ? What are the various methods ? 17. What is the use of ioctl(inode,file,cmd,arg) ApI ? 18. What is the use of the poll(file, polltable) API ? 19. What is the use of file->private_data in a device driver structure ? 20. What is a device number ? 21. What are the two types of devices drivers from VFS point of view ? 22. What are character devices ? 23. How does the character device driver adds and remove itself from the kernel ? What is the use of register_chrdev and unregister_chrdev ? 24. What is the role of interrupts in a device driver ? How are interrupts handled in device driver ? 25. How will you make interrupt handlers as fast as possible ? 26. What are the types of softirqs ? 27. Difference between Timer Softirq and Tasklet Softirq ? 28. What are tasklets ? How are they activated ? when and How are they initialized ? 29. What is task_struct and how are task states maintained ? 30. What is rwlock and spinlock ? Briefly explain about both of them ? 31. When will you use rwlock instead of spinlock ? 32. Can spinlock/rwlock be used in Interrupt handler ? 33. Tell about the Memory Layout of a Process in Linux . 34. How will you trace the system calls made into the kernel of lInux ? 35. What is mmap ? MMAP & malloc ? MMAP & brk ? MMAP adv & dis-adv. 36. Tell the relation between Malloc and MMAP 37. Advantages of MMAP over Read ? 38. Tell the role of brk() in malloc / Tell the relation between heap and brk? 39. Example of using MMAP and MUNMAP in C ? 40. Tell about the method/steps in Linux Kernel Compilation. 41. What is Kmalloc and how does it differ from normal malloc ? or Why can't we use malloc in kernel code ? 42. What happens as soon as a packet arrives from the network in Linux ? 43. What is a stack frame, stack pointer & frame pointer ? 44. What is a profiler ? Which one have you used ? 45. How do you determine the direction of stack growth ?
Describe initial process sequence while the system boots up. 1) BIOS 2) Master Boot Record (MBR) 3) LILO or GRUB 4) Kernel 5) init 6) Run Levels............. What is a shell? What are shell variables? A shell us an interface to the user of any operating system.............. Explain how the inode maps to data block of a file. There are 13 block addresses in inode. The file descriptions type of file, access rights............. Explain some system calls used for process management. The following are the system calls: fork() - For creating child process ............. Explain how to get/set an environment variable from a program. An environment variable can get using the function getenv().............. Describe how a parent and child process communicates each other. The inter communication between a child process and a parent process can be done through normal communication............. What is a Daemon? Daemon is the short form for Disk and Execution Monitor.............. What is 'ps' command for? The shortage for process status is ps. This command is used to display the currently running processes on Linux/Unix systems.............. How the Swapper works? Moving the information from fast access memory and slow access memory and vice versa is known as swapping.............. What is the difference between Swapping and Paging? Swapping performs the whole process to transfer to the disk, where as paging performs............. What is Expansion swap? Expansion swap is a part of hard disk. This is reserved for the purpose of storing chunks of a program............. What is Fork swap?
For creation of child process, fork() system call is invoked. At the time of processing the fork() call by parent............. What are the requirements for a swapper to work? The functionality of a swapper is on the scheduling priority which is highest. The swapper searches............. What is the principle of locality? The next most data item or instruction is the closest to the current data item or instruction.............. What is page fault? Its types. One of the critical parts of code in the Linux kernel. It has a major influence on memory subsystems performance.............. Difference between the fork() and vfork() system call. fork: Both the parent and child share all of the page tables until any one of them does a write.............. What is BSS(Block Started by Symbol)? UNIX linkers produce uninitialized data segments.............. What is Page-Stealer process? Explain the paging states for a page in memory. The pages that are eligible for swapping are found by the Page-Stealer............. Explain the phases of swapping a page from the memory. The phases of swapping a page from the memory are:............. What is Demand Paging? Explain the conditions for a machine to support Demand Paging. The process of mapping a large address space into a relatively small amount of physical memory is known as demand paging.............. Difference between Fault Handlers and the Interrupt handlers. Fault handlers can sleep, where as interrupt handlers cannot.............. What is validity fault? In what way the validity fault handler concludes? Validity fault is the result of non setting of valid bits in main memory at the time of refererring a page by a process .............. What is protection fault? Protection fault is a name of an error. This error occurs when accessing storage space is tried............. Explain how the Kernel handles both the page stealer and the fault handler.
When the memory shortage occurs then the page stealer and fault handler thrashes.............. What is ex and vi? Explain their purposes. ex the line editor mode of vi editor. It allows to............. What is kill()? Explain its possible return values. kill() is a system call which stops a process. The return values of kill() are:............. Explain the steps that a shell follows while processing a command. The sequence of executing commands by shell are as follows:............. What is the difference between cmp and diff commands? Provide an example for each. Byte by byte comparision performed for two files comparision and displays the first mismatch byte.............. What is the use of grep command? Provide an example Grep stands for regular expression. grep command is used to find the patterns in a text file provided by the user.............. Difference between cat and more command. The file contents are displayed by cat command.............. What is du command? What is its use? The du (disk usage) command is used to report the size of directory trees.............. Explain the various prompts that are available in a UNIX system. UNIX supports 4 prompts: PS1: default prompt............. Describe how the kernel differentiates device files and ordinary files. There are 2 device files. They are character device file and block device file.............. Explain how to switch to a super user status to gain privileges. The command ?su? is used to get super user status..............
Several powerful functions can be in a single statement Streams of processes can be redirected to user specified locations using >
Linux - What are Pipes? Explain use of pipes - August 21, 2008 at 22:00 pm by Rajmeet Ghai
NEXT>> Linux - What is Linux and why is it so popular? - August 21, 2008 at 22:00 pm by Rajmeet Ghai
It is free and open source. We can download Linux for free and customize it as per our needs. It is very robust and adaptable. Immense amount of libraries and utilities
Linux - What is Linux and why is it so popular? - May 11, 2009 at 13:00 pm by Vidya Sagar
The Kernel task manager allows tasks to run concurrently. Managing the computer resources: Kernel allows the other programs to run and use the resources. Resources include i/o devices, CPU, memory. Kernel is responsible for Process management. It allows multiple processes to run simultaneously allowing user to multitask. Kernel has an access to the systems memory and allows the processes to access the memory when required. Processes may also need to access the devices attached to the system. Kernel assists the processes in doing so. For the processes to access and make use of these services, system calls are used.
Fork () :- Used to create a new process Exec() :- Execute a new program Wait():- wait until the process finishes execution Exit():- Exit from the process Getpid():- get the unique process id of the process Getppid():- get the parent process unique id Nice():- to bias the existing property of process
Running: Process is either running or ready to run Interruptible: a Blocked state of a process and waiting for an event or signal from another process Uninterruptible: a blocked state. Process waits for a hardware condition and cannot handle any signal Stopped: Process is stopped or halted and can be restarted by some other process Zombie: process terminated, but information is still there in the process table.