Data structure in which all elements have similar name is considered as
Answer: A
Correct answer: array
A structure whose elements share one name and are distinguished by a subscript is an array.
Please log in or register to report this question.
Data structure in which all elements have similar name is considered as
Answer: A
Correct answer: array
A structure whose elements share one name and are distinguished by a subscript is an array.
Please log in or register to report this question.
Functions used in programs that are defined by programmers are called
Answer: D
Correct answer: user-defined function
A function written by the programmer rather than supplied with the language is user-defined. Built-in functions come with the language itself.
Please log in or register to report this question.
Contiguous memory allocation requires that
Answer: B
Correct answer: each process occupies a single unbroken block of memory
Contiguous allocation gives each process one unbroken region of physical memory, defined by a base address and a limit. Its virtue is simplicity: address translation needs only an addition and a bounds check, so a single relocation register and limit register suffice, and no page table is required. Its defect is external fragmentation. As processes come and go, free memory is left in scattered holes, and a request may fail even when the total free space is ample. Compaction can cure it by shuffling processes together, but at a heavy cost in copying and only where relocation is dynamic. The scheme comes in two forms. Fixed partitioning divides memory into a set number of regions, wasting whatever a process does not fill - internal fragmentation. Variable partitioning allocates exactly what is asked for, avoiding that but suffering external fragmentation instead. Paging was introduced to escape the dilemma: because any free frame serves for any page, contiguity is never required.
Please log in or register to report this question.
Main type of functions does not includes
Answer: C
Correct answer: top down procedures
Functions are either built into the language, defined by the user, or supplied by a library - the last two amount to the same category. Top down describes a way of designing a program, not a kind of function.
Please log in or register to report this question.
In Pascal and COMAL programming language, symbol ':=' is used for
Answer: D
Correct answer: assignments
In Pascal and COMAL := assigns a value to a variable, and the plain = is reserved for comparison. Keeping the two symbols apart removes an ambiguity that BASIC and C leave open.
Please log in or register to report this question.
In line "110 DIM num(10)" in BASIC language, 'Line 110' declares
Answer: A
Correct answer: one-dimensional array
DIM num(10) gives a single subscript, so the array is a list of ten elements - one-dimensional. Two subscripts would give a table.
Please log in or register to report this question.
Which of these is true of the FIFO page replacement algorithm?
Answer: C
Correct answer: It replaces the page that has been in memory the longest
FIFO replaces the page that has been resident longest, regardless of how recently or how often it has been used. It is implemented with a simple queue, so its cost is trivial. That simplicity is its only merit. Age of loading is a poor predictor of future need - a heavily used page loaded early is evicted while a rarely touched recent one survives - so its fault rate is markedly worse than LRU’s. It also suffers Belady’s anomaly: increasing the number of frames can increase the number of faults, which the third option denies. Algorithms free of the anomaly are the stack algorithms, of which LRU and the optimal algorithm are examples. The fourth option describes true LRU, which needs a timestamp or stack updated on every reference and is too expensive in practice. FIFO is rarely used unmodified. Adding a reference-bit check produces the second-chance or clock algorithm, which costs almost nothing more and approximates LRU well.
Please log in or register to report this question.
The percentage of times a page number is found in the TLB is known as :
Answer: B
Correct answer: hit ratio
The hit ratio is the proportion of references satisfied from the TLB. Effective access time is computed from it: a high hit ratio is what makes paging affordable.
Please log in or register to report this question.
Which one among the following is the address generated by CPU?
Answer: C
Correct answer: logical address
Every address a program generates is a logical, or virtual, address; the memory management unit translates it into the physical address that reaches memory.
Please log in or register to report this question.
In operating systems, internal fragmentation occurs when
Answer: B
Correct answer: allocated memory is slightly larger than the requested memory, leaving unused space inside a block
Internal fragmentation is space wasted inside an allocated block, because memory is handed out in fixed units and the request rarely fills the last one exactly. A process needing 5 KB with a 4 KB page size receives two pages and wastes 3 KB. External fragmentation, the second option, is the opposite: enough free memory exists in total but it is scattered in pieces too small to satisfy a request. The distinction determines the remedy. Paging eliminates external fragmentation entirely, since any free frame will do for any page, but introduces internal fragmentation of at most one page per process - on average half a page. Contiguous allocation and segmentation avoid internal fragmentation but suffer external. Compaction cures external fragmentation by shuffling processes together to make one large hole, at considerable cost in copying, and only works if relocation is dynamic.
Please log in or register to report this question.