Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

Welcome to

CrackIT
Operating system
In operating system, each process has its own __________

a) address space and global variables


b) open files
c) pending alarms, signals and signal handlers
d) all of the mentioned

In Operating Systems, each process has its own address space


which contains code, data, stack and heap segments or sections.
Each process also has a list of files which is opened by the
process as well as all pending alarms, signals and various signal
handlers.
In Unix, Which system call creates the new process?

a) fork
b) create
c) new
d) none of the mentioned

Fork system call is used for creating a new process, which is called
child process, which runs concurrently with the process that makes
the fork() call (parent process).
Multi threading – A thread is a basic unit of CPU utilization. Multi threading is an execution
model that allows a single process to have multiple code segments (i.e., threads) running
concurrently within the “context” of that process. e.g. VLC media player, where one thread is
used for opening the VLC media player, one thread for playing a particular song and another
thread for adding new songs to the playlist. Benefits of Multi threading include increased
responsiveness
Read-Only Memory (ROM)

Stores crucial information essential to operate the system, like


the program essential to boot the computer.
● It is not volatile.
● Always retains its data.
● Used in embedded systems or where the programming
needs no change.
● Used in calculators and peripheral devices.
● ROM is further classified into four types- MROM, PROM,
EPROM, and EEPROM.
What is the ready state of a process?

a) when process is scheduled to run after some execution


b) when process is unable to run until some task has been completed
c) when process is using the CPU
d) none of the mentioned
A process stack does not contain __________
a) Function parameters
b) Local variables
c) Return addresses
d) PID of child process

Process stack contains Function parameters, Local variables


and Return address. It does not contain the PID of child
process.
Which system call can be used by a parent process to determine the
termination of child process?

a) wait
b) exit
c) fork
d) get
Caching – A cache is a region of fast memory that holds a copy of data.

Spooling and Device Reservation – A spool is a buffer that holds the output
of a device, such as a printer that cannot accept interleaved data streams.
Which of the following do not belong to queues for processes?
a) Job Queue
b) PCB queue
c) Device Queue
d) Ready Queue
In a time-sharing operating system, when the time slot given to a process is
completed, the process goes from the running state to the __________

a) Blocked state
b) Ready state
c) Suspended state
d) Terminated state

In a time-sharing operating system, when the time slot given to a process is


completed, the process goes from the running state to the Ready State. In a time-
sharing operating system unit time is defined for sharing CPU, it is called a time
quantum or time slice. If a process takes less than 1 time quantum, then the process
itself releases the CPU.
Q. When several processes access the same data concurrently and the outcome
of the execution depends on the particular order in which the access takes place
is called ________

a) dynamic condition
b) race condition
c) essential condition
d) critical condition

A race condition occurs when two threads access a shared variable at the same
time. The first thread reads the variable, and the second thread reads the same
value from the variable.
Q. If a process is executing in its critical section, then no other processes
can be executing in their critical section. What is this condition called?

a) mutual exclusion
b) critical exclusion
c) synchronous exclusion
d) asynchronous exclusion

If a process is executing in its critical section, then no other processes


can be executed in their critical section. This condition is called Mutual
Exclusion. Critical section of the process is shared between multiple
processes. If this section is executed by more than one or all of them
concurrently then the outcome
When high priority task is indirectly preempted by medium priority task effectively
inverting the relative priority of the two tasks, the scenario is called __________

a) priority inversion
b) priority removal
c) priority exchange
d) priority modification

When a high priority task is indirectly preempted by a medium priority task effectively
inverting the relative priority of the two tasks, the scenario is called priority inversion.
What is privileged and non-privileged instructions?

The Instructions that can run only in Kernel Mode are called
Privileged Instructions . Privileged Instructions possess the following
characteristics : (i) If any attempt is made to execute a Privileged
Instruction in User Mode, then it will not be executed and treated as
an illegal instruction. The Hardware traps it to the Operating System.
Translation Look-aside Buffer (TLB) need not necessarily be saved on a context switch between processes.

A special, small, fast-lookup hardware cache is called Translation Look-aside Buffer.

TLB used to reduce memory access time.


Inter Process Communication (IPC)

Example of Shared Memory Method


Producer-Consumer problem :-

There are two processes: Producer and Consumer. The producer produces some items
and the Consumer consumes that item. The two processes share a common space or
memory location known as a buffer where the item produced by the Producer is stored
and from which the Consumer consumes the item if needed.
What is stub?

a) transmits the message to the server where the server side stub receives the message and
invokes procedure on the server side
b) packs the parameters into a form transmittable over the network
c) locates the port on the server
d) all of the mentioned

A stub is a small program routine that substitutes for a longer program, possibly to be
loaded later or that is located remotely.
What is the full form of RMI?

a) Remote Memory Installation


b) Remote Memory Invocation
c) Remote Method Installation
d) Remote Method Invocation

It allows a thread to invoke a method on a remote object


A remote procedure call is an
interprocess communication
technique that is used for client-
server based applications. It is
also known as a subroutine call
or a function call.

You might also like