Enter Ur Email ID To Get Study Material & Latest Job Updates In Mail Inbox:
(Please activate subscription from your mail Inbox)  FeedBurner

Home » » OS 2013 LATEST TECHNICAL INTERVIEW QUESTIONS ANSWERS

OS 2013 LATEST TECHNICAL INTERVIEW QUESTIONS ANSWERS

Written By Unknown on Sunday, 21 April 2013 | 9:02 am

OPERATING SYSTEM TECHNICAL INTERVIEW QUESTIONS WITH ANSWERS, OS INTERVIEW QUESTIONS, OS 2013 LATEST TECHNICAL INTERVIEW QUESTIONS ANSWERS


    Operating System Concepts.
System Software
System programs which provide a more convenient environment for program
development and execution
Example
– Compilers
– Assemblers
– Loaders
– Linkers
– Operating System
 
Translators
A program which converts a user’s program written in some language to
another language.
Loaders
Are system programs
Loader loads the binary code in the memory ready for execution
Transfer the control to 1st instruction
Responsible for locating program in the main memory every time it is being
Executed
Compiler
Are system programs that translates an input program in a high level
language into its machine language equivalent
Checks for errors
Optimizes the code
Prepares the code for execution
Symbol Table
A table which contains information about identifiers encountered during
lexical analysis
Keeps track of the attributes of the symbols like
– name
– type (int, char etc.,),
– size (in bytes),
– address of the label
Interpreter
Is a systems program that looks at and executes programs on a line-by-line basis rather than producing object code.Whenever the programs have to be executed repeatedly, the source code has to be interpreted every time. In contrast the compiled programs create an object code and this object code will be executed.
entire source code needs to be present in memory during execution as a result of which the memory space required is more when compared to that of a compiled code.
Used in test environments as overhead of compilation is not there
Operating systems
A program which acts as an interface between the user and the computer and provides an environment in which a user can execute programs
Memory management
Plays an important role as utilization of memory is crucial to the performance of the system
– Allow as many user jobs as possible to be active
– Respond to changes in memory demand by individual user jobs
– Prevent unauthorized changes to a user job’s memory region
– Implement allocation and addressing as efficiently as possible
Thrashing
Most of the time is being spent in either swapping in or swapping out of the
pages from main memory to secondary memory,instead of doing useful work
This high paging activity when happens frequently is called THRASHING
To overcome thrashing ,system schedules some pages to be removed from
memory in the background (Page Stealing) and continues till a certain level of
page frames are free
Segmentation
Segment is a grouping of information that is treated as a logical entity
A process is divided into different segments each of its own length for example
one segment can correspond to a single subroutine, a group of closely related
subroutines etc.
Segmentation uses unequal chunks
Chunk size is determined by the programmer
Each individual segment can be protected
Requires two-level translation : Segment tables to page tables and then to
main memory
Some concepts
Processor
– Hardware component that is capable of executing instructions
Process
– An instance of a program in execution
– Is an active entity whereas a program is a passive entity
– Needs certain resources for execution in which a processor is one of them
Context switching
The task of switching the CPU to another process by saving the state of the old
process and loading the saved state of the new process is known as context
switching
Context switching
– Keeps the CPU busy all the time
– Occurs when any of the following situations is encountered
• An I/O operation is initiated
• An interrupt occurs
• An I/O is completed
• A process terminates
Scheduling
Policy to decide which ready process is to be picked up next.
Criteria which lets a particular policy to be chosen are the following:
– CPU Utilisation
– Throughput
– Turnaround time
– Waiting time
– Response time

To GET MORE TECHNICAL INTERVIEW PAPERS VISIT: cseitliveprojects.com
Also GET CS, IT, ETC/ ET&T, ELEC, EEE, CIVIL, MECH CAMPUS PLACEMENTS PAPERS

How is it different from context switching?
Context-switching + some more information = Scheduling.
Context switching merely states that CPU makes a transition to another process. The
question as which another process is decided by a policy and that is all about scheduling
Scheduling policy
Scheduling policies are of two categories
– Non-Preemptive scheduling
– Preemptive scheduling
The CPU scheduling decisions usually takes place under the following conditions:
1. When a process switches from the RUN state to the BLOCKED state.
2. When a process switches from the RUN state to the READY state.
3. When a process switches from the BLOCKED state to the READY state.
4. When a process terminates
The scheduling scheme is non-preemptive for case 1 and 4 else it is preemptive
Non-preemptive scheduling
CPU is allocated to a process till the job is over or incurs an I/O wait
Example
– FCFS ( First Come First Serve )
Disadvantage
Monopoly of the process
In non-preemptive scheduling, the process cannot forcibly loose the processor. The CPU is
allocated to a processor till it gets over or incurs an I/O wait.
Preemptive scheduling
Fixed time slice is specified during which a process gets attention
If the process gets terminated before the time slice then CPU makes a context
switch
Example
– Round Robin
– Shortest Job First(SJF)
– Priority Scheduling
SJF and Priority Scheduling may be either preemptive or non-preemptive.
Threads
Thread is light weight where as a process is heavy weight.
A thread is a part of the program. But a process is a program itself
In the case of multi threading two parts of the same program can execute
simultaneously
Threads shares the same address space, data section and resources
Different Stack (to hold local data) and PC.
Context switching is easy in the case of threads
Threads are light weight because it does not require any further resources. The
resources that are allocated to the parent thread is used by the child threads. Context
switch is also easy because threads belong to the same process. At least one thread
should be created in order to execute a program. Windows OS uses this thread
concept.
The data and code region are the same for all the threads, but have different stack
region (to hold local data) and PC.
File System.
File System is a method of storing and managing the files, which contain data.
This makes it easy to locate and access the data.
Different Operating Systems incorporate different File Systems.
Example.
– FAT (File Allocation Table)
– NTFS (New Technology File System)
– Unix File System
FAT.
File Allocation Table (FAT) is a file system that was developed for MS-DOS.
It is used in consumer versions of Microsoft Windows up to and including Windows Me.
The purpose of the “File Allocation Table” is to keep track of which areas of the disk are
available and which areas are in use.
FAT 12 was the first version in FAT.
File Allocation Table (FAT) is a file system that was developed for MS-DOS and
used in consumer versions of Microsoft Windows up to and including Windows
ME.
The FAT filesystem made its debut in August 1980 with the first version of QDOS,
the ancestor of Microsoft's PC-DOS and MS-DOS.
Versions of FAT.
FAT12
FAT16
FAT32
FAT64
FAT12.
Uses a 12-bit binary number to hold the cluster number.
can hold a maximum of 4,086 clusters.
most suitable for very small volumes, and is used on floppy disks and hard disk partitions
smaller than about 16 MB

To GET MORE TECHNICAL INTERVIEW PAPERS VISIT: cseitliveprojects.com
Also GET CS, IT, ETC/ ET&T, ELEC, EEE, CIVIL, MECH CAMPUS PLACEMENTS PAPERS

Clusters:
A group of computers connected by a high-speed network that work together as if
they were one machine with multiple CPUs.
A logical collection of packages (software modules).
A group of software packages. Clusters can contain other clusters. Clusters and their
components form a hierarchical tree.
FAT16.
Uses a 16-bit binary number to hold the cluster number.
can hold a maximum of 65,526 clusters.
used for hard disk volumes ranging in size from 16 MB to 2,048 MB.
VFAT (called Virtual FAT) is a variant of FAT16
FAT32.
Uses a 28-bit binary number to hold the cluster number, as 4 of the 32 bits are
"reserved.
Can theoretically handle volumes with over 268 million clusters.
Can support (theoretically) medium up to 2 TB in size.
maximum file size is 4GB
Used in by newer versions of Windows, like Windows 98, Windows ME and Windows
2000.
NTFS.
NTFS stands for New Technology File System.
It was introduced with Windows NT
Can support up to 2 TB in size.
no limitation on file sizes.
Allows encryption of files, which FAT does not allow.
NTFS is more reliable.
Security and access control
Device management
The part of the operating system that manages to allocate a device to a
requirement or a users job is a device manager.
Functions
– To provide the simplest interface possible to the rest of the system
– To optimize I/O for maximum concurrency
A computer system has a wide assortment of I/O or peripheral devices. These I/O devices
are equally important as that of memory and processor because they are the only means of
receiving/sending information from/to the external world. E.g. printers, magnetic tapes,
keyboard, cartridges etc. Most of these devices are mechanical in nature; their speed of
operation is much slower than the speed of the CPU and therefore results in a bottleneck.
Due to this variation in the nature of devices, the OS has to provide a wide range of
functionality to different applications, to allow them to control all aspects of the devices. The
main goals of the OS in this regard are
•To provide the simplest interface possible to the rest of the system
•To optimize I/O for maximum concurrency
Ask the audience what are the main input and output devices and which devices act as both
input and output ?
Ans: INPUT – Card Reader, Tape Reader, Keyboard.
OUTPUT - Printers, Terminals
Both Input and Output – Hard Disk etc

To GET MORE TECHNICAL INTERVIEW PAPERS VISIT: cseitliveprojects.com
Also GET CS, IT, ETC/ ET&T, ELEC, EEE, CIVIL, MECH CAMPUS PLACEMENTS PAPERS

Interrupt handling
Interrupt
– is a hardware facility that enables a device to notify the CPU.
– causes the CPU to suspend its work, saves the status and jumps to the interrupt
handler routine at a fixed address in memory.
– The interrupt handler routine determines the cause of the interrupt, does the
necessary processing and returns the CPU to the execution state prior to the
interrupt.
Software Interrupts
Software interrupts are special instructions to implement system calls.
System call is a function that is called by an application to invoke the kernel
service.
– Checks the arguments given by the application
– Builds a data structure to convey the arguments to the kernel
– Executes a special instruction called software interrupt or trap
The instruction i.e. the software interrupt (trap) has an operand that identifies the desired
kernel service. As usual, when the system call executes the trap instruction, the interrupt
saves the status of the code which it was running and then implements the requested
service.
Interrupts have less priority as compared to device interrupts because executing a system
call on behalf of an application is less urgent than servicing a device controller before the
latter’s queue overflows and loses data.
Direct Memory Access (DMA)
Direct Memory Access (DMA) is a technique that is used to transfer data
between memory and I/O devices .
– data channels that allow direct transfer of information between devices and memory
without routing those transfers through the CPU are said to be performing DMA
DMA unit (called DMA controller which is like another processor) has access to
the data bus and can transfer the data in and out of the memory
The load of the CPU with Programmed I/O(PIO) is reduced at times by offloading some
work to a special purpose processor called a DMA controller.
Programmed I/O(PIO) is a process which uses an expensive general-purpose processor to
watch status bits and feed data into a controller register one byte at a time. PIO process is
wasteful for devices that does large data transfers such as a disk drive. In such cases, DMA
is used.
A program would instruct the DMA unit to transfer a specified block of data from memory to
peripheral devices. Whenever, the DMA controller wants to send data, it sends a notification
to the CPU. CPU relinquishes the control over the system bus and DMA controller directly
accesses the memory to obtain the data required. This scheme is called cycle stealing
because the machine cycles are stolen from the CPU and used by the DMA unit to transfer
the data along the data bus. Thus, the CPU is momentarily prevented from accessing the
main memory, although it can still continue with its operations which don't require bus.
Although this cycle stealing can slow down the CPU computation, but offloading huge data
transfer work to DMA controller improves the overall system performance.
DMAs are most commonly used by floppy disk drives, tape drives etc.


To GET MORE TECHNICAL INTERVIEW PAPERS VISIT: cseitliveprojects.com
Also GET CS, IT, ETC/ ET&T, ELEC, EEE, CIVIL, MECH CAMPUS PLACEMENTS PAPERS

0 comments:

Post a Comment

Thanks For Your Comment. We Get Back To You As Soon As Possible.