What are the basic functions of an operating system?
Operating system controls and coordinates the use of the hardware among the various application programs for various uses. Operating system acts as resource allocator and manager. Since there are many possibly conflicting requests for resources, the operating system must decide which requests are allocated resources to operating the computer system efficiently and fairly. Also, operating system is control program which controls the user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices.
Why paging is used?
Paging is solution to external fragmentation problem which is to permit the logical address space of a process to be noncontiguous, thus allowing a process to be allocating physical memory wherever the latter is available.
What is virtual memory ?
Virtual memory is hardware technique where the system appears to have more memory that it actually does. This is done by time-sharing, the physical memory and storage parts of the memory one disk when they are not actively being used.
What is hard disk and what is its purpose?
Hard disk is the secondary storage device, which holds the data in bulk, and it holds the data on the magnetic medium of the disk. Hard disks have a hard platter that holds the magnetic medium, the magnetic medium can be easily erased and rewritten, and a typical desktop machine will have hard disks with a capacity of between 10 and a few gigabytes. Data is stored onto the disk in the form of files.
What is fragmentation? Different types of fragmentation?
Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request.
External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous.
Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used
What is DRAM? In which form does it store data?
DRAM is not the best, but it’s cheap, does the job, and is available almost everywhere you look. DRAM data resides in a cell made of a capacitor and a transistor. The capacitor tends to lose data unless it’s recharged every couple of milliseconds, and this recharging tends to slow down the performance of DRAM compared to speedier RAM types.
What is cache memory?
Cache memory is random access memory (RAM) that a computer microprocessor can access more quickly than it can access regular RAM. As the microprocessor processes data, it looks first in the cache memory and if it finds the data there (from a previous reading of data), it does not have to do the more time-consuming reading of data from larger memory.
Explain Memory Partitioning, Paging, Segmentation.
Memory partitioning is the way to distribute the Kernel and User Space Area in Memory.
Paging is actually a minimum memory, which can be swap in and swap out from Memory.
In modern Server operating systems, we can use Multiple Page Size Support. That actually helps to tune OS performance, depending on type of applications.
Segmentation is actually a way to keep similar objects in one place. For example: you can have your stack stuffs in one place (Stack Segment), Binary code in another place (text segment), and data in another place (Data and BSS segment).
Linux doesn’t have segment architecture. AIX has Segment architecture.
What is the main component of operating system
Main component of operating system are kernel and shell.
Shell is a interface between application program and kernel. Whenever application program wants some work to be done, it contacts kernel and kernel in turn perform work with the help of device drivers. Thus we can say kernel is an interface between hardware and shell.
Kernel uses device drivers to control micro controller card of peripheral device and in turn work is being accomplished.
Application Program -> [shells ->kernel ->device driver -> controller card ->physical hardware]
Explain briefly about, processor, assembler, compiler, loader, linker and the functions executed by them.
Processor: A processor is the part a computer system that executes instructions .It is also called a CPU.
Assembler: An assembler is a program that takes basic computer instructions and converts them into a pattern of bits that the computer's processor can use
to perform its basic operations. Some people call these instructions assembler language and others use the term assembly language.
Compiler: A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses.
Typically, a programmer writes language statements in a language such as Pascal or C one line at a time using an editor. The file that is created contains what are called the source statements. The programmer then runs the appropriate language compiler, specifying the name of the file that contains the source statements.
Loader: In a computer operating system, a loader is a component that locates a given program (which can be an application or, in some cases, part of the operating system itself) in offline storage (such as a hard disk), loads it into main storage (in a personal computer, it's called random access memory), and gives that program control of the computer.
Linker: Linker performs the linking of libraries with the object code to make the object code into an executable machine code.