Describe sequential and direct access method.

1 Answer

Answer :

Sequential access: Information from the file is processed in order i.e. one record after another. It is commonly used access mode. For example, editors and compilers access files in sequence. A read operation read information from the file in a sequence i.e. read next reads the next portion of the file and automatically advances a file pointer. A write operation writes information into the file in a sequence i.e. write next appends to the end of the file and advances to the end of the newly written material. Such a file can be reset to the beginning. In some operating systems, a program may be able to skip forward or backward n records for some integer n.

image

As shown in above diagram, a file can be rewind (moved in backward direction) from the current position to start with beginning of the file or it can be read or write in forward direction.

Direct access: It is also called as relative access. A file is made up of fixed length logical records that allow programs to read and write records rapidly in no particular order. Direct access method is based on disk model of a file which allows random access to any file block. For direct access a file is viewed as a numbered sequence of blocks or records. So we can directly read block 14, then block 53 and so on. This method is used for immediate access to large amount of information. Database can be accessed with direct access method. For example, when a query concerning a particular subject arrives, we compute which block contains the answer and then read that block directly to provide the desired information. Read n operation is used to read the nth block from the file whereas write n is used to write in that block. The block numbers provided by the user to the operating system is a relative block number. A relative block number is an index relative to the beginning of the file. The first relative block of file is 0; the next is 1 and so on. Actual absolute disk address of the block is different from the relative address. The use of relative block numbers allow the operating system to decide where the file should be placed and helps t prevent the user from accessing portions of the file system that may not be part of his file.

Related questions

Description : Enlist different file allocation methods? Explain contiguous allocation method in detail.

Last Answer : From the user's point of view, a file is an abstract data type. It can be created, opened, written, read, closed and deleted without any real concern for its implementation. The implementation of a ... a times is difficult to estimate. 4. Compaction may be required and it can be very expensive.

Description : List free space management techniques? Describe any one in detail.

Last Answer : A file system is responsible to allocate the free blocks to the file therefore it has to keep track of all the free blocks present in the disk. There are mainly four approaches by using which, the free ... block. This block contains a pointer to the next free disk block, and so on.

Description : State and describe types of scheduler.

Last Answer : There are three types of scheduler: Long term scheduler Short term scheduler Medium term scheduler 1. Long term scheduler: It selects programs from job pool and loads them into the ... scheduler works in close communication with long term scheduler for loading process into the main memory. 

Description : Describe I/O Burst and CPU Burst cycle with neat diagram.

Last Answer : 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. A process execution consists ... cycle and so on. The final CPU burst cycle ends with a system request to terminate execution.

Description : Describe any four file attributes

Last Answer : File attributes: Name: The symbolic file name is the only information kept in human readable form. Identifier: File system gives a unique tag or number that identifies file within file ... Last modification and last use. These data can be useful for protection, security and usage monitoring.

Description : List any four features of open source operating system.

Last Answer : 1. Open Source: open source OS code is freely available and it is community based development project. Multiple team's works in collaboration to enhance the capability of operating system and it is ... issuing a command in Linux Terminal or Shell. Linux can also run Windows applications if needed.

Description : Explain LRU page replacement algorithm for following reference string. 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 Calculate the page fault.

Last Answer : LRU: The Least Recently Used (LRU) page replacement policy replaces the page that has not been used for the longest period of time. LRU replacement associates with each page the time of that page's last use. ... in question so assume frame size as 3 or 4) LRU: Assume frame size=3

Description : Explain multithreading model in detail.

Last Answer : Many systems provide support for both user and kernel threads, resulting in different multithreading models. Following are three multithreading model: Many-to-One Model The many-to- ... True concurrency cannot be achieved. Multiple threads of kernel is an overhead for operating system

Description : Enlist the operating system tools. Explain any two in detail.

Last Answer : Following are the operating tools: User Management Security policy Device Management Performance Monitor Task Scheduler A) User management: User management includes everything ... routing tables, interface statistics, masquerade connections, and multicast memberships. # netstat -tulpn

Description : Explain PCB with diagram.

Last Answer : Each process is represented as a process control block (PCB) in the operating system. It contains information associated with specific process. Process State: It indicates current state of a process. ... . Each PCB gives information about a particular process for which it is designed.

Description : Explain Round Robin algorithm with suitable example.

Last Answer : It is preemptive scheduling algorithm. A small unit of time known as a time quantum or time slice is used for pre-emption of a currently running process. Ready queue is implemented as a circular ... has received 1 time quantum, the CPU returns to process P1 for an additional time quantum. 

Description : What is purpose of system call? State two system calls with their functions.

Last Answer : 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, ... send, receive messages transfer status information attach or detach remote devices. 

Description : Write Unix command for following: i)create a folder OSY ii) create a file FIRST in OSY folder iii) List/display all files and directories. iv) Write command to clear the screen

Last Answer : i) create a folder OSY: $mkdir OSY ii)create a file FIRST in OSY folder: $cd OSY $cat>FIRST or $ touch FIRST iii) List/display all files and directories: $ls iv) to clear screen: $clear

Description : Explain partitioning and its types.

Last Answer : An important operation of memory management is to bring programs into main memory for execution by the processor. Partitioning is a technique that divides a memory into multiple partitions. These partitions ... in memory. For example: Consider following table with process and memory space.

Description : Explain deadlock? What are necessary conditions for deadlock?

Last Answer : In multiprogramming environment, several processes may compete for a finite number of resources. A process requests resources and if the resources are not available then the process enters into the ... Each process is waiting for the resources held by other waiting processes in circular form.

Description : With neat diagram explain inter process communication model.

Last Answer : Inter-process communication: Cooperating processes require an Interprocess communication (IPC) mechanism that will allow them to exchange data and information. There are two models of IPC 1. ... a communication link between them. Between each pair of processes exactly one communication link.

Description : List components of OS. Explain process management in detail.

Last Answer : List of System Components: 1. Process management 2. Main memory management 3. File management 4. I/O system management 5. Secondary storage management Process Management: The operating ... synchronization. 4. A mechanism for process communication. 5. A mechanism for deadlock handling.

Description : Enlist types of operating system. Explain multiprogramming OS in detail.

Last Answer : Types of operating system 1.Batch Systems 2.Multiprogramming 3.Multitasking 4.Time-Sharing Systems 5.Desktop Systems 6.Distributed system 7.Clustered system 8.Real Time system: Multiprogramming ... multiprogramming: user can open word, excel, access and other applications in a system.

Description : Write syntax for following commands: i)Sleep ii)Kill

Last Answer : i)sleep Syntax: sleep NUMBER[SUFFIX]… sleep OPTION ii) kill Syntax: kill pid

Description : Define virtual memory

Last Answer : Virtual memory is a memory management capability of an operating system (OS) that uses hardware and software to allow a computer to compensate for physical memory shortages by temporarily transferring data ... can be placed in overlays, but can concentrate instead on the problem to be programmed. 

Description : Explain any four scheduling criteria.

Last Answer : 1. CPU utilization: In multiprogramming the main objective is to keep CPU as busy as possible. CPU utilization can range from 0 to 100 percent. 2.Throughput: It is the number of processes ... fairly early and can continue computing new results while previous results are being output to the user.

Description : Draw process state diagram.

Last Answer : process state diagram

Description : Explain any 4 services provided by OS.

Last Answer : 1.User Interface: All operating systems have a user interface that allows users to communicate with the system. Three types of user interfaces are available: a. Command line interface ( ... to system resources. Security is provided by user authentication such as password for accessing information.

Description : Define real time operating system. List its any four applications of it.

Last Answer : Real time Operating System: A real time system has well defined fixed time constraints. Processing should be done within the defined constraints -Hard and Soft real time system. OR The ... Applications: 1. Flight Control System 2. Simulations 3. Industrial control 4. Military applications

Description : Which access method is used to access cassette tape? A) Direct B) Sequential C) Both of the above D) None of the above

Last Answer : Answer : B

Description : The Method of file organisation in which data records in a file are arranged in a specified order according to a key field is known as the1 Direct access method 2) Queuing method 3) Predetermined method 4) Sequential method

Last Answer : 4) Sequential method

Description : The ability to find an individual item in a file immediately _____ is used. 1) File allocation table 2) Directory 3) Sequential access 4) Direct access 4 5) None of these

Last Answer : Answer :1

Description : The two basic types of record access methods are: A) Sequential and random B) Sequential and indexed C) Direct and immediate D) Online and real time

Last Answer : Answer : A

Description : Magnetic disks are the most popular medium for A) Direct access B) Sequential access C) Both of above D) None of above

Last Answer : Answer : C

Description : Magnetic disks are the most popular medium for A) Direct access B) Sequential access C) Both of above D) None of above

Last Answer : Answer : D

Description : The two basic types of record-access methods are a. Sequential and random b. Sequential and indexed c. Direct and immediate d. On-line and real time

Last Answer : Sequential and random

Description : Magnetic disks are the most popular medium for a. Direct access b. Sequential access c. Both of above d. None of above

Last Answer : Both of above

Description : The ability to find an individual item in a file immediately _____ is used: a) file allocation table b) directory c) sequential access d) direct access e) None of The Above

Last Answer : a) file allocation table

Description : Which of the Following is not true of immediate processing: a) It is often used in real time applications b) It can be used in an airline reservation system c) It can occur with either sequential or direct access files d) None of The Above

Last Answer : c) It can occur with either sequential or direct access files

Description : Hard Disks and Diskettes are: a) Direct Access Storage Devices b) Sequential Access Storage Devices c) Rarely used Microcomputers d) None of The Above

Last Answer : a) Direct Access Storage Devices

Description : Magnetic disk a medium known as 1) Serial access 2) Direct access 3) Sequential access 4) Sequential and rotational access

Last Answer : 2) Direct access

Description : Separate Read/Write heads are required in which of these memory access schemes. 1) Random Access 2) Sequential Access 3) Direct Access 4) None of these

Last Answer : 4) None of these

Description : Separate Read/Write heads are required in which of these memory access schemes. 1 Random Access 2 Sequential Access 3 Direct Access 4 None of these

Last Answer : 4 None of these

Description : The two basic types of record-access methods are a. Sequential and random b. Sequential and indexed c. Direct and immediate d. On-line and real time

Last Answer : a. Sequential and random

Description : Magnetic disks are the most popular medium for a. Direct access b. Sequential access c. Both of above d. None of above

Last Answer : c. Both of above

Description : Direct access of file is also known as (1) random access (2) relative access (3) file access (4) sequential access

Last Answer : random access

Description : HSAM stands for ………. A) Hierarchic Sequential Access Method B) Hierarchic Standard Access Method C) Hierarchic Sequential and Method D) Hierarchic Standard and Method

Last Answer : A) Hierarchic Sequential Access Method

Description : List three methods of fuel injection. Describe sequential method with suitable sketch.

Last Answer : Methods of petrol injection 1. Sequential fuel injection. (SFI) 2. Grouped fuel injection. 3. Simultaneous fuel injection 4. Continuous injection.  Sequential Injection: Each injector ... to crank/ camshaft position and pulse width, can be optimized for each individual cylinder.

Description : Which of the following is not true for a magnetic disk? A) It is expensive relative to magnetic tape B) It provides only sequential access to stored data C) Users can easily update records by writing over the old data D) All of above

Last Answer : Answer : B

Description : Memories in which any location can be reached in a fixed amount of time after specifying its address is called ________ A. Sequential Access Memory B. Random Access Memory C. Quick Access Memory D. Mass storage

Last Answer : B. Random Access Memory

Description : ________ is the ability of a device to ‘jump’ directly to the requested data A. Sequential access B. Random access C. Quick access D. None of the Above

Last Answer : B. Random access

Description : A storage device whe3re the access time is depended upon the location of the data is a. Random access b. Serial access c. Sequential access d. Transaction access

Last Answer : Serial access

Description : Which of the following is not true for a magnetic disk? a. It is expensive relative to magnetic tape b. It provides only sequential access to stored data c. Users can easily update records by writing over the old data d. All of above

Last Answer : It provides only sequential access to stored data

Description : The simultaneous execution of two or more instructions is called- 1) Sequential Access 2) Reduced Instruction set computing 3) Multiprocessing 4) None of these

Last Answer : 3) Multiprocessing

Description : A storage device whe3re the access time is depended upon the location of the data is a. Random access b. Serial access c. Sequential access d. Transaction access

Last Answer : b. Serial access