Operating System
Operating System
4. 11.
Thread is a What is meant by ready state of a process?
A thread is the smallest unit of processing that can Ready state of the process means the process has
be performed in an OS. It is a light weight process. all necessary resources which are required for
execution of that process when CPU is allocated.
5.
Threads is not shared among which of the 12.
following? What of the following defines Thread
Since each thread can have its own execution cancellation?
sequence/code, it must have its own stack on Thread cancellation means the process terminating
which it might push/pop its program counter a thread process before its execution.
contents. So threads of same process do not share
stack and program counter.
6. 13.
To access the services of operating system the When a thread terminates some target thread
interface is provided by the? immediately, it is known as?
To access the services of operating system the When a thread terminates some target thread
interface is provided by the System Calls. Open, immediately, it is know as Asynchronous
Close, Read, Write are some of most prominently termination.
used system calls.
14.
7. When are the register context and stack of thread
UNIX is written in which language? deallocated?
UNIX is written in C language. It was developed in Register context and stack of thread are
1970s at AT & T Bell laboratories. deallocated when the thread terminates.
Advance your career with Mock Assessments
15.
Page 1 of 4
The size of virtual memory is based on which of Which of the following is not an operating
the following? system?
The size of virtual memory is based on Address Bus. Oracle is not an operating system. It is a relational
data base management system, also known as
16. Oracle Database.
Which of the following are CPU scheduling
algorithms? 24.
All of the above are CPU scheduling algorithms Which of the following is the only state transition
that is initiated by the user process itself?
17. The only state transition that is initiated by the user
Which of the following are two types of atomic process itself is block. Whenever a user process
operations performed by semaphores? initiates an I/O request it goes into block state
Semaphore mainly helps in performing wait and unless and until the I/O request is not completed.
signal operations.
25.
18. Which of the following schedules threads?
Which of the following commands in UNIX is used Thread scheduling is done by OS.
to send a signal?
kill is used to send a signal in UNIX. 26.
Which of the type of OS reads and reacts in terms
19. of actual time?
Which of the following is a single user operating RTOS
system?
Ms-DOS is a single user operating system. 27.
Why is CPU scheduling done?
20. CPU scheduling is done to increase the CPU
Which of the following is also known as the base utilisation, so that many process can complete their
register? execution without having to wait for too long.
The Relocation register is also known as the base
register. 28.
Identify the system calls that on termination does
21. not return control to the calling point.
Which of the following is an example of a real- exec is the system calls that on termination does
time operating system? not return control to the calling point.
Process Control is not RTOS since processing time
requirements (including any OS delay) are 29.
measured in tenths of seconds or shorter A process which is copied from main memory to
increments of time. secondary memory on the basis of
requirement is known as -
22. The process which is copied from main memory to
Which of the following is known as secondary memory on the basis of requirement is
uninterruptible unit? known as demand paging.
Atomic is known as uninterruptible unit. That is,
whenever a process starts executes, it doesn’t 30.
terminate or context switch until its complete A systematic procedure for moving the CPU to
execution. new process is known as-
Multiple processes are run in parallel in CPU.
23. Sometimes when a high priority process comes up,
Page 2 of 4
the kernel transfers control of the CPU to that For which of the following is the jacketing
process. technique used?
to construct a new thread
31. to communicate between threads
Among the following CPU scheduling algorithms, convert a blocking system call into non blocking
which of these allocated the CPU first to the system call
process that requests the CPU first? None
FCFS allocates resources to the process that Jacketing technique used to convert a blocking
requests first. system call into non blocking system call.
32. 38.
Among the following, which is an example of a For which of the following purposes in Banker’s
spooled device? algorithm is used?
Banker's Algorithm is mainly used to prevent
A line printer that prints the output of a number of deadlock.
jobs is an example of a spooled device.
39.
33. How many minimum variables is/are required to
Consider the following program: share between processes, so as to solve the
main() critical section problem?
{ It is a program element that wants to access the
if(fork()>0) collective variables and needs to be sorted out as a
sleep(100); nuclear operation. It implies the one process has to
} perform its essential section in a group of
A zombie process or defunct process is a process communicating systems at that particular time.
that has completed execution (via the exit system
call) but still has an entry in the process table: it is a 40.
process in the "Terminated state". Identify the call which never returns an error?
The call getpid never returns an error.
34.
Device driver required in? 41.
A disk driver is a device driver that allows a specific A binary semaphore has a value of
disk drive to communicate with the remainder of A binary semaphore is initialised with value 1.
the computer. A good example of this driver is a
floppy disk driver. 42.
Identify the two steps of a process execution.
35. The two steps of a process execution are CPU and
FIFO scheduling is a type of: I/O burst.
FIFO is a type of non-preemptive scheduling.
43.
36. Is mutual exclusion required for shareable
For which of the following is resource sharing resources?
used? Mutual exclusion is not required for shareable
Resource sharing is used for sharing memory and resources.
resources and well as compressing the address 44.
space. Main memory of a computer system is?
Main memory of a computer system is volatile.
37. 45.
Page 3 of 4
Many to One model is at an advantage in which of fork() and parent process also going to execute 2nd
the following conditions? fork.
Only one thread can access the Kernel at a time, so So now 2 more processes will be created. So in the
multiple threads are unable to run in parallel on system now there are 4 processes and they are
multiprocessors. So, if a program does not need to going to execute printf statements. so total
be multithreading many to one model is at number, of code will be 4
advantage. Therefore, total number of times code will be
printed = 4
46.
Operating systems 53.
OS acts as an interface between the user. The release and request of resources are a type of
which of the following?
47. The release and request of resources are a type
OS classifies the threads as- system calls.
OS classifies the threads into two types - User level
thread: Implemented by user and Kernel level
thread, implemented by the kernel.
48.
Select the correct definition of spooling.
Spooling holds a single copy of data.
49.
Semaphore is a __ and it helps to solve the
problem of ___?
Semaphore is an integer variable and it helps to
solve problems of critical sections.
50.
Signals of some given type are
Signals of the same type are sent together.
51.
The most optimal CPU scheduling algorithm is
________
SJF is optimal, in that for a given set of processes
and their CPU bursts/execution times it gives the
least average waiting time for each process.
52.
The output of the following C program is?
int main(){
fork();
fork();
printf("code ");
}
First fork() is going to create a child process,which
is going to execute the next instruction i.e 2nd
Page 4 of 4