Here we have mentioned most frequently asked Window Operating System Interview Questions and Answers specially for freshers and experienced.
1. What is the Difference between Windows 2003 standard Enterprise, Premium, Data center and Web Edition?
Ans:
WEB EDITION:
To position windows server 2003 more competitively against other web servers, Microsoft has released a
stripped-down-yet-impressive edition of windows server 2003 designed specially for web services. the feature set and licensing allows customers easy deployment of web pages, web sites, web applications and web services.
Web Edition supports 2GB of RAM and a two-way symmetric multiprocessor(SMP). It provides unlimited anonymous web connections but only 10 inbound server message block(SMB) connections, which should be more than enough for content
publishing. The server cannot be an internet gateway, DHCP or fax server. Although you can remotely administer the server with Remote Desktop, the server can not be a terminal
server in the traditional sense. The server can belong to a domain, but cannot be a domain controller. The included version of the microsoft SQL server database Engine can support as many as 25 concurrent connections.
2. How do you recover an object in Active Directory, which is accidentally deleted by you, with no backup?
Ans:
Using ntdsutil.exe command,we can restored the AD objects.
3. What is the Logical / Physical Structures of the AD Environment?
Ans:
physical structure:
Forest, Site, Domain, DC
logical structure:
Schema partition, configuration partition, domain
partition and application partition
4. How to change the windows xp product key if wrongly installed with other product key but you have original product key? What you will do to Make your os as Genuine?
Ans:
Some third party software are available for this function or reinstall this system
5. If 512mb Ram is there what will be the minimum and maximum Virtual memory for the system?
Ans:
To workout the total virtual memory (page file) required for windows XP you should take the amount of ram in the system and + 25% (512MB + 25% (128MB) = 640MB total virtual memory. by setting both the min and max to 640MB you can increase the performances of the operating system.
6. Ntfldr.exe is missing in win xp os what will you do?
Ans:
Boot from windows xp cd and go to recovery console mode
give the administrator password
c:windows>
prompt will come
come out from windows with the help of command
c:windows>cd ..
c:>
go to cd prompt d:
d:>cd i386
d:i386>copy ntldr c: enter
d:i386>copy ntdetect.com c: enter
restart u r computer
problem fix
7. What is LDAP?
Ans:
LDAP, Lightweight Directory Access Protocol, is an Internet protocol that email and other programs use to look up information from a server.
8. What is the SYSVOL folder?
Ans:
The Sysvol folder on a Windows domain controller is used to replicate file-based data among domain controllers. Because junctions are used within the Sysvol folder structure, Windows NT file system (NTFS) version 5.0 is required on domain controllers throughout a Windows distributed file system (DFS) forest.
9. What are application partitions? When do we use them?
Ans:
Application Directory Partition is a partition space in Active Directory which an application can use to store that application specific data. This partition is then replicated only to some specific domain controllers.
The application directory partition can contain any type of data except security principles (users, computers, groups).
10. What is the KCC?
Ans:
With in a Site, a Windows server 2003 service known as the KCC automatically generates a topology for replication among the domain controllers in the domain using a ring structure.Th Kcc is a built in process that runs on all domain controllers.
The KCC analyzes the replication topology within a site every 15 minute to ensure that it still works. If you add or remove a domain controller from the network or a site, the KCC reconfigures the topology to relect the change.
11. What is tombstone lifetime attribute?
Ans:
The number of days before a deleted object is removed from the directory services. This assists in removing objects from replicated servers and preventing restores from reintroducing a deleted object. This value is in the Directory Service object in the configuration NIC by default 2000 (60 days)
12. How do we Backup Active Directory?
Ans:
Backing up Active Directory is essential to maintain an Active Directory database. You can back up Active Directory by using the Graphical User Interface (GUI) and command-line tools that the Windows Server 2003 family provides.
You frequently backup the system state data on domain controllers so that you can restore the most current data. By establishing a regular backup schedule, you have a better chance of recovering data when necessary.
To ensure a good backup includes at least the system state data and contents of the system disk, you must be aware of the tombstone lifetime. By default, the tombstone is 60 days. Any backup older than 60 days is not a good backup. Plan to backup at least two domain controllers in each domain, one of at least one backup to enable an authoritative restore of the data when necessary.
13. How do we restore AD?
Ans:
You can’t restore Active Directory (AD) to a domain controller (DC) while the Directory Service (DS) is running. To restore AD, perform the following steps.
Reboot the computer.
The computer will boot into a special safe mode and won’t start the DS. Be aware that during this time the machine won’t act as a DC and won’t perform functions such as authentication.
1. Start NT Backup.
2. Select the Restore tab.
3. Select the backup media, and select System State.
4. Click Start Restore.
5. Click OK in the confirmation dialog box.
After you restore the backup, reboot the computer and start in normal mode to use the restored information. The computer might hang after the restore completes; I’ve experienced a 30-minute wait on some machines.
14. What are GPOs?
Ans:
Group Policy gives you administrative control over users and computers in your network. By using Group Policy, you can define the state of a user’s work environment once, and then rely on Windows Server 2003 to continually force the Group Policy settings that you apply across an entire organization or to specific groups of users and computers.
15. What is the order in which GPOs are applied?
Ans:
Group Policy settings are processed in the following order:
1:- Local Group Policy object-each computer has exactly one Group Policy object that is stored locally. This processes for both computer and user Group Policy processing.
2:- Site-Any GPOs that have been linked to the site that the computer belongs to are processed next. Processing is in the order that is specified by the administrator, on the Linked Group Policy Objects tab for the site in Group Policy Management Console (GPMC). The GPO with the lowest link order is processed last, and therefore has the highest precedence.
3:- Domain-processing of multiple domain-linked GPOs is in the order specified by the administrator, on the Linked Group Policy Objects tab for the domain in GPMC. The GPO with the lowest link order is processed last, and therefore has the highest precedence.
4:- Organizational units-GPOs that are linked to the organizational unit that is highest in the Active Directory hierarchy are processed first, then GPOs that are linked to its child organizational unit, and so on. Finally, the GPOs that are linked to the organizational unit that contains the user or computer are processed.
16. Name a few benefits of using GPMC?
Ans:
Microsoft released the Group Policy Management Console (GPMC) years ago, which is an amazing innovation in Group Policy management. The tool provides control over Group Policy in the following manner:
Easy administration of all GPOs across the entire Active Directory Forest
View of all GPOs in one single list
Reporting of GPO settings, security, filters, delegation, etc.
Control of GPO inheritance with Block Inheritance, Enforce, and Security Filtering
Delegation model
Backup and restore of GPOs
Migration of GPOs across different domains and forests
With all of these benefits, there are still negatives in using the GPMC alone. Granted, the GPMC is needed and should be used by everyone for what it is ideal for. However, it does fall a bit short when you want to protect the GPOs from the following:
Role based delegation of GPO management
Being edited in production, potentially causing damage to desktops and servers
Forgetting to back up a GPO after it has been modified
Change management of each modification to every GPO
17. What are the GPC and the GPT? Where can I find them?
Ans:
GPOs store group policy settings in two locations: a Group Policy container (GPC) (preferred) and a Group Policy template (GPT). The GPC is an Active Directory object that stores version information, status information, and other policy information (for example, application objects).
The GPT is used for file-based data and stores software policy, script, and deployment information. The GPT is located on the system volume folder of the domain controller. A GPO can be associated with one or more Active Directory containers, such as a site, domain, or organizational unit. Multiple containers can be associated with the same GPO, and a single container can have more than one associated GPO.
18. What are GPO links? What special things can I do to them?
Ans:
To apply the settings of a GPO to the users and computers of a domain, site, or OU, you need to add a link to that GPO. You can add one or more GPO links to each domain, site, or OU by using GPMC. Keep in mind that creating and linking GPOs is a sensitive privilege that should be delegated only to administrators who are trusted and understand Group Policy.
19. What are administrative templates?
Ans:
The GPO settings is divided between the Computer settings and the User settings. In both parts of the GPO you can clearly see a large section called Administrative Templates.
Administrative Templates are a large repository of registry-based changes (in fact, over 1300 individual settings) that can be found in any GPO on Windows 2000, Windows XP, and Windows Server 2003.
By using the Administrative Template sections of the GPO you can deploy modifications to machine (called HKEY_LOCAL_MACHINE in the registry) and user (called HKEY_CURRENT_USER in the registry) portions of the Registry of computers that are influenced by the GPO.
20. Name the AD NCs and replication issues for each NC?
Ans:
Name the AD NCs and replication issues for each NC
*Schema NC, *Configuration NC, * Domain NC
Schema NC This NC is replicated to every other domain controller in the forest. It contains information about the Active Directory schema, which in turn defines the different object classes and attributes within Active Directory.
Configuration NC Also replicated to every other DC in the forest, this NC contains forest-wide configuration information pertaining to the physical layout of Active Directory, as well as information about display specifiers and forest-wide Active Directory quotas.
Domain NC This NC is replicated to every other DC within a single Active Directory domain. This is the NC that contains the most commonly-accessed Active Directory data: the actual users, groups, computers, and other objects that reside within a particular Active Directory domain.
21. What is MUTEX?
Ans:
A mutual exclusion object, or MUTEX, is an object created for use in computer programs. The essential function of MUTEX is to make it possible for a multiple program thread to make use of a single resource. Generally, the functionality of mutual exclusion objects is to allow this use of a single resource by creating an environment where the access to the resource is continually passed back and forth between the various aspects of the program.
22. What is the difference between a computer process and thread?
Ans:
A single process can have multiple threads that share global data and address space with other threads running in the same process, and therefore can operate on the same data set easily. Processes do not share address space and a different mechanism must be used if they are to share data.
If we consider running a word processing program to be a process, then the auto-save and spell check features that occur in the background are different threads of that process which are all operating on the same data set (your document).
process:
In computing, a process is an instance of a computer program that is being sequentially executed[1] by a computer system that has the ability to run several computer programs concurrently.
Thread:
A single process may contain several executable programs (threads) that work together as a coherent whole. One thread might, for example, handle error signals, another might send a message about the error to the user, while a third thread is executing the actual task
23. What is INODE?
Ans:
INODE is a pointer to a block on the disk and it is unique.
Inode is an unique number. Inode holds metadata of files.
24. Explain the working of Virtual Memory?
Ans:
Virtual memory like as a temporary storage area.It consists of page table.In this pages are divided into frames.It is a continuous memory allocation.It is also called logical memory.
25. How does Windows NT supports Multitasking?
Ans:
Preemptive multitask
26. What is Semaphore?
Ans:
A hardware or software flag.
In multitasking systems, a semaphore is a variable with a value that indicates the status of a common resource.
Its used to lock the resource that is being used.
A process needing the resource checks the semaphore to determine the resource’s status and then decides how to proceed.
27. Recovery from Deadlock?
Ans:
Process Termination:
->Abort all deadlocked processes.
->Abort one process at a time until the deadlock cycle is eliminated.
->In which order should we choose to abort?
Priority of the process.
How long process has computed, and how much longer to completion.
Resources the process has used.
Resources process needs to complete.
How many processes will need to be terminated?
Is process interactive or batch?
Resource Preemption:
->Selecting a victim ? minimize cost.
->Rollback ? return to some safe state, restart process for that state.
->Starvation ? same process may always be picked as victim, include number of rollback in cost factor.
28. What is multi tasking, multi programming, multi threading?
Ans:
Multi programming:
Multiprogramming is the technique of running several programs at a time using timesharing.
It allows a computer to do several things at the same time. Multiprogramming creates logical parallelism.
The concept of multiprogramming is that the operating system keeps several jobs in memory simultaneously. The operating system selects a job from the job pool and starts executing a job, when that job needs to wait for any i/o operations the CPU is switched to another job. So the main idea here is that the CPU is never idle.
Multi tasking:
Multitasking is the logical extension of multiprogramming .The concept of multitasking is quite similar to multiprogramming but difference is that the switching
between jobs occurs so frequently that the users can interact with each program while it is running. This concept is also known as time-sharing systems. A time-shared operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of time-shared system.
Multi threading:
An application typically is implemented as a separate process with several threads of control. In some situations a single application may be required to perform several similar tasks for example a web server accepts client requests for web pages, images, sound, and so forth.
29. Differentiate between RAM and ROM?
Ans:
Semiconductor memories are of two types: RAM (random access memory) and ROM (read only memory).
RAM is a read/write memory. Information can be written into and read from a RAM. It is volatile memory.
It stores information so long as power supply is on.
ROM is permanent type memory. Its contents are not lost when power supply goes off. the user cannot write into a ROM.Its contents are decided by the manufacturer and written at the time of manufacture. Programmable ROMs are also available. They are called PROMs.
30. Binding of Instructions and Data to Memory?
Ans:
Address binding of instructions and data to memory addresses can happen at three different stages
Compile time: If memory location known a priori, absolute code can be generated; must recompile code if starting location changes.
Load time: Must generate relocatable code if memory location is not known at compile time.
Execution time: Binding delayed until run time if the process can be moved during its execution from one memory segment to another. Need hardware support for address maps (e.g., base and limit registers).
Multistep Processing of a User Program
31. Why paging is used?
Ans:
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.
32. What is a Safe State and its use in deadlock avoidance?
Ans:
When a process requests an available resource, system must decide if immediate allocation leaves the system in a safe state
->System is in safe state if there exists a safe sequence of all processes.
->Sequence <P1, P2? Pn> is safe if for each Pi, the resources that Pi can still request can be satisfied by currently available resources + resources held by all the Pj, with j<I.
If Pi resource needs are not immediately available, then Pi can wait until all Pj have finished.
When Pj is finished, Pi can obtain needed resources, execute, return allocated resources, and terminate.
When Pi terminates, Pi+1 can obtain its needed resources, and so on.
->Deadlock Avoidance ?ensure that a system will never enter an unsafe state.
33. Explain the difference between microkernel and macro kernel?
Ans:
Micro-Kernel: A micro-kernel is a minimal operating system that performs only the essential functions of an operating system. All other operating system functions are performed by system processes.
Monolithic: A monolithic operating system is one where all operating system code is in a single executable image and all operating system code runs in system mode.
34. Differentiate between Compiler and Interpreter?
Ans:
An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions.
35. What is the relation between process system time, process waiting time , and process CPU time?
Ans:
Process system time (turn around time) = process cpu time + process waiting time
36. Condition for deadlock occurrence?
Ans:
Deadlock can arise if four conditions hold simultaneously.
Mutual exclusion:
only one process at a time can use a resource.
Hold and wait:
a process holding at least one resource is waiting to acquire additional resources held by other processes.
No preemption:
a resource can be released only voluntarily by the process holding it, after that process has completed its task.
Circular wait:
there exists a set {P0, P1, ?, P0} of waiting processes such that P0 is waiting for a resource that is held by P1, P1 is waiting for a resource that is held by P
2, Pn1 is waiting for a resource that is held by
Pn, and P0 is waiting for a resource that is held by P0.
37. Compare Linux credit based algorithm with other scheduling algorithms?
Ans:
For the conventional time ?shared processes, Linux uses a prioritized, credit-based algorithm. Each process possesses a certain number of scheduling credits; when a new task must be chosen to run, the process with most credits is selected. Every time that a timer interrupt occurs, the currently running process loses one credit; when its credits reaches zero, it is suspended and another process is chosen. If no runnable processes have any credits, then Linux performs a recrediting operation, adding credits to every process in the system (rather than just to the runnable ones), according to the following rule:
Credits = credits/2 + priority
The above scheduling class is used for time-shared process and the in Linux for the real-time scheduling is simpler it uses scheduling classes: first come, first served
(FCFS), and round-robin (RR) .In both cases, each process has a priority in addition to its scheduling class. In time-sharing scheduling, however, processes of different priorities can still compete with one another to some extent; in real-time scheduling, the scheduler always runs the process with the highest priority. Among processes of
equal priority, it runs the process that has been waiting longest. The only difference between FCFS and RR scheduling is that FCFS processes continue to run until they either exit or block, whereas a round-robin process will be preempted after a while and will be moved to the end of the scheduling queue.
38. Why thread is called as a lightweight process?
Ans:
It is called light weight process to emphasize the fact that a thread is like a process but is more efficient and uses fewer resources( n hence “lighter”)and they also share the address space.
39. What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem?
Ans:
Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page fault. The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming.
40. Define Demand Paging, Page fault interrupt, and Trashing?
Ans:
Demand Paging: Demand paging is the paging policy that a page is not read into memory until it is requested, that is, until there is a page fault on the page.
Page fault interrupt: A page fault interrupt occurs when a memory reference is made to a page that is not in memory. The present bit in the page table entry will be found to be off by the virtual memory hardware and it will signal an interrupt.
Trashing: The problem of many page faults occurring in a short time, called page thrashing
41. Give a non-computer example of preemptive and non-preemptive scheduling?
Ans:
Consider any system where people use some kind of resources and compete for them. The non-computer examples for preemptive scheduling the traffic on the single lane road if there is emergency or there is an ambulance on the road the other vehicles give path to the vehicles that are in need. The example for preemptive scheduling is
people standing in queue for tickets.
42. What is starvation and aging?
Ans:
Starvation:
Starvation is a resource management problem where a process does not get the resources it needs for a long time because the resources are being allocated to other processes.
Aging:
Aging is a technique to avoid starvation in a scheduling system. It works by adding an aging factor to the priority of each request. The aging factor must increase the request?s priority as time passes and must ensure that a request will eventually be the highest priority request (after it has waited long enough)
43. If a system has 128 MB RAM and 1 GB hard Disk, and a process decides to use its fully allotted Virtual Memory 2^32 – 2GB = 2 GB, how is it practically possible?. But this works in all machines. How?
Ans:
Virtual memory is double of RAM.As per question RAM is 128MB.so virtual memory is 256MB.
44. Difference between Logical and Physical Address Space?
Ans:
The concept of a logical address space that is bound to a separate physical address space is central to proper memory management.
Logical address generated by the CPU; also referred to as virtual address.
Physical address address seen by the memory unit.
Logical and physical addresses are the same in compile-time and load-time address-binding schemes; logical (virtual) and physical addresses differ in execution-time address-binding scheme
45. Describe the actions taken by thread library to context switch between user level threads?
Ans:
The thread library function performs the following actions to context switch between user level threads Copy all live registers to Thread control Block (TCB) Restore the state of the thread to run next i.e (copy the values of live registers from (TCB) to registers) Move to the next thread to execute
46. Explain briefly about, processor, assembler, compiler, loader, linker and the functions executed by them?
Ans:
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 compute
Linker:
Linker performs the linking of libraries with the object code to make the object code into an executable machine code.
47. Explain Segmentation with paging?
Ans:
Segments can be of different lengths, so it is harder to find a place for a segment in memory than a page. With segmented virtual memory, we get the benefits of virtual memory but we still have to do dynamic storage allocation of physical memory. In order to avoid this, it is possible to combine segmentation and paging into a two-level
virtual memory system. Each segment descriptor points to page table for that segment.This give some of the advantages of paging (easy placement) with some of the advantages of segments (logical division of the program).
48. What are the major differences between windows XP and Windows 2000 operating systems?
Ans:
Both Windows XP and 2000 come in different flavors like for XP u have Home,professional and Enterprise Edition.
With 2000 u have professional,Server/s as it professional is more like client pc in Client server Architecture can also be used for development environment XP home for rather general purpose users or say newbies with minimal configuration.
With 2000 server you have all the server capabilities plus on default u might have NTFS system rather than FAT or FAT32. pluse with server u have capabilities of hosting services like DHCP, DNS, TERMINAL SERVICES etc..
There would be a lot if i start explaining in detail but for a creamy part…this is more than enough
49. What is the difference between Hard and Soft real-time systems?
Ans:
A hard real-time system guarantees that critical tasks complete on time. This goal requires that all delays in the system be bounded from the retrieval of the stored data to the time that it takes the operating system to finish any request made of it. A soft real time system where a critical real-time task gets priority over other tasks and retains that priority until it completes. As in hard real time systems kernel delays need to be bounded
50. Why are page sizes always powers of 2?
Ans:
Recall that paging is implemented by breaking up an address into a page and offset number. It is most efficient to break the address into X page bits and Y offset bits, rather than perform arithmetic on the address to calculate the page number and offset. Because each bit position represents a power of 2, splitting an address between bits results in a page size that is a power of 2.
51. On a system with paging, a process cannot access memory that it does not own why? How could the operating system allow access to other memory? Why should it or should it not?
Ans:
An address on a paging system is a logical page number and an offset. The physical page is found by searching a table based on the logical page number to produce a physical page number. Because the operating system controls the contents of this table, it can limit a process to accessing only those physical pages allocated to the
process. There is no way for a process to refer to a page it does not own because the page will not be in the page table. To allow such access, an operating system simply needs to allow entries for non-process memory to be added to the process?s page table. This is useful when two or more processes need to exchange data?they just read and write to the same physical addresses (which may be at varying logical addresses). This makes for very efficient interprocess communication.
52. What is active directory? How it works?What is dns? How it works?What is dhcp? How it works?What is ias? How it works?
Ans:
Active is a centralize directory database it’s provide single point of administration
what is DHCP
dynamic host configuration protocol
it is one of the network service which is provides the ip address dynamically to the DHCP client
it give ip address automatically to the client
WHAT IS DNS
do mine naming service
it provide ip to host and host to ip
53. What is the main component of operating system?
Ans:
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 inturn 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 microcontroller card of peripheral device and inturn work is being accomplished.
application program -> [shells ->kernel ->device driver -> controller card -> physical hardware]
54. What are Dynamic Loading, Dynamic Linking and Overlays?
Ans:
Dynamic Loading:
Routine is not loaded until it is called
Better memory-space utilization; unused routine is never loaded.
Useful when large amounts of code are needed to handle infrequently occurring cases.
No special support from the operating system is required implemented through program design.
Dynamic Linking:
Linking postponed until execution time.
Small piece of code, stub, used to locate the appropriate memory-resident library routine.
Stub replaces itself with the address of the routine, and executes the routine.
Operating system needed to check if routine is in processes memory address.
Dynamic linking is particularly useful for libraries.
Overlays:
Keep in memory only those instructions and data that are needed at any given time.
Needed when process is larger than amount of memory allocated to it.
Implemented by user, no special support needed from operating system, programming design of overlay structure is complex.
55. What is Dispatcher?
Ans:
Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; this involves:
Switching context
Switching to user mode
Jumping to the proper location in the user program to restart that program
Dispatch latency ? time it takes for the dispatcher to stop one process and start another running.
56. What is the difference between unix and windows?
Ans:
Unix and Windows use completely different paradigms for run-time loading of code. Before you try to build a module that can be dynamically loaded, be aware of how your system works.
In Unix, a shared object (.so) file contains code to be used by the program, and also the names of functions and data that it expects to find in the program. When the file is joined to the program, all references to those functions and data in the file’s code are changed to point to the actual locations in the program where the functions and data are placed in memory. This is basically a link operation.
In Windows, a dynamic-link library (.dll) file has no dangling references. Instead, an access to functions or data goes through a lookup table. So the DLL code does not have to be fixed up at runtime to refer to the program’s memory; instead, the code already uses the DLL’s lookup table, and the lookup table is modified at runtime to point to the functions and data.
In Unix, there is only one type of library file (.a) which contains code from several object files (.o). During the link step to create a shared object file (.so), the linker may find that it doesn’t know where an identifier is defined. The linker will look for it in the object files in the libraries; if it finds it, it will include all the code from that object file.
57. What is Context Switch?
Ans:
Switching the CPU to another process requires saving the state of the old process and loading the saved state for the new process. This task is known as a context switch. Context-switch time is pure overhead, because the system does no useful work while switching. Its speed varies from machine to machine, depending on the memory
speed, the number of registers which must be copied, the existed of special instructions(such as a single instruction to load or store all registers).
58. What are different tasks of Lexical Analysis?
Ans:
The purpose of the lexical analyzer is to partition the input text, delivering a sequence of comments and basic symbols. Comments are character sequences to be ignored, while basic symbols are character sequences that correspond to terminal symbols of the grammar defining the phrase structure of the input
59. Deadlock Detection-Algorithm Usage?
Ans:
When, and how often, to invoke depends on:
How often a deadlock is likely to occur?
How many processes will need to be rolled back?
If detection algorithm is invoked arbitrarily, there may be many cycles in the resource graph and so we would not be able to tell which of the many deadlocked processes ?caused? the deadlock.
60. Common Functions of Interrupts?
Ans:
Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines.
Interrupt architecture must save the address of the interrupted instruction.
Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt.
A trap is a software-generated interrupt caused either by an error or a user request.
An operating system is interrupt driven.
61. Distributed Systems?
Ans:
Distribute the computation among several physical processors.
Loosely coupled system each processor has its own local memory; processors communicate with one another through various communications lines, such as high-speed
buses or telephone lines
Advantages of distributed systems:
Resources Sharing
Computation speed up load sharing
Reliability
Communications
62. While running DOS on a PC, which command would be used to duplicate the entire diskette?
Ans:
diskcopy
Java Thread States
63. What is CPU Scheduler?
Ans:
Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them.
CPU scheduling decisions may take place when a process:
1.Switches from running to waiting state.
2.Switches from running to ready state.
3.Switches from waiting to ready.
4.Terminates.
- Scheduling under 1 and 4 is nonpreemptive.
- All other scheduling is preemptive.
64. What do you mean by deadlock?
Ans:
Deadlock is a situation where a group of processes are all blocked and none of them can become unblocked until one of the other becomes unblocked. The simplest deadlock is two processes each of which is waiting for a message from the other.
65. Give an example of microkernel?
Ans:
Amoeba
WinNT
Minix
66. What is the difference between a process and a task?
Ans:
TASK :
A Particular Work to be Done is known as TASK
PROCESS :
one or more PROCESS will be required to complete a task.
67. Describe different job scheduling in operating systems?
Ans:
Scheduling is the activity of the deciding when process will receive the resources they request.
FCFS:
FCSFS stands for First Come First Served. In FCFS the job that has been waiting the longest is served next.
Round Robin Scheduling:
Round Robin scheduling is a scheduling method where each process gets a small quantity of time to run and then it is preempted and the next process gets to run. This is called time-sharing and gives the effect of all the processes running at the same time
Shortest Job First:
The Shortest job First scheduling algorithm is a nonpreemptive scheduling algorithm that chooses the job that will execute the shortest amount of time.
Priority Scheduling:
Priority scheduling is a scheduling method where at all times the highest priority process is assigned the resource.
68. Difference between Primary storage and secondary storage?
Ans:
Main memory:
only large storage media that the CPU can access directly.
Secondary storage:
extension of main memory that provides large nonvolatile storage capacity.
69. Explain the difference between microkernel and macro kernel?
Ans:
Micro-Kernel:
A micro-kernel is a minimal operating system that performs only the essential functions of an operating system. All other operating system functions are performed by system processes.
Monolithic:
A monolithic operating system is one where all operating system code is in a single executable image and all operating system code runs in system mode.
70. I have deleted a file from recycle bin but i want to use that file how can i restore that file? I have already used system restore for the same but the file could not be restore?
Ans:
THere is two solutions:
1. Restore from last back.
2. User Recycler folder. Start–>RUN–>type c:recycler –> type FTYPE
71. Explain the main purpose of an operating system?
Ans:
Operating systems exist for two main purposes. One is that it is designed to make sure a computer system performs well by managing its computational activities. Another is that it provides an environment for the development and execution of programs.
72. What is demand paging?
Ans:
Demand paging is referred when not all of a process’s pages are in the RAM, then the OS brings the missing(and required) pages from the disk into the RAM.
73. What are the advantages of a multiprocessor system?
Ans:
With an increased number of processors, there is a considerable increase in throughput. It can also save more money because they can share resources. Finally, overall reliability is increased as well.
74. What is kernel?
Ans:
A kernel is the core of every operating system. It connects applications to the actual processing of data. It also manages all communications between software and hardware components to ensure usability and reliability.
75. What are real-time systems?
Ans:
Real-time systems are used when rigid time requirements have been placed on the operation of a processor. It has well defined and fixed time constraints.
76. What is a virtual memory?
Ans:
Virtual memory is a memory management technique for letting processes execute outside of memory. This is very useful especially is an executing program cannot fit in the physical memory.
77. Describe the objective of multiprogramming.
Ans:
The main objective of multiprogramming is to have a process running at all times. With this design, CPU utilization is said to be maximized.
78. What is time- sharing system?
Ans:
In a Time-sharing system, the CPU executes multiple jobs by switching among them, also known as multitasking. This process happens so fast that users can interact with each program while it is running.
79. What is SMP?
Ans:
SMP is a short form of Symmetric Multi-Processing. It is the most common type of multiple-processor systems. In this system, each processor runs an identical copy of the operating system, and these copies communicate with one another as needed.
80. How are server systems classified?
Ans:
Server systems can be classified as either computer-server systems or file server systems. In the first case, an interface is made available for clients to send requests to perform an action. In the second case, provisions are available for clients to create, access and update files.
81. What is asymmetric clustering?
Ans:
In asymmetric clustering, a machine is in a state known as hot standby mode where it does nothing but to monitor the active server. That machine takes the active server’s role should the server fails.
82. What is a thread?
Ans:
A thread is a basic unit of CPU utilization. In general, a thread is composed of a thread ID, program counter, register set, and the stack.
83. Give some benefits of multithreaded programming.
Ans:
– there is increased responsiveness to the user
– resource sharing within the process
– economy
– utilization of multiprocessing architecture
84. Briefly explain FCFS.
Ans:
FCFS stands for First-come, first-served. It is one type of scheduling algorithm. In this scheme, the process that requests the CPU first is allocated the CPU first. Implementation is managed by a FIFO queue.
85. What is RR scheduling algorithm?
Ans:
RR (round-robin) scheduling algorithm is primarily aimed for time-sharing systems. A circular queue is a setup in such a way that the CPU scheduler goes around that queue, allocating CPU to each process for a time interval of up to around 10 to 100 milliseconds.
86. What are necessary conditions which can lead to a deadlock situation in a system?
Ans:
Deadlock situations occur when four conditions occur simultaneously in a system: Mutual exclusion; Hold and Wait; No preemption; and Circular wait.
87. Enumerate the different RAID levels.
Ans:
RAID 0 – Non-redundant striping
RAID 1 – Mirrored Disks
RAID 2 – Memory-style error-correcting codes
RAID 3 – Bit-interleaved Parity
RAID 4 – Block-interleaved Parity
RAID 5 – Block-interleaved distributed Parity
RAID 6 – P+Q Redundancy
88. Describe Banker’s algorithm
Ans:
Bankers Algorithm
Banker’s algorithm is one form of deadlock-avoidance in a system. It gets its name from a banking system wherein the bank never allocates available cash in such a way that it can no longer satisfy the needs of all of its customers.
89. What factors determine whether a detection-algorithm must be utilized in a deadlock avoidance system?
Ans:
One is that it depends on how often a deadlock is likely to occur under the implementation of this algorithm. The other has to do with how many processes will be affected by deadlock when this algorithm is applied.
90. State the main difference between logical from physical address space.
Ans:
Logical address refers to the address that is generated by the CPU. On the other hand, physical address refers to the address that is seen by the memory unit.
91. How does dynamic loading aid in better memory space utilization?
Ans:
With dynamic loading, a routine is not loaded until it is called. This method is especially useful when large amounts of code are needed in order to handle infrequently occurring cases such as error routines.
92. What are overlays?
Ans:
Overlays are used to enable a process to be larger than the amount of memory allocated to it. The basic idea of this is that only instructions and data that are needed at any given time are kept in memory.
93. What is the basic function of paging?
Ans:
Paging is a memory management scheme that permits the physical address space of a process to be noncontiguous. It avoids the considerable problem of having to fit varied sized memory chunks onto the backing store.
94. What is fragmentation?
Ans:
Fragmentation is memory wasted. It can be internal if we are dealing with systems that have fixed-sized allocation units, or external if we are dealing with systems that have variable-sized allocation units.
95. How does swapping result in better memory management?
Ans:
During regular intervals that are set by the operating system, processes can be copied from main memory to a backing store, and then copied back later. Swapping allows more operations to be run that can fit into memory at one time.
96. Give an example of a Process State.
Ans:
– New State – means a process is being created
– Running – means instructions are being executed
– Waiting – means a process is waiting for certain conditions or events to occur
– Ready – means a process is waiting for an instruction from the main processor
– Terminate – means a process is stopped abruptly
97. What is a socket?
Ans:
A socket provides a connection between two applications. Each endpoint of a communication is a socket.
98. What is Direct Access Method?
Ans:
Direct Access method is based on a disk model of a file, such that it is viewed as a numbered sequence of blocks or records. It allows arbitrary blocks to be read or written. Direct access is advantageous when accessing large amounts of information.
99. When does thrashing occur?
Ans:
Thrashing refers to an instance of high paging activity. This happens when it is spending more time paging instead of executing.
100. What is the best page size when designing an operating system?
Ans:
The best paging size varies from system to system, so there is no single best when it comes to page size. There are different factors to consider in order to come up with a suitable page size, such as page table, paging time, and its effect on the overall efficiency of the operating system.
101. When designing the file structure for an operating system, what attributes are considered?
Ans:
Typically, the different attributes for a file structure are naming, identifier, supported file types, and location for the files, size, and level of protection.
102. What is root partition?
Ans:
Root partition is where the operating system kernel is located. It also contains other potentially important system files that are mounted during boot time.
103. What are device drivers?
Ans:
Device drivers provide a standard means of representing I/O devices that maybe manufactured by different companies. This prevents conflicts whenever such devices are incorporated in a systems unit.
104. What are the primary functions of VFS?
Ans:
VFS, or Virtual File System, separate file system generic operations from their implementation by defining a clean VFS interface. It is based on a file-representation structure known as vnode, which contains a numerical designator needed to support network file systems.
105. What are the different types of CPU registers in a typical operating system design?
Ans:
– Accumulators
– Index Registers
– Stack Pointer
– General Purpose Registers
106. What is the purpose of an I/O status information?
Ans:
I/O status information provides information about which I/O devices are to be allocated for a particular process. It also shows which files are opened, and other I/O device state.
107. What is multitasking?
Ans:
Multitasking is the process within an operating system that allows the user to run several applications at the same time. However, only one application is active at a time for user interaction, although some applications can run “behind the scene”.
108. Explain pros and cons of a command line interface?
Ans:
A command line interface allows the user to type in commands that can immediately provide results. Many seasoned computer users are well accustomed to using the command line because they find it quicker and simpler.
However, the main problem with a command line interface is that users have to be familiar with the commands, including the switches and parameters that come with it. This is a downside for people who are not fond of memorizing commands.
109. What is caching?
Ans:
Caching is the processing of utilizing a region of fast memory for a limited data and process. A cache memory is usually much efficient because of its high access speed.
110. What is spooling?
Ans:
Spooling is normally associated with printing. When different applications want to send an output to the printer at the same time, spooling takes all of these print jobs into a disk file and queues them accordingly to the printer.
111. What is an Assembler?
Ans:
An assembler acts as a translator for low-level language. Assembly codes written using mnemonic commands are translated by the Assembler into machine language.
112. What are interrupts?
Ans:
Interrupts are part of a hardware mechanism that sends a notification to the CPU when it wants to gain access to a particular resource. An interrupt handler receives this interrupt signal and “tells” the processor to take action based on the interrupt request.
113. What is GUI?
Ans:
GUI is short for Graphical User Interface. It provides users with an interface wherein actions can be performed by interacting with icons and graphical symbols. People find it easier to interact with the computer when in a GUI especially when using the mouse. Instead of having to remember and type commands, users click on buttons to perform a process.
114. What is preemptive multitasking?
Ans:
Preemptive multitasking allows an operating system to switch between software programs. This, in turn, allows multiple programs to run without necessarily taking complete control over the processor and resulting in system crashes.
115. Why partitioning and formatting is a prerequisite to installing an operating system?
Ans:
Partitioning and formatting create a preparatory environment on the drive so that the operating system can be copied and installed properly. This includes allocating space on the drive, designating a drive name, determining and creating the appropriate file system and structure.
116. What is plumbing/piping?
Ans:
It is the process of using the output of one program as an input to another. For example, instead of sending the listing of a folder or drive to the main screen, it can be piped and sent to a file, or sent to the printer to produce a hard copy.
117. What is NOS?
Ans:
NOS is short for Network Operating System. It is a specialized software that will allow a computer to communicate with other devices over the network, including file/folder sharing.
118. Differentiate internal commands from external commands.
Ans:
Internal commands are built-in commands that are already part of the operating system. External commands are separate file programs that are stored in a separate folder or directory.
119. Under DOS, what command will you type when you want to list down the files in a directory, and at the same time pause after every screen output?
a) dir /w
b) dir /p
c) dir /s
d) dir /w /p
Ans:
d) dir /w /p
120. How would a file name EXAMPLEFILE.TXT appear when viewed under the DOS command console operating in Windows 98?
Ans:
The filename would appear as EXAMPL~1.TXT . The reason behind this is that filenames under this operating system are limited to 8 characters when working under DOS environment.
121. What are the functions of operating system?
Ans:
The operating system controls and coordinates the use of hardware among the different processes and applications. It provides the various functionalities to the users. The following are the main job of operating system.
– Resource utilization
– Resource allocation
– Process management
– Memory management
– File management
– I/O management
– Device management
122. Explain Booting the system and Bootstrap program in operating system.
Ans:
The procedure of starting a computer by loading the kernel is known as booting the system.
When a user first turn on or booted the computer, it needs some initial program to run. This initial program is known as Bootstrap Program. It is stored in read-only memory (ROM) or electrically erasable programmable read-only memory (EEPROM). Bootstrap program locates the kernel and loads it into main memory and starts its execution.
123. Describe Main memory and Secondary memory storage in brief.
Ans:
Main memory is also called random access memory (RAM). CPU can access Main memory directly. Data access from main memory is much faster than Secondary memory. It is implemented in a semiconductor technology, called dynamic random-access memory (DRAM).
Main memory is usually too small to store all needed programs. It is a volatile storage device that loses its contents when power is turned off. Secondary memory can stores large amount of data and programs permanently. Magnetic disk is the most common secondary storage device. If a user wants to execute any program it should come from secondary memory to main memory because CPU can access main memory directly.
124. What are the advantages of multiprocessor system?
Ans:
Systems which have more than one processor are called multiprocessor system. These systems are also known as parallel systems or tightly coupled systems.
Multiprocessor systems have the following advantages.
– Increased Throughput: Multiprocessor systems have better performance than single processor systems. It has shorter response time and higher throughput. User gets more work in less time.
– Reduced Cost: Multiprocessor systems can cost less than equivalent multiple single processor systems. They can share resources such as memory, peripherals etc.
– Increased reliability: Multiprocessor systems have more than one processor, so if one processor fails, complete system will not stop. In these systems, functions are divided among the different processors.
125. Is it possible to have a deadlock involving only one process? Explain your answer.
Ans:
Deadlock with one process is not possible. Here is the explanation.
A deadlock situation can arise if the following four conditions hold simultaneously in a system.
– Mutual Exclusion.
– Hold and Wait.
– No Preemption.
– Circular-wait.
It is not possible to have circular wait with only one process, thus failing a necessary condition for Circular wait. There is no second process to form a circle with the first one. So it is not possible to have a deadlock involving only one process.
126. What is an operating system?
Ans:
An operating system is a collection of software programs which control the allocation and usage of various hardware resources in the system. It is the first program to be loaded in the computer and it runs in the memory till the system is shut down.
Some of the popular Operating Systems are DOS, Windows, Ubuntu, Solaris etc.
127. What are its main functions?
Ans:
The main functions of an OS are:
a. Process Management
b. Memory Management
c. Input/ Output Management
d. Storage/ File system management
128. What is a Kernel?
Ans:
– Kernel is the part of OS which handles all details of sharing resources and device handling.
– It can be considered as the core of OS which manages the core features of an OS.
– Its purpose is to handle the communication between software and hardware
– Its services are used through system calls.
– A layer of software called shell wraps around the Kernel.
129. What are the main functions of a Kernel?
Ans:
The main functions of a Kernel are:
– Process management
– Device management
– Memory management
– Interrupt handling
– I/O communication
– File system management
130. What are the different types of Kernel?
Ans:
Kernels are basically of two types:
a. Monolithic Kernels – In this architecture of kernel, all the system services were packaged into a single system module which lead to poor maintainability and huge size of kernel.
b. Microkernels – They follow the modular approach of architecture. Maintainability became easier with this model as only the concerned module is to be altered and loaded for every function. This model also keeps a tab on the ever growing code size of the kernel.
131. What are the disadvantages of Microkernels?
Ans:
Following are the main disadvantages of Microkernels. Usually these disadvantages are situation based.
a. Larger running memory footprint
b. Performance loss due to the requirement of more software for interfacing.
c. Difficulty in fixing the messaging bugs.
d. Complicated process management.
132. What is a command interpreter?
Ans:
It is a program that interprets the command input through keyboard or command batch file. It helps the user to interact with the OS and trigger the required system programs or execute some user application.
Command interpreter is also referred to as:
– Control card interpreter
– Command line interpreter
– Console command processor
– Shell
133. Explain Process.
Ans:
A process is a program that is running and under execution. On batch systems, it is called as a “job” while on time sharing systems, it is called as a “task”.
134. Explain the basic functions of process management.
Ans:
Important functions of process management are:
– Creation and deletion of system processes.
– Creation and deletion of users.
– CPU scheduling.
– Process communication and synchronization.
135. What do you know about interrupt?
Ans:
– Interrupt can be understood as a signal from a device causing context switch.
– To handle the interrupts, interrupt handlers or service routines are required.
– The address of each Interrupt service routine is provided in a list which is maintained in interrupt vector.
136. What is a daemon?
Ans:
– Daemon – Disk and execution monitor, is a process that runs in the background without user’s interaction. They usually start at the booting time and terminate when the system is shut down.
137. How would you identify daemons in Unix?
Ans:
– The name of daemons usually end with ‘d’ at the end in Unix.
– For e.g. httpd, named, lpd.
138. What do you mean by a zombie process?
Ans:
– These are dead processes which are not yet removed from the process table.
– It happens when the parent process has terminated while the child process is still running. This child process now stays as a zombie.
139. What do you know about a Pipe? When is it used?
Ans:
– It is an IPC mechanism used for one way communication between two processes which are related.
– A single process doesn’t need to use pipe. It is used when two process wish to communicate one-way.
140. What is a named pipe?
Ans:
– A traditional pipe is unnamed and can be used only for the communication of related process. If unrelated processes are required to communicate – named pipes are required.
– It is a pipe whose access point is a file available on the file system. When this file is opened for reading, a process is granted access to the reading end of the pipe. Similarly, when the file is opened for writing, the process is granted access to writing end of the pipe.
– A named pipe is also referred to as FIFO or named FIFO.
141. What are the various IPC mechanisms?
Ans:
IPC – Inter Process Communication.
Various IPC mechanisms are:
a. Sockets
b. Pipes
c. Shared memory
d. Signals
e. Message Queues
142. What is a semaphore?
Ans:
– A semaphore is a hardware or a software tag variable whose value indicates the status of a common resource.
– Its purpose is to lock the common resource being used. A process which needs the resource will check the semaphore to determine the status of the resource followed by the decision for proceeding.
– In multitasking operating systems, the activities are synchronized by using the semaphore techniques.
143. What kind of operations are possible on a semaphore?
Ans:
Two kind of operations are possible on a semaphore – ‘wait’ and ‘signal’.
144. What is context switching?
Ans:
– Context is associated with each process encompassing all the information describing the current execution state of the process
– When the OS saves the context of program that is currently running and restores the context of the next ready to run process, it is called as context switching.
– It is important for multitasking OS.
Tell us something about Mutex.
– Mutex – ‘Mutual Exclusion Lock’ is a lock which protects access to shared data resource.
– Threads can create and initialize a mutex to be used later.
– Before entering a critical region the mutex is locked. It is unlocked after exiting the critical region. If any thread tries to lock the mutex during this time, it can’t do so.
145. What is a critical section?
Ans:
It is a section of code which can be executed only by one process at a time.
146. What is synchronization? What are the different synchronization mechanisms?
Ans:
Synchronization means controlling access to a resource that is available to two or more threads or process. Different synchronization mechanisms are:
– Mutex
– Semaphores
– Monitors
– Condition variables
– Critical regions
– Read/ Write locks
147. What is the basic difference between pre-emptive and non-pre-emptive scheduling.
Ans:
Pre-emptive scheduling allows interruption of a process while it is executing and taking the CPU to another process while non-pre-emptive scheduling ensures that a process keeps the CPU under control until it has completed execution.
148. Is non-pre-emptive scheduling frequently used in a computer? Why?
Ans:
No, it is rarely used for the reasons mentioned below:
– It can not ensure that each user gets a share of CPU regularly.
– The idle time with this increases reducing the efficiency and overall performance of the system.
– It allows program to run indefinitely which means that other processes have to wait for very long.
149. Explain condition variable.
Ans:
– These are synchronization objects which help threads wait for particular conditions to occur.
– Without condition variable, the thread has to continuously check the condition which is very costly on the resources.
– Condition variable allows the thread to sleep and wait for the condition variable to give it a signal.
150. What are read-write locks?
Ans:
– Read – write locks provide simultaneous read access to many threads while the write access stays with one thread at a time. They are especially useful in protecting the data that is not frequently written but read simultaneously by many threads.
– They are slower than mutexes.
151. What is a deadlock?
Ans:
– It is a condition where a group of two or more waiting for the resources currently in use by other processes of the same group.
– In this situation every process is waiting for an event to be triggered by another process of the group.
– Since no thread can free up the resource a deadlock occurs and the application hangs.
152. What are the necessary conditions for deadlock to occur?
Ans:
a. At least one resource should be occupied in a non-sharable condition.
b. A process holding at least one resource is waiting for more resources currently in use by other processes.
c. It is not possible to pre-empt the resource.
d. There exists a circular wait for processes.
153. Name the functions constituting the OS’s memory management.
Ans:
– Memory allocation and de-allocation
– Integrity maintenance
– Swapping
– Virtual memory
154. Name the different types of memory?
Ans:
a. Main memory also called primary memory or RAM
b. Secondary memory or backing storage
c. Cache
d. Internal process memory
155. Throw some light on Internal Process Memory.
Ans:
– This memory consists of a set of high-speed registers. They work as temporary storage for instructions and data.
156. Explain compaction.
Ans:
During the process of loading and removal of process into and out of the memory, the free memory gets broken into smaller pieces. These pieces lie scattered in the memory. Compaction means movement of these pieces close to each other to form a larger chunk of memory which works as a resource to run larger processes.
157. What are page frames?
Ans:
Page frames are the fixed size contiguous areas into which the main memory is divided by the virtual memory.
158. What are pages?
Ans:
– Pages are same sized pieces of logical memory of a program. Usually they range from 4 KB to 8 KB depending on the addressing hardware of the machine.
– Pages improve the overall system performance and reduces requirement of physical storage as the data is read in ‘page’ units.
159. Differentiate between logical and physical address.
Ans:
– Physical addresses are actual addresses used for fetching and storing data in main memory when the process is under execution.
– Logical addresses are generated by user programs. During process loading, they are converted by the loader into physical address.
160. When does page fault error occur?
Ans:
– It occurs when a page that has not been brought into main memory is accessed.
161. Explain thrashing.
Ans:
– In virtual memory system, thrashing is a high page fault scenario. It occurs due to under-allocation of pages required by a process.
– The system becomes extremely slow due to thrashing leading to poor performance.
162. What are the basic functions of file management in OS?
Ans:
– Creation and deletion of files/ directories.
– Support of primitives for files/ directories manipulation.
– Backing up of files on storage media.
– Mapping of files onto secondary storage.
163. Explain thread.
Ans:
– It is an independent flow of control within a process.
– It consists of a context and a sequence of instructions for execution.
164. What are the advantage of using threads?
Ans:
The main advantages of using threads are:
a.) No special communication mechanism is required.
b.) Readability and simplicity of program structure increases with threads.
c.) System becomes more efficient with less requirement of system resources.
165. What are the disadvantages of using threads?
Ans:
The main disadvantages of using threads are:
– Threads can not be re-used as they exist within a single process.
– They corrupt the address space of their process.
– They need synchronization for concurrent read-write access to memory.
166. What is a compiler?
Ans:
A compiler is a program that takes a source code as an input and converts it into an object code. During the compilation process the source code goes through lexical analysis, parsing and intermediate code generation which is then optimized to give final output as an object code.
167. What is a library?
Ans:
It is a file which contains object code for subroutines and data to be used by the other program.
168. What are the advantages of distributed system?
Ans:
Advantages of distributed system are:
– Resources get shared
– Load gets shared
– Reliability is improved
– Provide a support for inter-process communication
169. What is the state of the processor, when a process is waiting for some event to occur?
Ans:
Waiting state
170. What are the different types of scheduling algorithms?
Ans:
The scheduling algorithms decide which processes in the ready queue are to be allocated to the CPU for execution. Scheduling algorithms can be broadly classified on the basis of:
– Preemptive algorithms
– Round Robin Scheduling
– Shortest Job First Scheduling (can be both)
– Priority Scheduling (can be both)
– Non-preemptive algorithms
– First Come First Served Scheduling
Non-Preemptive algorithms: In this type of scheduling once a CPU has been allocated to a process it would not release the CPU till a request for termination or switching to waiting state occurs.
Preemptive algorithms: In this type of scheduling a process maybe interrupted during execution and the CPU maybe allocated to another process.
171. Why is round robin algorithm considered better than first come first served algorithm?
Ans:
The first come first served algorithm is the simplest scheduling algorithm known. The processes are assigned to the CPU on the basis of their arrival time in the ready queue. Since, it is non-preemptive once a process is assigned to the CPU, it will run till completion. Since a process takes the CPU till it is executed it is not very good in providing good response times. It can make other important processes wait un-necessarily.
On the other hand, the round robin algorithm works on the concept of time slice or also known as quantum. In this algorithm, every process is given a predefined amount of time to complete the process. In case, a process is not completed in its predefined time then it is assigned to the next process waiting in queue. In this way, a continuous execution of processes is maintained which would not have been possible in case of FCFS algorithm
172. Explain how a copying garbage collector works. How can it be implemented using semispaces?
Ans:
The copying garbage collector basically works by going through live objects and copying them into a specific region in the memory. This collector traces through all the live objects one by one. This entire process is performed in a single pass. Any object that is not copied in memory is garbage.
The copying garbage collector can be implemented using semispaces by splitting the heap into two halves. Each half is a contiguous memory region. All the allocations are made from a single half of the heap only. When the specified heap is half full, the collector is immediately invoked and it copies the live objects into the other half of the heap. In this way, the first half of the heap then only contains garbage and eventually is overwritten in the next pass.
173. How does reference counting manage memory allocated objects? When can it fail to reclaim objects?
Ans:
Reference counting augments every object with a count of the number of times an object has been referenced. This count is incremented every time a reference to that object is made. Also every time a reference is destroyed the reference is decremented. This process is repeated till the reference count becomes zero. Once the reference count of an object reaches zero the object can be reclaimed. In this way, reference counting systems can perform automatic memory management by keeping a count in every object. Any object that does not have a reference count can be considered to be dead and that memory can be reclaimed.
The reference counting method can fail to reclaim objects in case of cyclic references. There are no concrete ways to avoid this problem and it is always suggested to create an architecture that does not use a circular reference.
174. What differences are there between a semaphore wait signal and a condition variable wait signal?
Ans:
Semaphore wait signal:
– They can be used anywhere except in a monitor.
– The wait() function does not always blocks its caller.
– The signal() function increments the semaphore counter and can release a process.
– If the signal() releases a process, the released and the caller both continue.
Condition Variable wait signal:
– It can only be used in monitors.
– The wait() function always blocks its caller.
– The signal() can either release a process or it is lost as if it never occurred.
– On signal() releasing a process either the caller or the released continues but not both at the same time.
175. For a deadlock to occur what are the necessary conditions
Ans:
In order for deadlocks to occur there are four necessary conditions:
– Mutual Exclusion: The resources available are not sharable. This implies that the resources used must be mutually exclusive.
– Hold and Wait: Any process requires some resources in order to be executed. In case of insufficient availability of resources a process can take the available resources, hold them and wait for more resources to be available.
– No Preemption: The resources that a process has on hold can only be released by the process itself voluntarily. This resource cannot be preempted by the system.
– Circular Waiting: A special type of waiting in which one process is waiting for the resources held by a second process. The second process is in turn waiting for the resources held by the first process.
176. Why is the context switch overhead of a user-level threading as compared to the overhead for processes? Explain.
Ans:
This is due to the reason that a context switch implementation is done by the kernel. During this process the state information is copied between the processor and the PCB (process control block) or the TCB (thread control block). Since the kernel does not know anything about user-level threads, technically it is not possible for it to be a user level thread context switch. The user level scheduler can do some limited state copying on the behalf of a thread prior to the control being handed to that thread. But this copying of state information is smaller compared to that of a kernel-level process. Also the process does not involve going into the kernel mode with the help of a system call.
177. State the advantages of segmented paging over pure segmentation?
Ans:
In broad terms paging is a memory management technique that allows a physical address space of a process to be non-contiguous.
Segmented paging has a certain set of advantages over pure segmentation such as:
– Segmented paging does not have any source of external fragmentation.
– Since a segment existence is not restricted to a contiguous memory range it can be easily grown and does not have to adjust into a physical memory medium.
– With segmented paging the addition of an offset and a base is simpler as it is only an append operation instead of it being a full addition operation.
178. When does the Belady’s anomaly occur?
Ans:
The Belady’s anomaly is a situation in which the number of page faults increases when additional physical memory is added to a system. This anomaly arises in some algorithms that implement virtual memory. The virtual memory allows programs larger than the physical memory space to execute. An algorithm suffers from this problem when it cannot guarantee that a page will be kept when a small number of frames are available. An optimal algorithm would not suffer from this problem as it replaces the page not to be used for the longest time. The anomaly occurs when the page replacement algorithm will remove a page that will be needed in the immediate future. An optimal algorithm will not select such a page that will be required immediately. This anomaly is also stated to be unbounded.
179. What complications does concurrent processing add to an operating system?
Ans:
There are various complications of concurrent processing such as:
– A time sharing method must be implemented to allow multiple processes to have an access to the system. This will involve the preemption of processes that do not give up CPU on their own i.e. more than one process may be executing kernel code simultaneously.
– The amount of resources that a process can use and the operations that it may perform must be limited. The system resources and the processes must be protected from each other.
– Kernel must be designed to prevent deadlocks between the various processes, i.e. Cyclic waiting or hold and waiting must not occur.
– Effective memory management techniques must be used to better utilize the limited resources.
180. How can a VFS layer allow multiple file systems support?
Ans:
The VFS layer also known as the virtual file system functions in many ways similar to object oriented programming techniques. It acts like an abstraction layer on top of a more specific file system. The VFS layer enables the OS to make system calls independent of the file system type used. Any file system that is used gives its function calls used and the data structures to the layer of VFS. The VFS layer translates a system call into the correct specific functions for the targeted file system. The program that is used for calling does not have a file system specific code also the system call structures used in upper levels are file system independent. The VFS layer translation translates the non-file system specific calls into a file system specific operation.
181. What are the pros and cons of using circuit switching?
Ans:
The primary advantage of using circuit switching is that it ensures the availability of resources. That is it reserves the network resources required for a specific transfer prior to the transmission taking place. By doing so it ensures that no packet would be dropped and the required quality of service is met.
The disadvantage of using circuit switching is that it requires a round trip message to setup a reservation. By doing so as it provisions the resources ahead of the transmission it might lead to the suboptimal use of resources.
Circuit switching can be implemented for applications that have constant demand for network resources for long periods of time.
182. What problems are faced during the implementation of a network-transparent system?
Ans:
A designer primarily faces two major problems while implementing a network-transparent system. They are as follows:
– The primary problem is to make all the processors and storage devices to appear transparent on the network. This implies that the distributed system should appear as a single centralized system to the users using the network.
There are two solutions to it:
– The Andrews files system
– The NFS system.
– Both these file systems (distributed) appear as a single file system to the user whereas in reality it may be distributed over the network.
– The secondary issue is regarding the user mobility. The designer would want any user to connect to the entire system overall rather than to a particular machine.
183. Explain the layers of a Windows XP system.
Ans:
The layers of Windows XP system boot-up is as follows:
– A situation of operating system portability is created by the hardware abstraction layer by hiding hardware differences from the operating systems upper layers. A virtual machine interface is provided by the hardware abstraction layer to be used by the kernel dispatcher and the device drivers.
– The foundation provided by the kernel layer is used by the executive functions and the user mode sub systems. The kernel would always remain in memory and cannot be preempted. The functions of the kernel are thread scheduling, interrupt and exception handling etc.
– The executive layer is responsible for providing services to be used by all subsystems. These can be object manager, process manager, i/o manager etc.
184. Explain the booting process of a Windows XP system.
Ans:
The steps involved are as follows:
– As the computer is powered on, the BIOS begins execution from ROM, it loads and executes the bootstrap loader.
– The NTLDR program is loaded from the root directory of the system disk and determines which boot disk contains the operating system.
– NTLDR loads the HAL library, kernel and system hive. The system hive indicates the required boot drivers and loads them one by one.
– Kernel execution begins by initializing the system and creating two processes: the system process containing all internal worker threads and the first user-mode initialization process: SMSS.
– SMSS further initializes the system by establishing paging files and loading device drivers.
– SMSS creates two processes: WINLOGON, which brings up the rest of the system and CSRSS, the Win32 subsystem process.
185. How are data structures handled by NTFS and how does it recover from a crash?
Ans:
In an NTFS file system inside the transactions all the data structure updates are performed. Prior to the alteration of a data structure a transaction creates log record containing information on redo and undo functions. Once a transaction is completed commit record information is stored in the logs.
An NTFS system recovers from a crash by accessing information from the created log records. The first step is to redo operations of committed transactions and undoing those transactions which could not be successfully committed. Although the NTFS file system after recovering from a crash might not reflect the same user data prior to a crash but it can guarantee the file data structures are undamaged. It restores the structure to a pre-crash and consistent state.
186. What are the benefits and losses of placing the functionality in a device controller rather than in placing it in the kernel?
Ans:
The benefits of placing functionality in the device controller are:
– System crasher due to the occurrence of a bug is greatly reduced.
– By the utilization of dedicated hardware and algorithms that are hard coded the performance can be improved greatly.
– Since the algorithms are hard coded the kernel gets simplified.
The banes of placing functionality in the controller rather than the kernel are:
– Once a bug occurs they are difficult to fix, a new firmware or revision may be required.
– For performance improvement of algorithms hardware upgrades are required rather than a device driver update.
187. What are merits and demerits of systems supporting multiple file structure and systems supporting a stream of bytes?
Ans:
The main advantage of having a system that supports multiple file structures is that the support for it is provided by the system itself no other individual application is required to provide the multiple structure support. Since the support is provided by the system itself the implementation is much more efficient as compared to application level.
A demerit of such kind of implementation is that it can increase the overall size of the system. Also, since the support is provided by the system, for an application that requires a different file type may not be executable on such a system.
A good alternative for this is that the OS does not define any support for file structures instead all files are considered to be a series of bytes. By doing so the support for file systems is simplified as the OS does not have to specify the different structures for the file systems. It allows the applications to define the file structures. This kind of implementation can be found in UNIX.
188. What do you understand by transaction atomicity?
Ans:
The transaction process can be considered to be a series of read and write operations upon some data which is followed by a commit operation. By transaction atomicity it means that if a transaction is not completed successfully then the transaction must be aborted and any changes that the transactions did while execution must be roll backed. It means that a transaction must appear as a single operation that cannot be divided. This ensures that integrity of the data that is being updated is maintained. If the concept of atomicity in transaction is not used any transaction that is aborted midway may result in data to be inconsistent as there might be a possibility two transactions may be sharing the same data value.
189. Why is a single serial port managed with a single interrupt-driven I/O but a front-end processor is managed using a polling I/O, such as a terminal concentrator?
Ans:
When the I/O is frequent and of very short durations polling is considered to be more efficient than an interrupt driven I/O. Although, a serial port individually can have fairly infrequent number of I/O and hence should ideally use interrupts the case of serial ports in a terminal concentrator is different.
A terminal concentrator consists of multiple serial ports and this can lead to the creation of multiple short I/O instances this can create un-necessary load on the system in case of interrupts usage.
Instead, if a polling loop is used it can greatly reduce the amount of load on the system by looping through without the requirement of I/O.
Due to this reason interrupts are used for single ports as the frequency of I/O on such a port is less and can be managed effectively, whereas we use polling for multiple ports as the frequency of I/O increases and are of short durations which suits polling.
190. What is graceful degradation?
Ans:
– It is the ability to continue providing service proportional to level of hardware.
– Systems designed for graceful degradation are called fault tolerant.
– If we have several processors connected together, then failure of one would not stop the system.
– Then the entire system runs only 10% slower.
– This leads to increased reliability of the system.
191. What are loosely coupled systems?
Ans:
– These systems are also called as the distributed systems.
– It consist of collection of processors that do not share memory or clock.
– The processors communicate through high speed buses or telephone lines.
– It can be a centralized system where the server responds to client requests.
– It can also be a peer to peer system.
192. Explain SMP.
Ans:
– It is called as symmetric multiprocessing which is multiprocessor system.
– In it each processor runs an identical copy of the operating system.
– These copies communicate with one another as needed.
– These processor systems lead to increased throughput.
– These systems are also called parallel systems or tightly coupled systems.
193. What is DLM?
Ans:
– It is the service called as distributed lock manager.
– In cluster systems to avoid file sharing the distributed systems must provide the access control and file locking.
– This ensures that no conflicting operations occur in the system.
– Here the distributed file systems are not general purpose therefore it requires locking.
194. Explain the handheld systems. List the issues related to the handheld system.
Ans:
– Handheld devices are palm tops and cellular telephones with connectivity to a network.
– These devices are of limited size which leads to limited applications.
– They use a memory 512KB to 16MB as a result the operating system and applications must use the memory efficiently.
– The speed of the processors is only a fraction of speed of the PC processors and for faster processors larger battery is required.
– These devices use very small display screens so reading mails and browsing must be condensed to smaller displays.
195. Why is interrupt vector used in operating systems?
Ans:
– The operating system these days are interrupt driven and this requires the interrupt vector.
– This interrupt vector contains the addresses of the interrupt service routines for various devices.
– Here the interrupts can be indirectly called through the table with no intermediate routine needed.
– This leads to interrupt handling at a faster rate.
– Operating systems like MS DOS and UNIX are using the interrupt vector.
196. What is the need of device status table?
Ans:
– This table gives the device type, its address and status.
– It is required to keep a track of many input output requests at the same time.
– The state of the device can be functioning, idle or busy.
– If a device is busy, type of request and other parameters are stored in the table entry.
– If more than one processor issues request for the same device then a wait queue is maintained.
197. How can the speed of interrupt driven input output systems be improved?
Ans:
– Direct memory access is used to enhance the speed of the input output systems.
– Here, buffers, counters and pointers are set for the devices.
– The device controller transfers the block of data directly from own buffer storage to memory.
– The data is not given to the CPU for further transfer between CPU and input output devices or CPU and memory.
– Only one interrupt is generated per block than one interrupt per byte which enhances the speed.
198. Explain the execution cycle for a von Neumann architecture.
Ans:
– Initially the system will fetch the instruction and stores it in instruction register.
– Instruction is then decoded and may cause operands to be fetched from memory.
– After execution the result is stored in the memory.
– Here the memory unit sees only the memory addresses irrespective of how they are generated.
– Memory unit is also unaware of what addresses are for.
199. Explain the positioning time for a disk.
Ans:
– It is also called as the random access time used by a disk to perform operations.
– It consists of time to move the disk arm to the desired cylinder called the seek time.
– The time required for the desired sector to rotate to the disk head is called rotational latency.
– Typical disks can transfer megabytes of data per second.
– Seek time and rotational latency is always in milliseconds.
200. What is EIDE?
Ans:
– EIDE is a bus called enhanced integrated drive electronics.
– The input output devices are attached to the computer by a set of wires called the bus.
– The data transfer on a bus are carried out by electronic processes called controllers.
– The host controller sends messages to device controller and device controller performs the operations.
– These device controllers consist of built in cache so that data transfer occurs at faster speed.
201. Differentiate between the user mode and monitor mode.
Ans:
– User mode and monitor mode are distinguished by a bit called the mode bit.
– User mode uses bit 1 and monitor mode uses bit 0.
– At the boot time hardware starts with the monitor mode.
– Also, at the time of interrupt user mode is shifted to the transfer mode.
– System always switches to the user mode before passing control to the user program.
– Whenever system gains control of the computer it works in monitor mode otherwise in user mode.
202. What is time slice?
Ans:
– The timer in CPU is set to interrupt every N milliseconds where this N is called the time slice.
– It is the time each user gets to execute before control is given to next user.
– At the end of each time slice the value of N is incremented and the record is maintained.
– It also maintains the record of the total time user program has executed thus far.
– This method helps in time sharing among the various users.
203. What are the activities related to the Time Shared User Program Management?
Ans:
– An Operating System is responsible for the creation and deletion of both user and system processes.
– It also provides mechanism for the process synchronization.
– Suspending and resuming of windows is done by the operating system itself.
– Program needs resources like CPU time, memory, files, input output devices to complete the task which is provided by the operating system.
– Mechanisms are also provided for deadlock handling.
204. When an input file is opened, what are the possible errors that may occur?
Ans:
– 1st condition may be that the file is protected against access, here it terminates abruptly.
– 2nd condition may be that file exists, then we need to create the output file.
– If file with the same name exists then it may be deleted or program may be aborted.
– In another case the system may ask the user to replace the existing file or abort the program.
205. Explain PCB.
Ans:
– PCB, process control block, is also called as the task control block.
– It contains information about the process state like new, ready, running, waiting and halt.
– It also includes the information regarding the process priority and pointers to scheduling queues .
– Its counter indicates the address of the next instruction to be executed for the process.
– It basically serves as the storage for any information that may vary from process to process.
206. What is context switching ?
Ans:
– It is the process of switching the CPU from one process to another.
– This requires to save the state of the old process and loading the saved state for the new process.
– The context of the process is represented in the process control block.
– During switching the system does no useful work.
– How the address space is preserved and what amount of work is needed depends on the memory management.
207. What is cascading termination?
Ans:
– If one process is terminated, its related processes are also terminated abnormally then it is called cascade termination.
– It occurs in the case of parent child process.
– If the parent process is terminated normally or abnormally then all its child processes must be terminated.
– The parent is existing and the operating system does not allow a child to continue if its parent terminates.
– This child process is the new process created by the process called the parent process.
208. Explain IPC.
Ans:
– It is called as the inter process communication.
– The scheme requires that processes share a common buffer pool and code for implementing the buffer.
– It allows processes to communicate and to synchronize their actions.
– Example : chat program used on the world wide web.
– It is useful in distributed computer systems where communicating processes reside on different computers connected with a network.
209. What are sockets?
Ans:
– A socket is defined as endpoint for communication, a pair of sockets is used by the pair of processes.
– It is made of IP address chained with a port number.
– They use the client server architecture.
– Server waits for incoming client requests by listening to specified port.
– On reception of request, server accepts connection from client socket to complete the connection.
210. Explain the meaning of Kernal.
Ans:
Operating System Kernal – The kernel is the essential center of a computer operating system, the core that provides basic services for all other parts.
About the author
Leave a Reply Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.