QB Viva
QB Viva
31. Which page replacement algorithm will have less page fault rate?
Optimal Page Replacement
32. What is thrashing?
It is situation that CPU spends more time on paging than executing.
40. 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.
42. 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).
46. Under what circumstances do page faults occur? Describe the actions taken by the operating
system when a page fault occurs?
A page fault occurs when an access to a page that has not been brought into main
memory takes place. The operating system verifies the memory access, aborting the
program if it is invalid. If it is valid, a free frame is located and I/O is requested to read
the needed page into the free frame. Upon completion of I/O, the process table and page
table are updated and the instruction is restarted
50. What are the three different records used in object program?
The header record, text record and the end record are the three different records used in
object program.
The header record contains the program name, starting address and
length of the program.
Text record contains the translated instructions and data of the program.
End record marks the end of the object program and specifies the address in the program
where execution is to begin.
51. What is the need of OPTAB (operation code table) in assembler?
The operation code table contains the mnemonic operation code and its
machine language equivalent. Some assemblers it may also contain information about
instruction format and length. OPTAB is usually organized as a hash table, with mnemonic
operation code as the key.
52. . Write the steps required to translate the source program to object program.
• Convert mnemonic operation codes to their machine language
equivalents.
• Convert symbolic operands to their equivalent machine addresses
• Build the machine instruction in the proper format.
• Convert the data constants specified in the source program into their internal machine
representation
• Write the object program and assembly listing.
53. What are the two different types of jump statements used in MASM assembler?
• Near jump
A near jump is a jump to a target in the same segment and it is
assembled by using a current
code segment CS.
• Far jump
A far jump is a jump to a target in a different code segment and it is
assembled by using different segment registers .
54. What is meant by external references?
Assembler program can be divided into many sections known as control
sections and each control section can be loaded and relocated independently of the others. If
the instruction in one control section need to refer instruction or data in another control
section.the assembler is unable to process these references in normal way. Such
references between control are called external references.
55. What are the basic functions of loaders?
• Loading – brings the object program into memory for execution
• Relocation – modifies the object program so that it can be loaded at an address different
from the location originally specified
• Linking – combines two or more separate object programs and also
supplies the information needed to reference them.
56. . Define macro processor.
Macro processor is system software that replaces each macro instruction with the
corresponding group of source language statements. This is also called as expanding of
macros.
57. What do macro expansion statements mean?
These statements give the name of the macro instruction being invoked
and the arguments to be used in expanding the macros. These statements are also known as
macro call.
58. What are the directives used in macro definition?
MACRO - it identifies the beginning of the macro definition
MEND - it marks the end of the macro definition
59. What are the data structures used in macro processor?
DEFTAB – the macro definitions are stored in a definition table i.e. it contains a macro
prototype and the statements that make up the macro body.
NAMTAB – it is used to store the macro names and it contains two
pointers for each macro instruction which indicate the starting and end location of macro
definition in DEFTAB. it also serves as an index to DEFTAB
ARGTAB – it is used to store the arguments during the expansion of macro invocations.
60. Define conditional macro expansion.
If the macro is expanded depends upon some conditions in macro
definition (depending on the arguments supplied in the macro expansion) then it is called as
conditional macro expansion.
61. What is the use of macro time variable?
Macro time variable can be used to store working values during the macro expansion. Any
symbol that begins with the character & and then is not a macro instruction parameter is
assumed to be a macro time variable.
62. What are the statements used for conditional macro expansion?
IF-ELSE-ENDIF statement
WHILE-ENDW statement
63. What is meant by positional parameters?
If the parameters and arguments were associated with each other
according to their positions in the macro prototype and the macro invocation statement, then
these parameters in macro definitions are called as positional parameters.