Вы находитесь на странице: 1из 13

What's OPERATING SYSTEM?

An Operating System, or OS, is a software program that enables the computer hardware to communicate and operate with the computer software. Without a computer Operating System, a computer would be useless. OPERATING SYSTEM TYPES As computers have progressed and developed so have the types of operating systems. Below is a basic list of the different types of operating systems and a few examples of Operating Systems that fall into each of the categories. Many computer Operating Systems will fall into more than one of the below categories. GUI - Short for Graphical User Interface, a GUI Operating System contains graphics and icons and is commonly navigated by using a computer mouse. See our GUI dictionary definition for a complete definition. Below are some examples of GUI Operating Systems. System 7.x Windows 98 Windows CE Multi-user - A multi-user Operating System allows for multiple users to use the same computer at the same time and/or different times. See our multi-user dictionary definition for a complete definition for a complete definition. Below are some examples of multi-user Operating Systems. Linux Unix Windows 2000 Windows XP Mac OS X Multiprocessing - An Operating System capable of supporting and utilizing more than one computer processor. Below are some examples of multiprocessing Operating Systems. Linux Unix Windows 2000 Windows XP Mac OS X Multitasking - An Operating system that is capable of allowing multiple software processes to run at the same time. Below are some examples of multitasking Operating Systems Unix Windows 2000 Windows XP Mac OS X Multithreading - Operating systems that allow different parts of a software program to run concurrently. Operating systems that would fall into this category are Linux Unix Windows 2000 Windows XP Mac OS X What are the basic functions of an operating system? - Operating system controls and coordinates the use of the hardware among the various applications programs for various uses. Operating system acts as resource allocator and manager.

Since there are many possibly conflicting requests for resources the operating system must decide which requests are allocated resources to operating the computer system efficiently and fairly. Also operating system is control program which controls the user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices. Why paging is used? -Paging is solution to external fragmentation problem which is to permit the logical address space of a process to be noncontiguous, thus allowing a process to be allocating physical memory wherever the latter is available. While running DOS on a PC, which command would be used to duplicate the entire diskette? diskcopy What resources are used when a thread created? How do they differ from those when a process is created? When a thread is created the threads does not require any new resources to execute the thread shares the resources like memory of the process to which they belong to. The benefit of code sharing is that it allows an application to have several different threads of activity all within the same address space. Whereas if a new process creation is very heavyweight because it always requires new address space to be created and even if they share the memory then the inter process communication is expensive when compared to the communication between the threads. What is virtual memory? Virtual memory is hardware technique where the system appears to have more memory that it actually does. This is done by time-sharing, the physical memory and storage parts of the memory one disk when they are not actively being used. What is Throughput, Turnaround time, waiting time and Response time? Throughput number of processes that complete their execution per time unit. Turnaround time amount of time to execute a particular process. Waiting time amount of time a process has been waiting in the ready queue. Response time amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment). What is the state of the processor, when a process is waiting for some event to occur? Waiting state What is the important aspect of a real-time system or Mission Critical Systems? A real time operating system has well defined fixed time constraints. Process must be done within the defined constraints or the system will fail. An example is the operating system for a flight control computer or an advanced jet airplane. Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems. Real-Time systems may be either hard or soft realtime. Hard real-time: Secondary storage limited or absent, data stored in short term memory, or read-only memory (ROM), Conflicts with time-sharing systems, not supported by generalpurpose operating systems. Soft real-time: Limited utility in industrial control of robotics, Useful in applications (multimedia, virtual reality) requiring advanced operating-system features. What is the difference between Hard and Soft real-time systems? - A hard real-time system guarantees that critical tasks complete on time. This goal requires thatall delays in the system be bounded from the retrieval of the stored data to the time that it takesthe operating system to finish any request made of it. A soft real time system where a criticalreal-time task gets priority over other tasks and retains that priority until it completes. As in hardreal time systems kernel delays need to be bounded 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? - 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. What is multi tasking, multi programming, multi threading? 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 timesharing 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. A busy web server may have several of clients concurrently accessing it. If the web server ran as a traditional single-threaded process, it would be able to service only one client at a time. The amount of time that a client might have to wait for its request to be serviced could be enormous. So it is efficient to have one process that contains multiple threads to serve the same purpose. This approach would multithread the web-server process, the server would create a separate thread that would listen for client requests when a request was made rather than creating another process it would create another thread to service the request. To get the advantages like responsiveness, Resource sharing economy and utilization of multiprocessor architectures multithreading concept can be used. What is hard disk and what is its purpose? Hard disk is the secondary storage device, which holds the data in bulk, and it holds the data onthe magnetic medium of the disk. Hard disks have a hard platter that holds the magnetic medium,the magnetic medium can be easily erased and rewritten, and a typical desktop machine will have What is a Real-Time System? - A real time process is a process that must respond to the events within a certain time period. A real time operating system is an operating system that can run real time processes successfully 1.What are the basic functions of an operating system? - Operating system controls and coordinates the use of the hardware among the various applications programs for various uses. Operating system acts as resource allocator and manager. Since there are many possibly conflicting requests for resources the operating system must decide which requests are allocated resources to operating the computer system efficiently and fairly. Also operating system is control program which controls the user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices. 2.Why paging is used? - Paging is solution to external fragmentation problem which is to permit the logical address space of a process to be noncontiguous, thus allowing a process to be allocating physical memory wherever the latter is available. 3.While running DOS on a PC, which command would be used to duplicate the entire diskette?dis kcopy 4.What resources are used when a thread created? How do they differ from those when a process is created? - When a thread is created the threads does not require any new resources to execute the thread shares the resources like memory of the process to which they belong to. The benefit of code sharing is that it allows an application to have

several different threads of activity all within the same address space. Whereas if a new process creation is very heavyweight because it always requires new address space to be created and even if they share the memory then the inter process communication is expensive when compared to the communication between the threads. 5.What is virtual memory? - Virtual memory is hardware technique where the system appears to have more memory that it actually does. This is done by time-sharing, thephysical memory and storage parts of the memory one disk when they are not activelybeing used. 6.What is Throughput, Turnaround time, waiting time and Response time?Throughput number of processes that complete their execution per time unit. Turnaround time amount of time to execute a particular process. Waiting time amount of time a process has been waiting in the ready queue. Response time amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment). 7.What is the state of the processor, when a process is waiting for some event to occur? - Waiting state 8.What is the important aspect of a real-time system or Mission Critical Systems?- A real time operating system has well defined fixed time constraints. Process must be donewithin the defined constraints or the system will fail. An example is the operating systemfor a flight control computer or an advanced jet airplane. Often used as a control devicein a dedicated application such as controlling scientific experiments, medical imagingsystems, industrial control systems, and some display systems. Real-Time systems maybe either hard or soft realtime. Hard real-time: Secondary storage limited or absent,data stored in short term memory, or read-only memory (ROM), Conflicts with time-sharing systems, not supported by generalpurpose operating systems. Soft real-time: Limited utility in industrial control of robotics, Useful in applications (multimedia, virtual reality) requiring advanced operating-system features. 9.What is the difference between Hard and Soft real-time systems? - A hard real-time system guarantees that critical tasks complete on time. This goal requires that all delaysin the system be bounded from the retrieval of the stored data to the time that it takes theoperating system to finish any request made of it. A soft real time system where a criticalreal-time task gets priority over other tasks and retains that priority until it completes. Asin hard real time systems kernel delays need to be bounded 10.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? - 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. 11.What is multi tasking, multi programming, multi threading?- 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 timesharing 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. A busy web server may have several of clients concurrently accessing it. If the web server ran as a traditional single-threaded process, it would be able to service only one client at a time. The amount of time that a client might have to wait for its request to be serviced could be enormous. So it is efficient to have one process that contains multiple threads to serve the same purpose. This approach would multithread the web-server process, the server would create a separate thread that would listen for client requests when a request was made rather than creating another process it would create another thread to service the request. To get the advantages like responsiveness, Resource sharing economy and utilization of multiprocessor architectures multithreading concept can be used. 12.What is hard disk and what is its purpose? - Hard disk is the secondary storage device, which holds the data in bulk, and it holds the data on the magnetic medium of the disk.Hard disks have a hard platter that holds the magnetic medium, the magnetic medium can be easily erased and rewritten, and a typical desktop machine will have a hard disk with a capacity of between 10 and 40 gigabytes. Data is stored onto the disk in the form of files. 13.What is fragmentation? Different types of fragmentation? - Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request. External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous. Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used 14.What is DRAM? In which form does it store data? - DRAM is not the best, but its cheap, does the job, and is available almost everywhere you look. DRAM data resides in a cell made of a capacitor and a transistor. The capacitor tends to lose data unless its recharged every couple of milliseconds, and this recharging tends to slow down the performance of DRAM compared to speedier RAM types. 15.What is Dispatcher? - 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. 16.What is CPU Scheduler? - 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 non-preemptive. All other scheduling is preemptive. 17.What is Context Switch? - 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). 18.What is cache memory? - Cache memory is random access memory (RAM) that a computer microprocessor can access more quickly than it can access regular RAM. As the microprocessor processes data, it looks first in the cache memory and if it finds the

data there (from a previous reading of data), it does not have to do the more timeconsuming reading of data from larger memory. 19.What is a Safe State and what is its use in deadlock avoidance? - 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. Deadlock Avoidance: ensure that a system will never enter an unsafe state. 20.What is a Real-Time System? - A real time process is a process that must respond to the events within a certain time period. A real time operating system is an operating system that can run real time processes successfully DATA STRUCTURE Define Data Structures Data Structures is defined as the way of organizing all data items that consider not only the elements stored but also stores the relationship between the elements. 2. Define primary data structures Primary data structures are the basic data structures that directly operate upon themachine instructions. All the basic constants (integers, floating-point numbers, characterconstants, string constants) and pointers are considered as primary data structures. 3. Define static data structures A data structure formed when the number of data items are known in advance is referred as static data structure or fixed size data structure. 4. List some of the static data structures in C Some of the static data structures in C are arrays, pointers, structures etc. 5. Define dynamic data structures A data structure formed when the number of data items are not known in advance is known as dynamic data structure or variable size data structure. 6. List some of the dynamic data structures in C Some of the dynamic data structures in C are linked lists, stacks, queues, trees etc. 7. Define linear data structures Linear data structures are data structures having a linear relationship between its adjacent elements. Eg) Linked lists 8. Define non-linear data structures Non-linear data structures are data structures that dont have a linear relationshipbetween its adjacent elements but have a hierarchical relationship between the elements.Eg) Trees and Graphs 9. Define Linked List Linked list consists of a series of structures, which are not necessarily adjacent inmemory. Each structure contains the element and a pointer to a structure containing itssuccessor. We call this the Pointer. The last cells pointer points to NULL. 10. State the different types of linked lists The different types of linked list include singly linked list, doubly linked list and circular linked list. 11. List the basic operations carried out in a linked list The basic operations carried out in a linked list include:

Creation of a list Insertion of a node Deletion of a node Modification of a node Traversal of the list 12. List out the advantages of using a linked list It is not necessary to specify the number of elements in a linked list during its declaration Linked list can grow and shrink in size depending upon the insertion and deletion that occurs in the list Insertions and deletions at any place in a list can be handled easily and efficiently A linked list does not waste any memory space 13. List out the disadvantages of using a linked list Searching a particular element in a list is difficult and time consuming A linked list will use more storage space than an array to store the same number of elements 14. List out the applications of a linked list Some of the important applications of linked lists are manipulation of polynomials, sparse matrices, stacks and queues. 15. State the difference between arrays and linked lists Arrays Linked Lists Size of an array is fixed Size of a list is variable It is necessary to specify the number of elements during declaration It is not necessary to specify thenumber of elements duringdeclaration 2

Insertions and deletions are somewhat difficult Insertions and deletions are carried out easily It occupies less memory than alinked list for the same number ofelements It occupies more memory

16. Define a stack Stack is an ordered collection of elements in which insertions and deletions are restricted to one end. The end from which elements are added and/or removed is referred to as top of the stack. Stacks are also referred as piles, push-down lists and last-in-firstout (LIFO) lists. 17. List out the basic operations that can be performed on a stack The basic operations that can be performed on a stack are Push operation Pop operation Peek operation Empty check Fully occupied check 18. State the different ways of representing expressions The different ways of representing expressions are Infix Notation Prefix Notation Postfix Notation 19. State the advantages of using infix notations It is the mathematical way of representing the expression It is easier to see visually which operation is done from first to last 20. State the advantages of using postfix notations Need not worry about the rules of precedence Need not worry about the rules for right to left associativity Need not need parenthesis to override the above rules 21. State the rules to be followed during infix to postfix conversions Fully parenthesize the expression starting from left to right. During parenthesizing, the operators having higher precedence are first parenthesized Move the operators one by one to their right, such that each operator replaces their corresponding right parenthesis The part of the expression, which has been converted into postfix is to be treated as single operand Once the expression is converted into postfix form, remove all parenthesis 22. State the rules to be followed during infix to prefix conversions

Fully parenthesize the expression starting from left to right. During parenthesizing, the operators having higher precedence are first parenthesized Move the operators one by one to their left, such that each operator replaces their corresponding leftparenthesis The part of the expression, which has been converted into prefix is to be treated as single operand Once the expression is converted into prefix form, remove all parenthesis 23. State the difference between stacks and linked lists The difference between stacks and linked lists is that insertions and deletions may occur anywhere in a linked list, but only at the top of the stack 24. Mention the advantages of representing stacks using linked lists than arrays It is not necessary to specify the number of elements to be stored in a stackduring its declaration, since memory is allocated dynamically at run timewhen an element is added to the stack Insertions and deletions can be handled easily and efficiently Linked list representation of stacks can grow and shrink in size withoutwasting memory space, depending upon the insertion and deletion that occursin the list Multiple stacks can be represented efficiently using a chain for each stack 25. Define a queue Queue is an ordered collection of elements in which insertions are restricted toone end called the rear end and deletions are restricted to other end called the front end.Queues are also referred as First-In-First-Out (FIFO) Lists. 26. Define a priority queue Priority queue is a collection of elements, each containing a key referred as thepriority for that element. Elements can be inserted in any order (i.e., of alternatingpriority), but are arranged in order of their priority value in the queue. The elements aredeleted from the queue in the order of their priority (i.e., the elements with the highestpriority is deleted first). The elements with the same priority are given equal importanceand processed accordingly. 27. State the difference between queues and linked lists The difference between queues and linked lists is that insertions and deletionsmay occur anywhere in the linked list, but in queues insertions can be made only in therear end and deletions can be made only in the front end. 28. Define a Deque Deque (Double-Ended Queue) is another form of a queue in which insertions anddeletions are made at both the front and rear ends of the queue. There are two variationsof a deque, namely, input restricted deque and output restricted deque. The input

restricted deque allows insertion at one end (it can be either front or rear) only. The output restricted deque allows deletion at one end (it can be either front or rear) only. 29. Why you need a data structure? A data structure helps you to understand the relationship of one data element withthe other and organize it within the memory. Sometimes the organization might be simpleand can be very clearly visioned. Eg) List of names of months in a year Linear DataStructure, List of historical places in the world- Non-Linear Data Structure. A datastructure helps you to analyze the data, store it and organize it in a logical andmathematical manner. 30. Difference between Abstract Data Type, Data Type and Data Structure An Abstract data type is the specification of the data type which specifies the logical and mathematical model of the data type. A data type is the implementation of an abstract data type. Data structure refers to the collection of computer variables that are connected in some specific manner. i.e) Data type has its root in the abstract data type and a data structure comprises a set of computer variables of same or different data types 31. Define data type and what are the types of data type? Data type refers to the kinds of data that variables may hold in the programming language. Eg) int, float, char, double C The following are the types of data type: Built in data type- int, float, char, double which are defined by programming language itself User defined data type- Using the set of built in data types user can define their own data type Eg) typedef struct student {int roll; char name; }S; S s 1; Where S is a tag for user defined data type which defines the structure student and s1 is a variable of data type S. 32. Define an Abstract Data Type (ADT) An abstract data type is a set of operations. ADTs are mathematical abstractions;nowhere in an ADTs definition is there any mention of how the set of operations isimplemented. Objects such as lists, sets and graphs, along with their operations can beviewed as abstract data types.

33. What are the advantages of modularity? It is much easier to debug small routines than large routines It is easier for several people to work on a modular program simultaneously A well-written modular program places certain dependencies in only one routine, making changes easier 34. State the difference between primitive and non-primitive data types Primitive data types are the fundamental data types. Eg) int, float, double, char Non-primitive data types are user defined data types. Eg) Structure, Union and enumerated data types 35. State the difference between persistent and ephemeral data structure Persistent data structures are the data structures which retain their previous state and modifications can be done by performing certain operations on it. Eg) Stack Ephemeral data structures are the data structures which cannot retain its previous state. Eg) Queues 36. What are the objectives of studying data structures? To identify and create useful mathematical entities and operations todetermine what classes of problems can be solved using these entities andoperations To determine the representation of these abstract entities and to implement the abstract operations on these concrete representation 37. What are the types of queues? Linear Queues The queue has two ends, the front end and the rear end. Therear end is where we insert elements and front end is where we deleteelements. We can traverse in a linear queue in only one direction ie) fromfront to rear. Circular Queues Another form of linear queue in which the last position isconnected to the first position of the list. The circular queue is similar to linearqueue has two ends, the front end and the rear end. The rear end is where weinsert elements and front end is where we delete elements. We can traverse ina circular queue in only one direction ie) from front to rear. Double-Ended-Queue Another form of queue in which insertions and deletions are made at both the front and rear ends of the queue. 38. List the applications of stacks Towers of Hanoi

Reversing a string Balanced parenthesis Recursion using stack Evaluation of arithmetic expressions 39. List the applications of queues Jobs submitted to printer Real life line Calls to large companies Access to limited resources in Universities Accessing files from file server 40. Why we need cursor implementation of linked lists? Many languages such as BASIC and FORTRAN do not support pointers. If linkedlists are required and pointers are not available, then an alternative implementation mustbe used known as cursor implementation. PART B 1. What is a Stack? Explain with example? Definition of Stack Operations of Stack: PUSH and POP Example 2. Write the algorithm for converting infix expression to postfix expression? Definition of Expression Types of expression Algorithm for infix to postfix expression

Example 3. What is a Queue? Explain its operation with example? Definition of Queue Operations of Queue: insert and remove Example 4. Explain the applications of stack? Evaluating arithmetic expression Balancing the symbols Function calls 5. Write an algorithm for inserting and deleting an element from doubly linked list? Explain linear linked implementation of Stack and Queue? Introduction to Doubly linked list Operations: insertion and deletion with algorithm Linked list implementation of Stack Linked list implementation of Queue

Вам также может понравиться