System calls V/s Signal:
Signals offer another way to transition between Kernel and User Space. While system call are synchronous calls originating from User Space, signals are asynchronous messages coming from Kernel space.
Difference between namespace and class
Namespace: A category or brand of cars. Note that the brand really doesn't have to dictate how the car is built. You can't say a Honda always have four doors, or that it always has 4wd. Such specifics is up to the class to dictate. Rich.Carpenter's post explains the purpose of namespaces very good.Class: Blueprint for how to build a specific car.
Object: An actual car (instance) created from the car blueprint (the class)
Method: Something a user of the car can make it do. Start(), IncreaseThrottle(), Break(), OpenDoor() etc.
Property: Attributes, information and building blocks which the car contains. E.g. Total running miles, color, steering wheel dimension, stereo system etc etc.
What is difference between microkernal and monolithic kernal?
Monolithic kernel has simple design. Monolithic kernel is a single large processes running entirely in a single address space. It is a single static binariy file. All kernel services exist and execute in kernel address space. The kernel can invoke functions directly. The examples of monolithic kernel based OSs are Linux, Unix.
In Microkernels, the kernel is broken down into separate processes, known as servers. Some of the servers run in kernel space and some run in user-space. All servers are kept separate and run in different address spaces.The communication in microkernels is done via message passing. The servers communicate through IPC (Interprocess Communication). Servers invoke "services" from each other by sending messages. The separation has advantage that if one server fails other server can still work efficiently. The example of microkernel based OS are Mac OS X and Windows NT. Monolithic Kernal (Macro Kernel): Kernal Image = (Kernal Core+Kernal Services). When system boots up entire services are loaded and resides in memory. Example: Windows and Unix.Micro kernal : Kernel Image = Kernal Core. Services are build in to special modules which can be loaded and unloaded as per need.We have another type of kernal integration technic called Modular. This is derived from best of micro and monolithic kerel) In Modular kernel integration: Kernal Image = (Kernal core + IPC service modules +Memory module +Process Management module). All other modules are lodable kernel modules. Example: Linux kernel
What is the difference between Make file and shell scripting?
a shell script is an abritrary collection of unix shell commands. put a command in a file and it is a shell script. a Makefile however is a very clever bit of scripting (in it's own language to all extents) that compiles an accompanying set of source code into a program. a spec file is typically a definition of an RPM file, what certain commands are required to run it, what it requires to work correctly and such.
The content of a Makefile is evaluated by the 'make' program.
The content of a shell script is evaluated by the shell program (usually bash on GNU systems).
Difference between process and thread?
The major difference between threads and processes is 1.Threads share the address space of the process that created it; processes have their own address. 2.Threads have direct access to the data segment of its process; processes have their own copy of the data segment of the parent process. 3.Threads can directly communicate with other threads of its process; processes must use interprocess communication to communicate with sibling processes. 4.Threads have almost no overhead; processes have considerable overhead. 5.New threads are easily created; new processes require duplication of the parent process. 6.Threads can exercise considerable control over threads of the same process; processes can only exercise control over child processes. 7.Changes to the main thread (cancellation, priority change, etc.) may affect the behavior of the other threads of the process; changes to the parent process does not affect child processes.
Difference between FAT and NTFS
FAT is a short name for File Allocation Table whereas NTFS is a shart name for New Technology File System.
FAT is supported by WIN 98 2000 2003 XP whereas NTFS is supported by WIN NT 2000 2003 XP VISTA.
FAT doesnot support compression & encryption whereas NTFS supports compression & encryption.
FAT supports remote security whereas NTFS supports local security.
FAT doesnot support shadow copy & disk quota whereas NTFS supports shadow copy & disk quota.
Scheduler and Dispatcher
DISPATCHER:
The dispatcher is the module that gives control of the CPU to the process selected by the short-time scheduler(selects from among the processes that are ready to execute).
The function involves :
Swithching context
Switching to user mode
Jumping to the proper location in the user program to restart that program.
SCHEDULER:
It is an intermediate level of scheduling.The medium-term scheduling removes processes from memory and from active contention for the CPU.Swapping of process takes place which is required to improvethe process mix.
Difference between utilites and applications?
application software is programs you use like word processing, accounts, IE web browsing, calculator stuff like that
utilities are programs you use to fix the computer systems like anti virus software, memory checking, hard drive checking. Defraging.
Difference between trap and interrupt
An interrupt is hardware generated event usually caused by i/o device requesting services the interrupt signal causes a change of °ow within the system: an interrupt service routine (ISR) saves the CPU state, services the interrupt, then restores control to the interrupted process. A trap, on the other and, is a software-generated interrupt. Traps are caused by 1) system calls and 2) exceptional software conditions (e.g. divide by 0). Other than the source and function, processing of traps and interrupts is the same.
Difference b/w paging and segmentation.
Paging is a virtual memory scheme which is transparent to the program at the application level and which divides memory into fixed-size blocks, such as 4 KBytes.
The segmentation memory management scheme imposes a greater book-keeping burden on the application, and refers to memory using segments of variable size.
segmentation is a logical unit visible to the user's program and id of arbitary size whereas paging is a physical unit invisible to the user's view and is of fixed size
The Memory Management Unit (MMU) transforms a logical address into a linear address by means of a hardware circuit called a segmentation unit ; subsequently, a second hardware circuit called a paging unit transforms the linear address into a physical address.
Mutex vs binary Semaphore, what is the difference?
Mutex:
Is a key to a toilet. One person can have the key - occupy the toilet - at the time. When finished, the person gives (frees) the key to the next person in the queue.
Officially: "Mutexes are typically used to serialise access to a section of re-entrant code that cannot be executed concurrently by more than one thread. A mutex object only allows one thread into a controlled section, forcing other threads which attempt to gain access to that section to wait until the first thread has exited from that section."
Ref: Symbian Developer Library
(A mutex is really a semaphore with value 1.)
Semaphore:
My understanding is that spinlocks are for the protection of quick piecesof code. Since a processor waiting on a spinlock spins, spinlocks shouldnot be held for anything but very short periods of time.
Spinlocks shouldnot be used, for example, in situations where a process could sleep whileholding the lock.Semaphores
seem more appropriate for protecting longer code segments,especially situations where processes holding the semaphore could sleep.
The process of obtaining a semaphore can itself cause a process to sleep,implying that semaphores cannot be used in interrupt handler.
Is the number of free identical toilet keys. Example, say we have four toilets with identical locks and keys. The semaphore count - the count of keys - is set to 4 at beginning (all four toilets are free), then the count value is decremented as people are coming in. If all toilets are full, ie. there are no free keys left, the semaphore count is 0. Now, when eq. one person leaves the toilet, semaphore is increased to 1 (one free key), and given to the next person in the queue.
Officially: "A semaphore restricts the number of simultaneous users of a shared resource up to a maximum number. Threads can request access to the resource (decrementing the semaphore), and can signal that they have finished using the resource (incrementing the semaphore)."
Ref: Symbian Developer Library
Binary Seamphore:A mutex provides protection against priority inheritance, whereas a binary semaphore does not.
A mutex also has the concept of an owner, and only the owner can unlock the mutex. A binary semaphore does not have this requirement; it is possible for one thread to lock a binary semaphore and another thread to unlock it.
(Q): What are the differences between Zones, domains and Containers?
Domains are a type of Hardware Partitioning where the partitioning is done in the hardware. Solaris Zones are part of the Solaris Containers technology and address the namespace isolation (separate IP addresses, users, root, ...). Solaris Containers (and Zones) are a type of OS virtualization where the partitioning is not done in hardware but in the OS.
Difference between seamphore and spinlock:
My understanding is that spinlocks are for the protection of quick piecesof code. Since a processor waiting on a spinlock spins, spinlocks shouldnot be held for anything but very short periods of time.
Spinlocks shouldnot be used, for example, in situations where a process could sleep whileholding the lock.Semaphores seem more appropriate for protecting longer code segments,especially situations where processes holding the semaphore could sleep. The process of obtaining a semaphore can itself cause a process to sleep,implying that semaphores cannot be used in interrupt handlers.
Spin locks :
Spin locks are a type of mutex. The difference between spin locks and ordinary mutex locks is in their locking routines. When a mutex is already locked, the locking routine (mutex_lock(3synch)) will block the caller until the lock is available. When a spin lock is already locked, the locking routine (_spin_lock(3synch)) will busy-wait, or ``spin'', in a loop, testing if the lock has become available. Such spinning wastes processor cycles and can slow processors doing useful work, including the processor holding the lock, by consuming communication bandwidth.
Because spin locks waste system resources, most applications should use mutexes instead of spin locks for mutual exclusion. However, spin locks are useful when: sleep is not permitted the critical section is small, so that the expected spin is less costly than blocking and resuming the thread
no other work is available Spin locks should only be used when there is a guarantee that the thread will not be preempted or blocked while holding a spin lock. It is the responsibility of each application to unlock all spin locks before calling sleep or blocking routines.
Spin locks must not be used on a single processor system. In the best case, a spin lock on a single processor system will waste resources, slowing down the owner of the lock; in the worst case, it will deadlock the processor. What is difference between defragmentation and Fragamentation:As advanced as hard drives have become, one item they
are not very good at is housekeeping, or maybe that should be drive keeping. When files are created, deleted, or modified it's almost a certainty they will become fragmented. Fragmented simply means the file is not stored in one place in its entirety, or what computer folks like to call a contiguous location. Different parts of the file are scattered across the hard disk in noncontiguous pieces. The more fragmented files there are on a drive, the more performance and reliability suffer as the drive heads have to search for all the pieces in different locations. The Disk Defragmenter Utility is designed to reorganize noncontiguous files into contiguous files and optimize their placement on the hard drive for increased reliability and performance.
A fragment is a piece. If you drop a vase on a concrete floor, you get fragmentation of the vase. Lots of little pieces. Which is pretty much what your data looks like on your hard drive after you've been using it for a few months. Ever try to stick all the little pieces of a smashed vase together again? Well, that's kinda what your computer has to do to get that file that you just tried to open. It's first got to find all those little pieces and stick them all together again, and then present this stuck together file to you.
AND IF YOU THOUGHT THAT WAS BAD...
Now here's the part where it gets worse. When you are finished with the file, and you save it, your computer breaks it up again into all these little pieces, plus some more little pieces that you just added with your edit, and it has to find all the places where it got the little pieces from in the first place, and put them back there. And you wondered why your computer was slow!
HAVE MERCY ON YOUR POOR PC.
When we defragment our hard drive, we are giving the computer a chance to find all the little pieces of all the files, and enabling it to stick all these pieces together and keep them together by saving this whole file in one place on the hard drive. So when you request a file or document, the computer only has to search for one thing, which it joyfully finds and presents it to you on your screen in a very short time.
GIVE YOUR HARD DRIVE SOME AIR
To allow your computer to properly defragment your drive, you need to have a little spare space. So if your hard drive is really full, like more than 80%, it might be a good time to add an additional hard drive. You can see how full your hard drive is by holding down the Windows key and pressing E, then right clicking on the drive's name (eg: DRIVE (C:) ) and then clicking Properties in the popup menu.
FOR THE TECH HEADS.
Technically, what happens during defragmentation is that the pieces of data that make up a file or directory are moved around the hard drive cylinders, sectors and platters to form contiguous blocks of data, so that the hard drive heads do not have to seek out numerous small blocks of data, but instead only have to seek out a few large blocks, thereby reducing seek time and increasing data throughput.
So make life easier for your hard working computer, and it should repay you with faster file retrieval, and a longer, trouble free life.
Difference between white box and black testing.
White Box Testing:Means testing the application with coding /programming knowledge.That means the tester has to correct the code also.Black box testing:testing the application without coding /programming knowledge that means the tester doesn't require coding knowledge.Just he examines the appliaction external fucntional beheaviour and GUI features.There are two testing techniques1.white box testing2.black box testing.grey box is the combination of white box and black
Collision domain V/S broadcast domains
=============================
Collision domain is an Ethernet term used to describe a network collection of devices in which one particular device sends a packet on a network segment, forcing every other device on that same segment to pay attention to it. On a broadcast domain, a set of all devices on a network segment hears all broadcasts sent on that segment.
Hubs create one collision and one broadcast domain where as the bridge/switch breaks the collision domian and creates one bug broadcast domain. Routers break up broadcast domains (and collision domains)