Answer:: Question 1. What Is Microsoft Dos and Windows Command Line?
Answer:: Question 1. What Is Microsoft Dos and Windows Command Line?
Answer :
MS-DOS is a non-graphical command line operating system created for IBM compatible
computers. MS-DOS was first introduced by Microsoft in August 1981 and was last
updated in 1994 with MS-DOS 6.22. Although the MS-DOS operating system is rarely
used today, the command shell commonly known as the Windows command line is still
widely used.
Question 2. What Is Dictionary Definition And Related Terms On Ms-dos?
Answer :
MS-DOS is a non-graphical command line operating system derived from 86-DOS that
was created for IBM compatible computers. MS-DOS originally written by Tim Paterson
and introduced by Microsoft in August 1981 and was last updated in 1994 when MS-
DOS 6.22 was released. MS-DOS allows the user to navigate, open, and otherwise
manipulate files on their computer from a command line instead of a GUI like Windows.
Windows DOS command prompt window Today, MS-DOS is no longer used; however,
the command shell, more commonly known as the Windows command line is still used
by many users. The picture to the right, is an example of what an MS-DOS window more
appropriately referred to as the Windows command line looks like running under
Microsoft Windows.
Most computer users are only familiar with how to navigate Microsoft Windows using
the mouse. Unlike Windows, MS-DOS is a command-line and is navigated by using MS-
DOS commands. For example, if you wanted to see all the files in a folder in Windows
you would double-click the folder to open the folder in Windows Explorer. In MS-DOS, to
view that same folder you would navigate to the folder using the cd command and then
list the files in that folder using the dir command.
Question 4. What Is Batch File?
Answer :
Batch files allow MS-DOS and Microsoft Windows users to write a series of commands
to run in order upon their execution for automating frequently performed tasks. For
example, a batch file could be used to run frequently utilized commands, delete or move
a series of files, and other jobs.
One of the earliest batch files was the autoexec.bat, which is a boot batch file loaded
each time the computer started MS-DOS and early versions of Windows. A simple batch
file does not require any special programming skills and can be created by users with a
basic understanding of MS-DOS commands.
Question 5. How To Run A Batch File?
Answer :
To run a batch file, follow the steps below for where you want to run the batch file.
Running a batch file from within Windows:
A batch file runs like any other executable file by double-clicking the file within Windows.
However, because a batch file runs in a command line, it immediately exits when done,
so you may only see a black box for a second.
Tip: If the batch file is closing too fast, or you want to read the output from the batch file,
you can edit the batch file and add a pause to the end of the file. The pause command
waits for user input before continuing.
Run a batch file from the Command Prompt:
To run a batch file, move to the directory containing the file and type the name of the
batch file. For example, if the batch file is named "hope.bat", you can type "hope" to
execute the batch file.
Question 11. What Is An External And Internal Command?
Answer :
In MS-DOS, there are two ways commands are executed: internally and externally. An
internal command is embedded into the command.com file, and an external command,
which is not and requires a separate file to operate.
For example, if your computer does not have the fdisk.exe file and you try using the
fdisk command, you will receive a "Bad command or file name" error message. Fdisk is
an external command that only works if fdisk.exe, or in some cases, fdisk.com, is
present.
However, as long as MS-DOS is running on your computer internal commands, such as
the cd command, will always be available and does not require other files to run. Each of
the commands listed on the Computer Hope's MS-DOS page denote what commands
are external and internal.
1. Question 12. How To Scroll In Ms-dos Or The Windows Command Prompt?
Answer :
When in a Windows command or MS-DOS window information may scroll so fast it
may be necessary to scroll up in the window.
Listing files or command output one page at a time
If the reason you're wanting to scroll is because a command such is showing too
much output, use one of the examples shown below to show any output one page at
a time.
To list files in MS-DOS one page at a time use the 'pipe' ( | ) command in conjunction
with the more statement, as shown in the examples below.
dir | more
or
attrib *.* | more
Also, commands like the dir command, also allow the /p command that displays one
page at a time, as shown in the example below.
dir /p
Os
1) Explain the main purpose of an operating system?
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.
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.
4) What is kernel?
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.
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.
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.
The main objective of multiprogramming is to have a process running at all times. With this
design, CPU utilization is said to be maximized.
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.
9) What is SMP?
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.
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.
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.
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.
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.
16) What are necessary conditions which can lead to a deadlock situation in a system?
Deadlock situations occur when four conditions occur simultaneously in a system: Mutual
exclusion; Hold and Wait; No preemption; and Circular wait.
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.
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.
20) State the main difference between logical from physical address space.
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.
21) How does dynamic loading aid in better memory space utilization?
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.
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.
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.
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.
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.
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.
Thrashing refers to an instance of high paging activity. This happens when it is spending
more time paging instead of executing.
30) What is the best page size when designing an operating system?
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.
31) When designing the file structure for an operating system, what attributes are considered?
Typically, the different attributes for a file structure are naming, identifier, supported file
types, and location for the files, size, and level of protection.
Root partition is where the operating system kernel is located. It also contains other
potentially important system files that are mounted during boot time.
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.
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.
35) What are the different types of CPU registers in a typical operating system design?
– Accumulators
– Index Registers
– Stack Pointer
– General Purpose Registers
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.
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”.
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.
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.
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.
An assembler acts as a translator for low-level language. Assembly codes written using
mnemonic commands are translated by the Assembler into machine language.
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.
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.
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.
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.
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.
49) 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
Answer: d) dir /w /p
50) How would a file name EXAMPLEFILE.TXT appear when viewed under the DOS
command console operating in Windows 98?
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.
In Ubuntu, Unity is the default graphical shell. On the left side of the Ubuntu, it introduces
the launcher and Dash to start programs.
In order to add new entries to the launcher, you can create a file name like .desktop and
then drag the file on the launcher.
54) Explain the purpose of using a libaio package in Ubuntu?
Libaio is Linux Kernel Asynchronous I/O (A/O). A/O allows even a single application thread
to overlap I/O operations with other processing, by providing an interface for submitting one
or more I/O requests in one system call without waiting for completion. And a separate
interface to reap completed I/O operations associated with a given completion group.
Through behaviors tab, you can make many changes on the appearance of the desktop
Auto-hide the launcher: You can use this option to reveal the launcher when moving
the pointer to the defined hot spot.
Enable workspaces: By checking this option, you can enable workspace
Add show desktop icon to the launcher: This option is used to display the desktop
icon on the launcher
56) What is the meaning of “export” command in Ubuntu?
Export is a command in Bash shell language. When you try to set a variable, it is visible or
exported to any subprocess started from that instance of bash. The variable will not exist in
the sub-process without the export command.
To reset the unity configuration the simplest way to do is to hit open a Terminal or hit Atl-F2
and run the command # unity –reset
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
System calls works as a mediator between user program and service provided by operating system.
In actual situation, functions that make up an API (application program interface) typically invoke the
actual system calls on behalf of the application programmer.
1 Process control Create process, terminate process,end,allocate and free memory etc
2 File manipulation Create file, delete file, open file, close file, read, write.
3 Device manipulation request device, release device, read, write, reposition, get device attributes, set device
attributes etc.
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.
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.
Systems which have more than one processor are called multiprocessor system. These systems are
also known as parallel systems or tightly coupled systems.
- 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.
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.
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.
a. Process Management
b. Memory Management
c. Input/ Output Management
d. Storage/ File system management
What is a Kernel?
- 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.
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.
Following are the main disadvantages of Microkernels. Usually these disadvantages are situation
based.
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.
Explain Process.
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".
What is a daemon?
- 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.
- The name of daemons usually end with 'd' at the end in Unix.
- For e.g. httpd, named, lpd.
What do you mean by a zombie process?
- 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.
- 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.
- 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.
a. Sockets
b. Pipes
c. Shared memory
d. Signals
e. Message Queues
What is a semaphore?
- 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.
- 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.
- 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.
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
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.
- 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.
- 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.
What is a deadlock?
- 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.
- This memory consists of a set of high-speed registers. They work as temporary storage for
instructions and data.
Explain compaction.
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.
Page frames are the fixed size contiguous areas into which the main memory is divided by the
virtual memory.
- 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.
- 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.
- It occurs when a page that has not been brought into main memory is accessed.
Explain thrashing.
- 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.
Explain thread.
What is a compiler?
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.
What is a library?
It is a file which contains object code for subroutines and data to be used by the other program.
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.
Why is round robin algorithm considered better than first come first
served algorithm?
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
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.
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.
- 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.
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.
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:
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.
- 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.
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.
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.
- 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.
- 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.
- 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.
- 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.
How are data structures handled by NTFS and how does it recover from
a crash?
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.
What are the benefits and losses of placing the functionality in a device
controller rather than in placing it in the kernel?
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.
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.
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.
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?
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.
Explain SMP.
Explain the handheld systems. List the issues related to the handheld
system.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
What is EIDE?
- 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.
- 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.
What are the activities related to the Time Shared User Program
Management?
- 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.
When an input file is opened, what are the possible errors that may
occur?
- 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.
Explain PCB.
- 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.
- 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.
Explain IPC.
- 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.
- The kernel's primary purpose is to manage the computer's resources and allow other
programs to run and use the resources like the CPU, memory and the I/O devices in the
computer.
a. Memory management - The kernel has full access to the system's memory and
must allow processes to access safely this memory as they require it.
b. Device management - To perform useful functions, processes need access to the
peripherals connected to the computer, which are controlled by the kernel through
device drivers
c. System calls - To actually perform useful work, a process must be able to access the
services provided by the kernel.
Types of Kernel:
a. Monolithic kernels
Every part which is to be accessed by most programs which cannot be put in a library is
in the kernel space:
- Device drivers
- Scheduler
- Memory handling
- File systems
- Network stacks
b. Microkernels
Due to this, some critical parts like below run in user space: