For faster navigation, this Iframe is preloading the Wikiwand page for シーケンシャルアクセス.

シーケンシャルアクセス

シーケンシャルアクセスとランダムアクセスの概念図

シーケンシャルアクセス (: sequential access) とは、データ構造記憶装置などにおけるデータへのアクセス方式のひとつであり、コンテナ(コレクション)または記憶媒体の先頭から順に検索しアクセスしていく。そのため、後ろに格納または記録されたデータに辿り着くまで時間がかかる。これは順次アクセスとも言われる。対になる方式はランダムアクセスである。

(かつての)カセットテープやビデオテープなどオーディオやビデオ用としては多用された。

コンピュータの付帯装置においては、利便性の点でランダムアクセスが可能な機器がもっぱらだが、業務用の磁気テープLTOなど)はシーケンシャルアクセスである。また、ランダムアクセスはシーク時間による遅延が発生するため、ディスクメディアに対して大容量のバックアップを行う場合などにおいては、シーケンシャルアクセスの方が高速に読み込み・書き込みが可能である。

データ構造のうち、連結リストは通例シーケンシャルアクセスのみが可能である。任意の位置の要素にアクセスするには先頭ノードから順に辿っていく必要があるため、そのような操作の計算量は線形時間となり、要素数に線形比例する。代わりに要素の追加と削除が配列などよりも高速に実行できるという利点がある。C++std::list[1]Javajava.util.LinkedListなどが該当する。

シーケンシャルアクセスのメディア

[編集]

ファイルへのシーケンシャルアクセス

[編集]

大抵のオペレーティングシステムは、ハードディスクフロッピーディスクRAMディスクなどの記憶媒体にファイルシステムを提供し、データをファイルごとに格納できるようになっている。一般に多くのオペレーティングシステムでは、通常のファイルであればシーク操作によってランダムアクセスができる。何らかの理由でシークができないファイル、あるいはディスク上のファイルではないパイプなどに対しては、シークができず、シーケンシャルアクセスしかできない。

Microsoft Windowsのように、シーケンシャルアクセスが想定される場合、ファイルをオープンするときにファイルキャッシュの最適化ヒントをフラグとして指定できるAPIを持つOSもある[2]。また、Windows APIには、シーケンシャルアクセスのみを許可するストリームを表現するCOMインターフェイスとしてISequentialStreamがある[3]。ランダムアクセスも許可するIStreamインターフェイスは、ISequentialStreamから派生している。

脚注

[編集]

関連項目

[編集]
{{bottomLinkPreText}} {{bottomLinkText}}
シーケンシャルアクセス
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?