OS Final PDF
OS Final PDF
The real-time operating system used for a real-time application means for those applications where data processing
should be done in the fixed and small quantum of time. Applications:
Types of real time operating system
1. Flight Control System 2. Simulations
1. Hard real-time
3. Industrial control 4. Military applications
2. Soft real-time
2.Describe I/O Burst and CPU Burst cycle with neat diagram.
CPU burst cycle: It is a time period when process is busy with CPU. I/O burst cycle: It is a time period when process
is busy in working with I/O resources.
i) A process execution consists of a cycle of CPU execution and I/O wait. ii) A process starts its execution when CPU
is assigned to it, so process execution begins with a CPU burst cycle. iii) This is followed by an I/O burst cycle when
a process is busy doing I/O operations. Iv) A process switch frequently from CPU burst cycle to I/O burst cycle and
vice versa. V) The complete execution of a process starts with CPU burst cycle, followed by I/O burst cycle, then
followed by another CPU burst cycle, then followed by another I/O burst cycle and so on. Vi) The final CPU burst
cycle ends with a system request to terminate execution.
2. What is purpose of system call? State two system calls with their functions.
System call provides an interface between a running program and operating system. It allows user to access services
provided by operating system. This system calls are procedures written using C, C++ and assembly language
instructions. Each operating system has its own name for each system call. Each system call is associated with a
number that identifies itself. System calls: Process Control: Program in execution is a process. A process to be
executed must be loaded in main memory. while executing it may need to wait, terminate or create & terminate child
processes. end, abort load, execute create process, terminate process get process attributes, set process
attributes wait for time wait event, signal event allocate and free memory
Device Management: When a process is in running state, it requires several resources to execute. These resources
include main memory, disk drives, files and so on. If the resource is available, it is assigned to the process. Once the
resource is allocated to the process, process can read, write and reposition the device. request device, release device
read, write, reposition get device attributes, set device attributes logically attach or detach devices
3.Enlist different file allocation methods? Explain contiguous allocation method in detail.
Three major methods of allocating disk space are in wide use: Contiguous Linked Indexed
Contiguous Allocation • The contiguous allocation method requires each file to occupy a set of contiguous addresses
on the disk. Disk addresses define a linear ordering on the disk. Contiguous allocation of a file is defined by the disk
address of the first block and its length. If the file is ‘n’ blocks long and starts at location ‘b’, then it occupies blocks b,
b+1, b+2, - - - - - b+n-1. The directory entry for each file indicates the address of the starting block and the length of
the area allocated for this file. • Contiguous allocation supports both sequential and direct access. • For direct access
to block ‘i’ of a file, which starts at block ‘b’, we can immediately access block b+i. The difficulty with contiguous
allocation is finding space for a new file. • For direct access to block ‘i’ of a file, which starts at block ‘b’, we can
immediately access block b+i. • The difficulty with contiguous allocation is finding space for a new file. • If file to be
created are ‘n’ blocks long, we must search free space list for ‘n’ free contiguous blocks.
Advantages of Contiguous File Allocation Method: 1. Supports both sequential and direct access methods. 2.
Contiguous allocation is the best form of allocation for sequential files. Multiple blocks can be brought in at a time to
improve I/O performance for sequential processing. 3. It is also easy to retrieve a single block from a file. For
example, if a file starts at block ‘n’ and the ith block of the file is wanted, its location on secondary storage is simply n
+ i. 4. Reading all blocks belonging to each file is very fast. 5. Provides good performance.
Disadvantages of Contiguous File Allocation Method: 1. Suffers from external fragmentation. 2. Very difficult to
find contiguous blocks of space for new files.
5.Write two uses of following O.S. tools (i) Device Management (ii) Performance monitor (iii) Task Scheduler
i) Device management: Managing all the hardware or virtual devices of computer system. Allow interaction
with hardware devices through device driver. Used to install device and component-level drivers as well as
associated software. Allocate devices to the process as per process requirement and priority. Deallocate devices
either temporarily or permanently dependingon condition. Keeping track of all device’s data and location.
Monitoring device status like printers, storage drivers and other devices. Used to enforce the predetermined
policies and decides which process receives the device when and for how long. ii) Performance monitor 1. Monitor
various activities on a computer such as CPU or memory usage. 2. Used to examine how programs running on their
computer affect computer’s performance 3. It is used to identify performance problems or bottleneck that affect
operating system or installed applications. 4. Used to observe the effect of system configuration changes.
iii) Task scheduler 1. Assign processor to task ready for execution 2. Executing predefined actions automatically
whenever a certain set of condition is met.