NEWS & UPDATES >> BCA BCSP064 Synopsis & Project Work Started for DEC 2017, IGNOU MCA MCSP060 Synopsis Work Started for DEC 2017, CONTACT 4 IGNOU Mini Project
Showing posts with label Operating System. Show all posts
Showing posts with label Operating System. Show all posts

OPERATING SYSTEM IMPORTANT QUESTION ANSWER Part 11

OPERATING SYSTEM IMPORTANT QUESTION ANSWER PART 11

for IGNOU BCA MCA Students


45) Why is partitioning and formatting a prerequisite to installing an operating system?


Partitioning and formatting creates 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 structure.


46) What is plumbing / piping?


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.


47) What is NOS?


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.


48) Differentiate internal commands from external commands.


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 filenamed 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 is limited to 8 characters when working under DOS environment.

OPERATING SYSTEM IMPORTANT QUESTION ANSWER Part 12

OPERATING SYSTEM IMPORTANT QUESTION ANSWER PART 12

for IGNOU BCA MCA Students


In a multiprogramming and time-sharing environment, several users share the system si-multaneously. This situation can result in various security problems.

a.   What are two such problems?

b.    Can we ensure the same degree of security in a time-shared machine as we have in a dedicated machine? Explain your answer.

Answer:

a.   Stealing or copying one's programs or data; using system resources (CPU, memory, disk space, peripherals) without proper accounting.

b.    Probably not, since any protection scheme devised by man can inevitably be broken by him, and the more complex the scheme, the more difficult it is to feel confident of its correct implementation.


           What is the main advantage of multiprogramming?

Answer: Multiprogramming makes efficient use of the CPU by overlapping the demands for the CPU and its I/O devices from various users. It attempts to increase CPU utilization by always having something for the CPU to execute.

1.6   What are the main differences between operating systems for mainframe computers and personal computers?

Answer: Personal computer operating systems are not concerned with fair use, or maxi-mal use, of computer facilities. Instead, they try to optimize the usefulness of the computer for an individual user, usually at the expense of efficiency. Consider how many CPU cy-cles are used by graphical user interfaces (GUIs). Mainframe operating systems need more complex scheduling and I/O algorithms to keep the various system components busy.


Define the essential properties of the following types of operating systems:

a.   Batch

b.    Interactive

c.   Time sharing

d.    Real time

e.    Distributed

Answer:

a.   Batch. Jobs with similar needs are batched together and run through the computer as a group by an operator or automatic job sequencer. Performance is increased by attempting to keep CPU and I/O devices busy at all times through buffering, off-line operation, spooling, and multiprogramming. Batch is good for executing large jobs that need little interaction; it can be submitted and picked up later.


b.    Interactive. Composed of many short transactions where the results of the next trans-action may be unpredictable. Response time needs to be short (seconds) since the user submits and waits for the result.

c.   Time sharing. Uses CPU scheduling and multiprogramming to provide economical interactive use of a system. The CPU switches rapidly from one user to another. In-stead of having a job defined by spooled card images, each program reads its next control card from the terminal, and output is normally printed immediately to the screen.

d.    Real time. Often used in a dedicated application. The system reads information from sensors and must respond within a fixed amount of time to ensure correct perfor-mance.

e.    Distributed. Distributes computation among several physical processors. The pro-cessors do not share memory or a clock. Instead, each processor has its own local memory. They communicate with each other through various communication lines, such as a high-speed bus or telephone line.


We have stressed the need for an operating system to make efficient use of the computing hardware. When is it appropriate for the operating system to forsake this principle and to " waste" resources? Why is such a system not really wasteful?

Answer: Single-user systems should maximize use of the system for the user. A GUI might " waste" CPU cycles but it optimizes the user's interaction with the system.

 Under what circumstances would a user be better off using a time-sharing system, rather than a personal computer or single-user workstation?

Answer: When there are few other users, the task is large, and the hardware is fast, time-sharing makes sense. The full power of the system can be brought to bear on the user's problem. The problem can be solved faster than on a personal computer. Another case is when there are lots of other users needing resources at the same time.

A personal computer is best when the job is small enough to be executed reasonably on it, and when performance is sufficient to execute the program to the user's satisfaction.

Describe the differences between symmetric and asymmetric multiprocessing. What are three advantages and one disadvantage of multiprocessor systems?

Answer: Symmetric multiprocessing treats all processors as equals, and I/O can be pro-cessed on any CPU. Asymmetric multiprocessing has one master CPU and the remain-der CPUs are slaves. The master distributes tasks among the slaves, and I/O is usually done by the master only. Multiprocessors can save money, by not duplicating power sup-plies, housings, and peripherals. They can execute programs more quickly, and can have increased reliability. They are also more complex in both hardware and software than uniprocessor systems.


Why are distributed systems desirable?

Answer: Distributed systems can provide resource sharing, computation speedup, in-creased reliability, and the ability to communicate with remote sites. 

OPERATING SYSTEM IMPORTANT QUESTION ANSWER Part 10

OPERATING SYSTEM IMPORTANT QUESTION ANSWER PART 10

for IGNOU BCA MCA Students


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.


32) What is root partition?


Root partition is where the operating system kernel is located. It also contains other potentially important system files that are mounted during boot time.


33) What are device drivers?


Device drivers provides 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.


34) What are the primary functions of VFS?


VFS, or Virtual File System, separates file system generic operations from their implementation by defining a clean VFS interface. It is also 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


36) What is the purpose of an I/O status information?


I/O status information provides info 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.


37) What is multitasking?


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".


38) What are some pros and cons of a command line interface?


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. 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.


39) What is caching?


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.


40) What is spooling?


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.


41) What is an Assembler?


An assembler acts as a translator for low level language. Assembly codes, written using mnemonic commands are translated by the Assembler into machine language.


42) What are interrupts?


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.


43) What is GUI?


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 just click on buttons to perform a process.


44) What is preemptive multitasking?


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.

OPERATING SYSTEM IMPORTANT QUESTION ANSWER Part 9

OPERATING SYSTEM IMPORTANT QUESTION ANSWER PART 9

for IGNOU BCA MCA Students


16) What necessary conditions 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.


17) Enumerate the different RAID levels.


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


18) Describe Banker's 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.


19) What factors determine whether a detection-algorithm must be utilized in a deadlock avoidance system?

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) Differentiate 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.




22) What are overlays?


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.


23) What is the basic function of paging?


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.


24) What is fragmentation?


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.


25) How does swapping result in better memory management?


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 processes to be run that can fit into memory at one time.


26) Give an example of a Process State.


- 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 done executing


27) What is a socket?


A socket provides a connection between two applications. Each endpoint of a communication is a socket.


28) What is Direct Access Method?


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.


29) When does trashing occur?


Trashing refers to an instance of high paging activity. This happens when it is spending more

time paging instead of executing.



Operating System Interview Questions Part 8

OPERATING SYSTEM IMPORTANT QUESTION ANSWER PART 8

for IGNOU BCA MCA Students


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.



2) What is demand paging?


Demand paging is a system wherein area of memory that are not currently being used are swapped to disk to make room for an application's need.


3) What are the advantages of a multiprocessor system?


With an increased number of processors, there is considerable increase in throughput. It can also save more money because they can share resources. Finally, overall reliability is increased as well.


4) What is kernel?


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.


5) What are real-time systems?


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.


6) What is virtual memory?


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.




7) Describe the objective of multiprogramming.


The main objective of multiprogramming is to have process running at all times. With this design, CPU utilization is said to be maximized.


8 ) What are time sharing systems?


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 actually interact with each program while it is running.


9) What is SMP?


SMP is short for Symmetric MultiProcessing, and 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.


10) How are server systems classified?


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.


11) What is asymmetric clustering?


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.


12) What is a thread?


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.


13) Give some benefits of multithreaded programming.


- there is an increased responsiveness to the user
- resource sharing within the process
- economy
- utilization of multiprocessing architecture


14) Briefly explain FCFS.


FCFS is short for First-come, first-served, and 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.




15) What is RR scheduling algorithm?


RR (round-robin) scheduling algorithm is primarily aimed for time-sharing systems. A circular queue is 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.


OPERATING SYSTEM IMPORTANT QUESTION ANSWER Part 7

OPERATING SYSTEM IMPORTANT QUESTION ANSWER PART 7

for IGNOU BCA MCA Students


56. What is a translation look-aside buffer? What is contained in each entry it contains?


A translation look-aside buffer (TLB) is a high speed cache for page table entries (that can either be virtual or part of the physical MMU) containing those that are recently used. It consists of two different entries, EntryLo and EntryHi. EntryHi contains a virtual address and sometimes ASID. EntryLo contains a corresponding physical address and a number of bits signifying whether the address is 'dirty', 'empty' or otherwise.


57. Some TLBs support address space identifiers (ASIDS), why?


Multitasking operating systems would better perform when the physical memory addresses loaded from the TLB are identifiable, as they are process specific. On a context switch, one needs to flush the TLB (invalidate all entries), which is an expensive operation, and on a system that is frequently context switching could provide so much of a performance issue that the TLB almost becomes useless.


58. Describe a two-level page table? How does it compare to a simple page table array?


A two level page table is a form of nested page table structure. It works in terms of bases and offsets, where portions can be contatenated to form the original physical addresses. Second level page tables representing unmapped pages are left unallocated, saving a bit of memory.


59. What is an inverted page table? How does it compare to a two-level page table?


It uses hashing to achieve being an array of page numbers indexed by physical frame number. It grows with size of RAM, rather than virtual address space, saving a vast amount of space.


60. What are temporal locality and spatial locality?


Temporal locality is the concept (most commonly referred to in the subject of caching), that if you access a piece of data at any one time, you are likely to want to access that same piece again soon. Spatial locality, conversely, is the concept that if you access a given piece of data, you are likely to want to access its neighbouring data.


61. What is the working set of a process?


The working set of a process is the allocated pages/segments at any one time window (delta), consisting of all pages accessed during that time. Includes current top of stack, areas of the heap, current code segment and shared libraries.


62. How does page size of a particular achitecture affect working set size?


Page size of a particular architecture affects working set size because the larger the pages, the more memory that can be wasted on irrelevant data, vastly increasing the working set size for no good reason. If they're smaller, the pages accurately reflect current memory usage.


63. What is thrashing? How might it be detected? How might one recover from it once


detected?


Thrashing is the phenomenon that occurs when the total sum of all working set sizes becomes greater than the available physical memory. Productivity drops since the number of instructions that is able to be sent to the CPU drops. It could be detected if a threshold value was put in place for each working set size, and recovery is as simple as suspending processes until total working set size decreases.


64Enumerate some pros and cons for increasing the page size.


Pros:
- Reduce total page table size, freeing some memory (hey, it uses up memory too!)
- Increase TLB coverage
- Increase swapping I/O throughput

Cons:
- Increase page fault latency (more page to search through)
- Increase internal fragmentation of pages


65. Describe two virtual memory page fetch policies. Which is less common in practice? Why?


Demand Paging relevant pages are loaded as page faults occur
Pre Paging try to load pages for processes before they are accessed Prepaging is less common in practise because it wastes bandwidth if it gets it wrong (and it will be wrong) and wastes even more if it kicks known good pages because it's trying to stuff it full of bad ones!


66. What operating system event might we observe and use as input to an algorithm that decides how many frames an application receives (i.e. an algorithm that determines the application's resident set size)?


This was not covered in the 2013 course.


67. Name and describe four page replacement algorithms. Critically compare them with each other.


OPTIMAL: Impossible to achieve, but perfect. Works on the Nostradamus-like basis that we can predict
which page won't be used for the longest time, and elect that that one should be replaced.
LEAST RECENTLY USED: Most commonly used, not quite optimal but better than the rest. We mark every page with a timestamp and the one which has been least recently accessed gets the flick. However we need to account for the extra overhead of adding/reading the time stamp, and who knows, the next page we want to access might just be the one we've sent back to the aether. It's quite a performer though.
CLOCK: Each page is marked with a 'usage' bit, and each is given a 'second chance' upon page replacement time. The one that becomes unmarked first disappears. Not quite as accurate as LRU, but has less of an overhead (one extra bit, as opposed to many for the timestamp).
FIFO: The simple and dodgiest option, we make the foolish assumption that the oldest page in the queue is the one that gets tossed. This is not quite always the case.


68. Describe buffering in the I/O subsystem of an operating system. Give reasons why it is required, and give a case where it is an advantage, and a case where it is a disadvantage.


Buffering is the action I/O devices take in order to efficiently transfer data to or from the operating system. Instead of directly transferring data bit-by-bit (literally) via system calls and registers, which is slow and requires context switch after context switch, we fill a buffer (or two, or three) with data, which is periodically transferred to or from main program control. We can also perform double or triple buffering where two-way efficiency is gained. It can be advantageous when we need to transfer large volumes of data, and at the same time may be disadvantageous due to overheads if the network is high-speed the time to copy between buffers might be comparable to the time spent actually transferring the data!