Friday, November 04, 2011

Use of Data Structures in Operating Systems

Computer science students generally study data structures, both those on the main topic of a full course and as portions of many upper level courses, such as compilers, databases, networking and operating systems. Data structures are used abundantly in operating systems.

Queues - are used wherever entities need to wait, e.g., processes waiting for a processor, I/O requests are waiting for devices to become available, processes waiting for access to their critical sections and so on.

Stacks - are used for supporting the function call return mechanism.

Trees - are used to represent file system directory structures, to keep track of the allocation of disk space to files, to build hierarchical page directory structures in support of virtual address translation and so on.

Graphs - are used when studying networking.

Hash Tables - are used when implementing Process tables to access a process's control block (PCB) quickly, using PID (process identification number) as the key.


Cheers! 
Rajendra

No comments: