5 Operating System - 8096097
5 Operating System - 8096097
5 Operating System - 8096097
OPERATING SYSTEM
Computer runs with Hardware and Software
Software is classified into system software and Application software
System software is sub divided into operating system. Compiler, linker etc.
Operating System: An operating system is a program that manages the computer hardware.
It also provides a basis for application programs and acts as an interface between the user
and the computer hardware.
Various Operating System :
Single User Operating System
Eg : MS DOS
Single User Multitask Operating System (or)
Batch Processing System
Eg : WINDOWS 9X
Multi User Operating System (Time Sharing Systems and Interactive Systems)
Eg : UNIX
Network Operating System (or) Distributed Systems
Eg : WIN NT, NOVELL NETWARE
Multi Processor OS (or) Real Time Systems
Eg : Computers which are used in Military, Satellites, Airforce, Whether forecasting etc
Cloud Computing
Architecture specifies overall design how the data flow between the task
In single user OS we use Monolythic architecture
In Multiuser OS we use layered architecture
DISTRIBUTED SYSTEMS :
A distributed system is a collection of physically separate, possibly heterogeneous
computer systems that are networked to provide the users with access to the various
resources that the system maintains.
The protocols that create a distributed system can greatly affect that systems utility and
popularity
BATCH OPERATING SYSTEM
The Monitor or Batch Operating System is simply a computer program. It relies on the
ability of the processor to fetch instructions from various portions of main memory to
alternately seize and relinguish control.
Batch Processing is execution of a series of programs (“jobs”) on a computer without
manual intervention.
Jobs are set up so they can be run to completion without manual intervention, so all
input data is opresented throguh scripts or command line parameters.
This is contrast to “online” or interactive programs which prompt the user for such
input.
A program takes a set of data filter as input, process the data, and produces a set of
output data files.
SAIMEDHA 1
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
This operating environment termed as “batch processing” because the input data are
collected into batches of files and are processed in batches by the program.
Time sharing Operating System (TSOS) :
In time sharing OS, processor time is shared among multiple users.
Multiple users access the system through terminals, with the OS interleaving the
execution of each user program in a short burst or quantum of computation.
TSOS was the first operating system that supported virtual addressing of the main
storage.
Time sharing is sharing a computing resource among many users by means of
multiprogramming and multitasking
It is a mode of operation that allows multiple independent users to share the resources
of a multiuser computer system, including the CPU, bus and memory.
Real Time Operating System :
A real time operating system (RTOS) is an operating system intended to serve real-time
application requests.
A key characteristic of an RTOS is the level of its consistency concerning the amount
of time it takes to accept and complete on an applications task ; the variability of jitter.
A hard RTOS has less jetter than a soft RTOS. The chief design goal is not high
throughput, but rather a guarantee of a soft or hard performance category.
An RTOS that can usually or generally meet a deadline in a soft real-time operating
system if it can meet a dead line deterministically it is a hard RTOS
An RTOS has an advanced algorithm for scheduling key factor in a RTOS are minimal
interrupt latency and minimal thread switching latency.
Operating System Services :
User Interface Program Execution
File-system manipulation I/O operations
Communications Error detection & Response
Resource Allocation Accounting
Protection and security System Access
There are two fundamental approaches for users to interface with the operating system
1) Command Interpreter 2) Graphical User Interface
Eg : MS- DOS and UNIX Eg : Windows, Linix etc.
A portion of the operating system is in main memory. This includes the kernel or nucleus,
which contains the most frequently used functions in the operating system and at a given
time, other portions of the operating system currently in use.
System Calls : The system call is the means by which a process requests a specific
kernel service. There are several hundred system calls, which can be roughly grouped into
6 categories:
File system, Process, Scheduling, Socket (Networking), Inter Process Communication and
Miscellaneous.
Micro Kernel :
It provides minimal process and memory management and communication facility
The main function is to provide a communication facility between the client program
and various services that are also running in user space.
SAIMEDHA 2
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 3
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 4
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
Switching the CPU to another process requires performing a state save of the current
process and a state restore of a different process. This task is known as a Context Switch.
When a context switch occurs, the kernel saves the context of the old process in its
PCB and loads the saved context of the new process scheduled to run.
PROCESS CREATION :
A process may create several new processes, via a create-process system call, during
the course of execution.
The creating process is called a parent process, and the new processes are called the
children of that process.
Each of these new processes may in turn create other processes, forming a tree of
processes.
When the OS creates a process at the explicit request of another process, the action is
referred to as process spawning.
When a process creater a new process, two possibilities exist in terms of execution :
1) The parent continues to execute concurrently with its children.
2) The parent waits until some or all of its children have terminated.
There are also two possibilities in terms of the address space of the new process :
1) The child process is a duplicate of the parent process (it has the same program and
data as the parent)
2) The child process has a new program loaded into it.
If a process terminates (either normally or abnormally), then all its children must also be
terminated. This phenomenon, referred to as cascading termination.
A process is indpendent if it cannot affect or be affected by the other processes executing
in the system.
A process is co operating if it can effect or be affected by the other processes executing in
the system.
There are several reasons for providing an environment that allows process cooperation.
* Information sharing * Computation speedup * Modularity * Convenience
Inter Process Communication :
IPC also referred as inter-thread communication and inter-application communication
Co operating processes require an inter process communication (IPC) mechanism that
will allow them to exchange data and information.
IPC methods are divided into methods for message passing. Synchronous , shared
memory, and remote procedure calls (RPC)
There are two fundamental models of intr process communication :
1) Shared memory 2) Message passing
The method of IPC used may vary based on the bandwidth and latency of
communication between the threads and type of data being communicated.
Under direct communication, each process that wants to communicate must explicity
name the recipient or sender of the communication.
With indirect communication, the messages are sent to and received from mailboxes, or
ports.
SAIMEDHA 5
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
Memory tables are used to keep track of both main (real) and secondary (virtual)
memory.
I/O tables are used by the operatin system to manage the I/O devices and channels of the
computer system.
The operating system may also maintain file tables. It provide information about the
existences of files, and their location.
Operating system maintain process tables to manage processes.
SOCKETS :
A socket is defined as an end point for communication.
A pair of processes communicating over a network employ a pair of sockets - one for
each process.
A socket is identified by an IP address concatenated with a port number.
Socket use a client - server architecture.
THREAD :A thread is a basic unit of CPU utilization
Threads are lightweight process and a unit of execution
A thread of execution is the smallest unit of processing that can be scheduled by OS
An executing instance of a program is called a process.
A thread is a subset of process.
Multi threading :
Multi threading refers to the ability of an operating system to support multiple threads of
execution within in a single process.
Threads also play a vital role in remote procedure call (RPC) systems. That RPCs allow
interprocess communication by providing a communication mechanism similar to ordinary
function or procedure calls.
For one process multiple threads are created and those are called as sibling.
Categories of Thread :
As a default, the micro kernel uses the policy of soft affinity in assigning threads to
processors : The dispatcher tries to assign a ready thread to the same processor it last ran
on.
SAIMEDHA 6
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
It h elps reuse data still in that processor’s memory caches from the previous execution of
the thread.
It is possible for an application to restrict its thread execution to contain processors (hard
affinity)
Support for threads may be provided either at the user level, for user threads, or by the
kernel for kernel threads. There must exist a relatiohship between user threads and kernel
threads.
There are 3 common ways of establishing this relationship
1) Many - to - One Model 2) One-to-one model 3) Many - to - Many Model
THREAD LIBRARIES :
A thread library provides the programmer on API for creating and managing threads.
There are two primary ways of implementing a thread library
The first approach is to provide a library entirely in user space with no kernel support.
All code and data structures for the library exist in user space.
The second approach is to implement a kernel-level library supported directly by the
operating system. In this case, code and data structures for the library exist in kernel
space.
Thread cancellation is the task of terminating a thread before it has completed.
A thread that is to be cancelled is often referred to as the target thread. Cancellation of a
target thread may occur in two different scenarious :
i) Asynchronous cancellation ii) Deferred cancellation
Symmetric multiprocessing is a method of organizing a multiprocessor system such that
any process (or thread) can run on any processor, this includes kernel code and processes.
Race Condition : A race condition occurs when multiple processes or threads read and
write data items so that the final result depends on the order of execution of instructions in
the multiple processes.
In non-preemptive scheduling, once the CPU has been allocated to a process, the process
keeps the CPU until it releases the CPU either by terminating or by switching to the
waiting state. Other wise it is pre-emptive scheduling
The interval from the time of submission of a process to the time of completion is called
turn-around time.
The time the process waits in the ready queue is called waiting time
The interval from the time of submission to the first time the process responds is called
response time
Process Synchronization
Making co-operating processes to execute in an orderly way is called process
synchronization.
Each process has a segment of code, called the critical section, in which the process may
be changing common variables.
SAIMEDHA 7
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
Page Fault :
The main functions of paging are performed when a program tries to access pages that
are not currently mapped to physical memory (RAM). This situations known as page
fault.
The set of pages that a process is currently using is called its working set
If the entire working set is in memory, the process will run without causing many faults
until it move into another execution.
Semaphore :
A semaphore is a variable or abstract data type that provides a simple but useful
abstraction for controlling access by multiple processes to a common resource in a
parallel programming environment.
Semaphores are a useful tool in the prevention of race conditions
Semaphore is a synchronization tool. There are two types of semaphores.
1. Semaphores which allow on arbitrary resource count are called counting semaphores
2. Semaphores which are restricted to the values 0 and 1 (or locked / unlocked, un
available / available) are called binary semaphores.
CPU - I/O BURST CYCLE :
The success of CPU scheduling dependson an observed property of processes : Process
execution consists of a cycle of CPU execution and I/O wait.
Processes alternate between these two states.
Process execution begins with a CPU burst. That is followed by an I/O burst, which is
followed by another CPU burst, then another I/O burst, and so on.
A CPU - bound program might have a few long CPU burts. This distribution can be
important in the selection of an appropriate CPU - scheduling algorithm
SPOOLING :
Acronym for simultaneous peripheral operations on- line
Spooling refers to putting jobs in a buffer a special area in memory or on a disk where a
device can access then when it is ready
Spooling is useful because devices access data at different rates.
The buffer provides a waiting station where data can rest while the slower device
catches up.
BUFFER :
A buffer is a region of memory used to temporarily hold data while it is being moved
from one place to another.
Buffers are typically used when there is a difference between the rate at which data is
received and the rate at which it can be processed.
Buffers can be implemented in either hardware or software but mostly in software.
DEADLOCK :
Deadlock can be defined as the permanent blocking of a set of processes that either
compete for system resource or communicate with each other.
A set of process is deadlocked when each process in the set is blocked awaiting an
event (typically the freeing up of some requested resource) that can only be triggered
by another blocked process in the set.
Deadlock is permanent because none of the events is ever triggered.
SAIMEDHA 8
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
All deadlocks involve conflicting needs for resources by two or more processes.
The conditions for Deadlock :
1) Mutual Exclusion : Only one process may use a resource at a time. No process may
access a resource unit that has been allocated to another process.
2) Hold and Wait : A process may hold allocated resource while awaiting assignment of
other resources.
3) No Preemption : No resource can be forcibly removed from a process holding it.
4) Circular Wait : A closed chain of processes exists, such that each process holds at
least one resource needed by the next process in chain.
DEADLOCK PREVENTION :
Deadlock Prevention provides a set of methods for ensuring that at least one of the
necessary conditions cannot hold. These methods prevent deadlocks by constraining how
requests for resources can be made.
The strategy of deadlock prevention is simply put, to design a system in such a way that
the possibility of deadlock is excluded.
We can view deadlock prevention methods as falling into two classes.
1) An indirect method of deadlock prevention is to prevent the occurrence of one of the
three necessary conditions.
1) Mutual Exclusion 2) Hold and wait 3) No preemption
A direct method of deadlock prevention is to prevent the occurrence of a circular wait.
DEADLOCK AVOIDANCE :
Deadlock avoidance, allows the three necessary conditions but makes judicious choices
to assure that the deadlock point is never reached.
Deadlock avoidance requires that the operating system be given advance additional
information concerning which resources a process will requesting and use during its
lifetime.
Banker’s algorithm is used for deadlock avoidance.
There are two approaches to deadlock avoidance :
Do not start a process if its demands might lead to deadlock
Do not grant an incremental resource request to a process if this allocation might lead
to deadlock.
Methods for Handling Deadlocks :
We can deal with the deadlock problem in one of three ways.
We can use a protocol to prevent or avoid deadlocks ensuring that the system will never
enter a deadlock state.
We can allow the system to enter a deadlock state, detect it and recover.
We can ignore the problem altogether and pretend that deadlock never occur in the
system.
Resource Allocation Denial :
The strategy of resource allocation denial, referred to as the banker’s algorithm, was
first proposed in [DIJK 65]
At any time a process may have zero or more resources allocated to it.
SAIMEDHA 9
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
The state of the system reflects the current allocation of resource to processes, thus,
state consists of the two vectors, resource and available and two matrices, claim and
allocation.
A safe state is one in which there is at least one sequence of resource allocations to
processes that does not result in a deadlock.
An unsafe state is a state that is not safe.
DEADLOCK DETECTION :
Deadlock detection strategies do not limit resource acess or restrict process actions.
With deadlock detection, requested resources are graned to processes whenever
possible.
Periodically, the OS performs an algorithm that allows it to detect the circular wait
condition.
RECOVERY FROM DEADLOCK :
Once deadlock has been detected, some strategy is needed for recovery.
There are two options for breaking a deadlock.
1) Simply to abort one or more processes to break the circular wait.
2) Preempt some resources from one or more of the deadlocked processes.
ADDRESS BINDING
The program resides on a disk as a binary executable file.
The processes on the disk that are waiting to be brought into memory for execution
form the input queue.
Address may be represented in different ways during loading the program into main
memory.
Address in the source program are generally symbolic. A compiler will typically bind
these symbolic address to relocate address
The binding of instructions and data to memory addresses can be done at any step along
the way :
1) Compile Time
2) Hood Time
3) Execution Time
An address generated by the CPU is commonly referred to as a logical address.
An address seen by the memory unit-that is, the one loaded into the memory, address
register of the memory is commonly referred to as a Physical address.
The run-time mapping from virtual to physical address is done by 4 hardware device called
Memory-management unit (MMU)
With Dynamic Loading a routine is not loaded until it is called.
This method is particularly useful when large amounts of code are needed to handle
infrequently such as error routines.
Dynamic loading does not require special support from the OS.
MEMORY MANAGEMENT : One of the most important and complex tasks of an
operating system is memory management.
Memory management involves treating main memory as a resource to be allocated to
shared among a number of active processes.
SAIMEDHA 10
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 11
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
Fixed Partitioning : A fixed partitioning scheme limits the number of active processes and
may use space inefficiently if there is a poor match between available partition sixes and
process sizes.
Dynamic Partitioning : A dynamic partitioning scheme is more complex to maintain and
includes the overhead of compaction.
Buddy System : In a buddy system, memory blocks are available of size
where smallest size block that is allocated
Largest size block that is allocated
A logical address is a reference to a memory location independent of the current
assignment of data to memory.
A relativeaddress is a particular example of logical address, in whch the address is
expressed as a location relative to some known point.
A physical address or absolute address, is an actual locating in main memory.
PAGING : -
The main memory is partitioned into equal fixed-size chunks that are relatively small
and each process is also divided into small fixed-size chunks of the same size.
Then the chunks of a process, known as Pages, could be assigned to available chunks of
memory, known, as frames, or page frames.
Every address generated by CPU is divided into two parts : Page number (P) and a
Page offset (d)
Operating system maintains a Page table for each process. The page table shows the
frame location for each
SEGMENTATION :
A user program can be sub divided using segmentation in which the program and its
associated data are divided into a number of segments. Each segment has a name and a
length.
Segmentation eliminates internal fragmentation but it suffers from external
fragmentation.
Each segment table entry would have to give the starting address in main memory of
the corresponding segment.
When a process enters the running state, the address of its segment table is loaded into
a special register used by the memory-management hardware.
LINKING : The function of a linker is to take as input a collection of object modules and
procedure a load module, consisting of an integrated set of programs and data modules, to
be passed to the loader.
Linkage Editor : The nature of this address linkage will depend on the type of load
module to be created and when the linkage occurs.
Virtual Memory : Virtual memory allows for very effective multiprogramming and
relieves the user of the unnecessary tight constrains of main memory.
With virtual memory, all address references are logical reference that are translated at
run time to real address.
SAIMEDHA 12
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
This allows a process to be located anywhere in main memory and for that location to
change over time.
Virtual memory allows a process to be broken up into pieces. Virtual memory can
allow pages to be shared during process creation with the fork ( ) system call, thus
speeding up process creation.
Two basic approximates to providing virtual memory are paging and segmentation.
It also possible to combine segmentation and paging in a single memory-management
scheme.
A Virtual memory management scheme requires both hardware and software support.
THRASHING : The high paging activity is called thrashing. A process is thrashing if it is
spending more time paging than executing.
Locality Model is used to prevent thrashing
Principle of locality states that program and data references within a process tend to
cluster.
The page number (n) field is longer than the frame number field (m) [ n > m ]
A number of design issues relate to OS support for memory management
1) Fetch Policy :
The fetch policy determines when a page should be brought into main memory.
The two common alternatives are
i) Demand Paging : A page is brought into main memory only when a reference is made
to a location on that page.
ii) Prepaging : Pages other than the demand by a page fault are brought in
2) Placement Policy 3) Replacement Policy
4) Resident set management 5) Cleaning Policy 6)
Load Control
A Lazy Swapper never swaps a page into memory unless that page will be needed.
A swapper manipulates entire processes, whereas a pager is concerned with the
individual pages of a process. Thus we use pager, rather than swapper, in connection
with demand paging.
When the bit is set to “valid”, the associated page is both legal and in memory.
If the bit is set to “invalid”, the page either is not valid (i.e, not in the logical address space
of the process) or is valid but is currently on the disk.
Access to a page marked invalid causes a Page-fault trap.
Reentrat code (or Pure Code) is non-self-modifying code ; it never changes during
execution. Thus, two or more processes can execute the same code at the same time.
HASHED PAGE TABLE :
A common approach for handling address spaces larger than 32 bits is to use a hashed
page table, with the hash value being the virtual page number.
Each entry in the hash table contains a linked list of elements that hash to the same
location (to handle collisions).
Each element consists of three fields :
1) the virtual page number
2) the value of the mapped page frame and
SAIMEDHA 13
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 14
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
The file-organization module also includes the free-space manager, which tracks
unallocated blocks and provides these blocks to the file-organization module when
requested.
The logical file system manages metadata information. It also responsible for protection
and security
A file-control block (FCB) contains information about the file, including ownership,
permissions, and location of the file contents.
A boot control Block (per volume) can contain information needed by the system to boot
an OS from that volume.
In UFS ( Unix file system). It is called the boot block ; in NTFS, it is the partition boot
sector.
PARTITION AND MOUNTING :
A disk can be sliced into multiple positions or a volume can span multiple partitions on
multiple disks.
Each partition can be either “raw”, containing no file sy system, or “cooked”,
containing a file system.
Raw disk is used where no file system is appropriate.
The root partition, which contains the OS Kernel and sometimes other system files, is
mounted at boot time.
Allocation Methods : Three major methods of allocating disk space are in wide use :
1) Contiguous 2) Linked 3) Indexed
Bit Vector :
The free-space list is implemented as a bit map or bit vector. Each block is
represented by 1 bit
If the block is free, the bit is 1 ; if the block is allocated, the bit is 0.
PRACTICE SET - I
SAIMEDHA 15
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 16
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
20. Locality of reference implies that the page reference being made by a process
1) will always be to the page used in the previous page reference
2) is likely to be the one of the pages usede in the last few page references
3) will always be to one of the pages existing in memory
4) will always lead to a page fault
21. Which of the following is not a key piece of information, stored in single page table entry,
assuming pure paging and virtual memory
1) Frame number
2) A bit indicating whether the page is in physical memory or on the disk
3) A reference for the disk block that stores the page 4) None of the above
22. Which amongst the following is not a valid page replacement policy ?
1) LRU policy (Least Recently Used) 2) FIFO policy (First in first out)
3) RU policy (Recurrently used) 4) Optimal page replacement policy
23. Jobs which are admitted to the system for processing is called
1) long-term scheduling 2) short - term scheduling
3) medium-term scheduling 4) queuing
24. Virtual memory is
1) simple to implement
2) used in all major commercial operating system 3) less efficient in utilization of memory
4) useful when fast I/O devices are not available
25. Page stealing
1) is a sign of efficient system 2) is taking page frames other working
sets
3) should be the tuning goal
4) is taking larger disk spaces for pages paged out
26. The memory allocation scheme subject to “external” fragmentation is
1) segmentation 2) swapping
3) pure demand paging 4) multiple fixed contiguous partitions
27. Page fault occurs when
1) the page is corrupted by application software 2) the page is in main memory
3) the page is not in main memory 4) one tries to divide a number by 0
28. Overlay is
1) a part of an operating system 2) a specific memory location
3) a single contiguous memory that was used in the olden days for running large programs
by swapping
4) overloading the system with many user files
29. Determine the number of page faults when reference to pages occur in order -1, 2, 4, 5,
2,1,2,4. Assume that the main memory can accommadate 3 pages and the main memory
already has t he pages 1 and 2, with page 1 having been brought earlier than page 2.
(Assume LRU algorithm is used)
1) 3 2) 5 3) 4 4) none of the above
30. Concurrent processes are processes that
1) do not overlap in time2) overlap in time
3) are executed by a processor at the same time 4) none of the above
31. Supervisor call
1) is a call made by the supervisor of the system 2) is a call with control functions
SAIMEDHA 17
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
3) are privileged calls that are used to perform resource management functions, which are
controlled by the operating system
4) is a call made by someone working in root directory
32. Fence register is used for
1) CPU protection 2) memory protection
3) file protection 4) all of the above
33. Which of the following is a service not supported by the operating system ?
1) Protection 2) Accounting 3) Compilation 4) I/O operation
34. The first fit, best- fit and the worst - fit algorithms can be used for
1) contiguous allocation of memory 2) linked allocation of memory
3) indexed allocation of memory 4) all of the above
35. Which of the following is single-user operating system ?
1) MS - DOS 2) UNIX 3) OS/2 4) None of these
36. Which of the following are true ?
1) A re-entrant procedure can be called any number of times
2) A re-entrant procedure can be called even before the procedure has not returned from its
previous call
3) Re-entrant procedures cannot be called recursively 4) None of these
37. A state is safe if the system can allocate resources to each process (up to its maximum) in
some order and still avoid deadlock.
1) Deadlocked state is unsafe 2) Unsafe state may not be lead to a deadlock
situation
3) Unsafe state must lead to a deadlock situation 4) None of these
38. The size of the virtual memory depends on the size of the
1) data bus 2) main memory 3) address bus 4) none of the above
39. In which of the following scheduling policies does context switching never take place ?
1) Round- robin 2) Shortest job first
3) Pre-emptive 4) None of these
40. In which of the following directory systems, is it possible to have multiple complete paths
for a file, starting from the root directory ?
1) Single - level directory 2) Two-level directory
3) Tree structured directory 4) Acyclic graph directory
41. Suppose that a process is in “BLOCKED” state waiting for some I/O service. When the
service is completed, it goes to the
1) RUNNING state 2) READY state 3) SUSPENDED state 4) TERMINATED state
42. In a system that does not support swapping
1) the compiler normally binds symbolic addresses (variables) to relocatable addresses
2) the compiler normally binds symbolic addresses to physical addresses
3) user programs can implement dynamic loading without any special support from the
operating system or the hardware
4) None of these
43. To obtain better memory utilization, dynamic loading is used. With dynamic loading, a
routine is not loaded until it is called. For implementing dynamic loading
1) special support from hardware is essential
2) special support from operating system is essential
3) special support from both hardware and operating system are essential
SAIMEDHA 18
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
4) user programs can implement dynamic loading without any special support from the
operating system or the hardware
44. Which of the following is true ?
1) The linkage editor is used to edit programs which have to be later linked together
2) The linkage editor links object modules during compiling or assembling
3) The linkage editor links object modules and resolves external references between them
before loading
4) The linkage editor resolves external references between the object modules during
execution time
45. Which of the following application is well suited for batch processing
1) Process control 2) Video game control 3) Preparing pay bills of employees 4) None
of these
46. Locality of reference implies that the page reference being made by a process
1) will always be to the page used in the previous page reference
2) is likely to be one of the pages used in the last few page references
3) will always be one of the pages existing in memory 4) will always leads to a page
fault
47. An operating system uses Shortest Remaining Time first (SRT) process scheduling
algorithm. Consider the arrival times and execution times for the following processes :
SAIMEDHA 19
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
PRACTICE SET - II
01. Virtual Memory is ___
1) An Extremely Large Main Memory 2) An Extremely Large Secondary
Memory
3) An illusion of Extremely Large Memory
4) A type of Memory used in super computers
02. The size of the virtual memory depends on
1) The size of data bus 2) The size of main memory
3) The size of address bus 4) None
03. Suppose that a process is in blocked state waiting for some I/O service. When the service
is completed, it goes to the ___state
1) Running 2) Ready 3) Suspended 4) Terminated
04. Real time systems are
1) Primarily used on mainframe computers
2) Used for Monitoring events as they occur
3) Used for program development 4) Used for real time interactive users
05. Memory management is
1) Not used in Modern Operating system
SAIMEDHA 20
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 21
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 22
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
1) FIFO 2) LRU
3) no such policy exists 4) none of the above
34. The only state transition that is initiated by the user process itself is
1) block 2) dispatch 3) wakeup 4) none of the above
35. Working set (t,k) at an instant of time, t, is the set of
1) k future references that the operating system will make
2) future references that the operating system will make in the next ‘k’ time units
3) k references with high frequency
4) pages that have been referenced in the last k time units
36. In Round Robin CPU scheduling, as the time quantum is increased, the average turn
around time
1) increases 2) decreases
3) remains constant 4) varies irregularly
37. Which of the following is true ?
1) Overlays are used to increase the size of physical memory
2) Overlays are used to increase the logical address space
3) When overlays are used, the size of a process is not limited to the size of physical
memory
4) Overlays are used whenever the physical address space is smaller than the logical
address space
38. In partitioned memory allocation scheme, the
1) best fit algorithm is always better than the first fit algorithm
2) first fit algorithm is always better than the best fit algorithm
3) superiority of the first fit and best-fit algorithms depend on the sequence of memory
requests
4) none of the above
39. Cascading termination refers to termination of all child processes before the parent
terminates
1) normally 2) abnormally
3) normally or abonormally 4) none of the above
40. For implementing a multiprogramming operating system
1) special support from processor is essential
2) special support from processor is not essential
3) cache memory must be available 4) more than one processor must be
available
SAIMEDHA 23
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 24
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 25
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
28. _____ is a technique of temporarily removing inactive programs from the memory of
computer system
1) Swapping 2) Spooling 3) Semaphore 4) Scheduler
29. ____ is a technique of improving the priority of process waiting in Queue for CPU
allocation
1) Starvation 2) Ageing 3) Revocation 4) Relocation
30. File record length
1) Should always be fixed 2) Should always be variable
3) Depends upon the size of file
4) Should be chosen to match the data characteristics
31. If the property of locality of reference is well pronounced in a program
1) the number of page faults will be more 2) the number of page faults will be less
3) the number of page faults will remain the same 4) none of these
32. At a particular time of computation, the value of counting semaphore is 7. Then 20 P
operations and ‘x’ V operations were completed on this semaphore. If the final value of the
semaphore is 5, x will be
1) 15 2) 22 3) 18 4) 13
33. Sector interleaving in disks is done by
1) the disk manufacturer 2) the disk controller cord
3) the operating system 4) none of the above
34. Memory protection is of no use in a
1) single user system 2) non-multiprogramming system
3) non-multitasking system 4) none of the above
35. Disk scheduling involves deciding
1) which disk should be accessed next
2) the order in which disk access requests must be serviced
3) the physical location where files should be accessed in the disk
4) none of the above
SELF TEST
01. Scheduling is
1) Allowing jobs to use the processor 2) Unrelated to performance
consideration
3) Not required in uni processor systems 4) The same regardless of the purpose of
the system
02. Object code
1) is ready to execute
SAIMEDHA 26
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 27
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 28
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 29
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
13. ____ removes a deadlock by aborting some processes so that other processes involved in
the deadlock can resume their operation
1) Deadlock resolution 2) Deadlock detection
3) Deadlock occurence 4) Deadlock avoidance
14. The sleeping barber problem is an example of
1) deadlock 2) starvation 3) semaphore 4) live lock
15. Interrupt disabling is not possible in a ___
1) uniprocessor architecture 2) multiprocessor architecture
3) multiprogramming architecture 4) uniprogramming architecture
16. A user process enters kernel mode by issuing a __when an exception is generated
1) program 2) routine 3) handler 4) system call
17. Round Robin is the preemptive version of
1) FIFO 2) LCFS 3) SJF 4) FCLS
18. ____ are used to keep track of both main and secondary memory
1) Process tables 2) File tables 3) Memory tables 4) I/O tables
2010
19. Allocate and free main memory is a type of system call for
1) Process control 2) File Management
3) Information Maintenance 4) Device Management
20. Attach or detach remote devices is the following type of system call
1) Process control 2) Device Management
3) File Management 4) Communications
21. The fork system call in UNIX
1) Creates new process 2) Invokes job scheduler
3) Invokes CPU scheduler 4) Executes new process
22. Mail box provides
1) Direct communication for IPC 2) Indirect communication for IPC
3) Process cooperation 4) Process scheduling
23. Disadvantages of the fixed partitioning of memory is
1) Internal fragmentation 2) Internal segmentation
3) External monitoring 4) External segmentation
24. Select the method which is not used for free space management
1) Linked list 2) Bit vector 3) Counting 4) Inverted list
25. The following algorithm is also called elevator algorithm
1) SSTF scheduling 2) SCAN scheduling
3) LOOK scheduling 4) FCFS scheduling
26. The following disk scheduling algorithm perform better for systems that place heavy load
on the disc
1) C-SCAN 2) SSTF 3) FCFS 4) LOOK
27. Which of the following page replacement algorithms exhibits belady’s anamoly
1) FIFO 2) LRU
3) LFU 4) Optimal page Replacement
28. To avoid race condition the number of processes that can be allowed to be simultaneously
inside the critical section is
1) 0 2) All 3) 1 4) 3
2009
SAIMEDHA 31
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234
BSNL – JTO - LICE OPERATING SYSTEM
SAIMEDHA 32
HYDERABAD-9494941234 TIRUPATI-9494861234 VIJAYAWADA-9494891234