GATE 2002
56 questions
MCQ 561-mark 56
Questions 46–50 of 56
Dynamic linking can cause security concerns because
Answer: (B)
With dynamic linking, the program finds and loads its libraries at run time by searching a list of directories (for example, LD_LIBRARY_PATH on Linux or the DLL search order on Windows). Since this search path is not fixed until run time, an attacker who can place a harmful library with the same name in a directory searched earlier can make the program load it. That code then runs with the program's rights.
(A) "Security is dynamic" has no technical meaning here.
(C) Linking in itself is not insecure; static linking fixes the library code at build time.
(D) Cryptographic routines can be dynamically linked like any other library.
Answer: (B)
(A) "Security is dynamic" has no technical meaning here.
(C) Linking in itself is not insecure; static linking fixes the library code at build time.
(D) Cryptographic routines can be dynamically linked like any other library.
Answer: (B)
Which combination of the following features will suffice to characterize an OS as a multi-programmed OS ?
(A)More than one program may be loaded into main memory at the same time for execution.
(B) If a program waits for certain events such as I/O, another program is immediately scheduled for execution.
(C) If the execution of a program terminates, another program is immediately scheduled for execution.
(A)More than one program may be loaded into main memory at the same time for execution.
(B) If a program waits for certain events such as I/O, another program is immediately scheduled for execution.
(C) If the execution of a program terminates, another program is immediately scheduled for execution.
Answer: (B)
Multiprogramming means that several programs are kept in memory at the same time, and the CPU is switched to another program whenever the current one cannot use it.
- (A) is needed: without more than one program in memory there is nothing to switch to.
- (B) is needed: this is what keeps the CPU busy while a program waits for I/O. With (A) alone, the CPU could sit idle during I/O.
- (C) is not needed: starting the next program after one ends also happens in a simple batch system that runs one program at a time. So it adds nothing that separates multiprogramming from other systems.
So (A) and (B) together are enough.
Answer: (B)
- (A) is needed: without more than one program in memory there is nothing to switch to.
- (B) is needed: this is what keeps the CPU busy while a program waits for I/O. With (A) alone, the CPU could sit idle during I/O.
- (C) is not needed: starting the next program after one ends also happens in a simple batch system that runs one program at a time. So it adds nothing that separates multiprogramming from other systems.
So (A) and (B) together are enough.
Answer: (B)
Which of the following scheduling algorithms is non-preemptive ?
Answer: (B)
- (A) Round Robin: a process is preempted when its time quantum ends.
- (B) First-In First-Out: a process is never preempted. It keeps the CPU until it finishes or blocks. This is the non-preemptive one.
- (C) Multilevel Queue Scheduling: a process is preempted when a process arrives in a higher-priority queue.
- (D) Multilevel Queue Scheduling with Feedback: a process is preempted when a higher-priority process arrives, or when its time slice at its level ends and it is moved to a lower-priority queue.
Answer: (B)
- (B) First-In First-Out: a process is never preempted. It keeps the CPU until it finishes or blocks. This is the non-preemptive one.
- (C) Multilevel Queue Scheduling: a process is preempted when a process arrives in a higher-priority queue.
- (D) Multilevel Queue Scheduling with Feedback: a process is preempted when a higher-priority process arrives, or when its time slice at its level ends and it is moved to a lower-priority queue.
Answer: (B)
The optimal page replacement algorithm will select the page that
Answer: (B)
The optimal page replacement algorithm always replaces the page that will not be used for the longest time in the future. This is why it is called optimal page replacement. So the answer is choice (B).
From the following instance of relation schema R(A,B,C), we can conclude that :
Answer: (C)
An instance can only disprove a functional dependency. It can never prove one for the whole relation, because later tuples may break it.
In the instance, tuples and have the same but different values (1 and 0). So does not hold. This is certain.
Now the options. holds in this instance (every value has one value), but we cannot conclude it for the whole relation from one instance.
(A) and (B) claim as a conclusion, so they are not safe. (D) says does not determine , which is false for this instance. Only (C) is certain.
Answer: (C)
In the instance, tuples and have the same but different values (1 and 0). So does not hold. This is certain.
Now the options. holds in this instance (every value has one value), but we cannot conclude it for the whole relation from one instance.
(A) and (B) claim as a conclusion, so they are not safe. (D) says does not determine , which is false for this instance. Only (C) is certain.
Answer: (C)