explain how data structures are used in an operating system
explain how data structures are used in an operating system and if you would use stacks of queues when implementing said structures.
Address the following:
Analyze the data structures of stacks and queues.
Based on your analysis, explain how you would implement these data structures (stacks and/or queues) in an operating system.
Explain whether you would prefer to use stacks, queues or both.
Provide examples of existing data structures to support your arguments.
Solution
operatingsystem:an operating system is an interface between user and the computer hardware.(or) operating system is an program that will operates whole computer.
1.it is important to know that page table is the data structure used by a virtual memory system in a computer OS to store the mapping between virtual address and physical address.virtual address are used by used by the acessing process,while physical addresses are used by the hardware or more specilically to the RAM. each mapping is also known as a page table entry(PTE).
in the page tables the data must be stored in a specific manner so these are some data strucures that are used to organize the data.
the data sturctures are:STACKS AND QUEUES.
these data structures can be implemented by using arrays or linked lists.
1.STACK:stack is an data structure that is used to organize data in last in first out manner i.e the data which is inserted first that should be deleted first(LIFO). the insertion and deletion should be done at the same end of the stack.
2.QUEUE:queue is an data structure that is used to organize data in first in first out manner i.e the data which is inserted last should be deleted first(FIFO).the insertion and deletion should be done at the different end of the queue.
-I ll prefer both stack and queue because the stack is used to organize the large amount of similar data.let us consider an exmple:a students list in a college.
while comming to queue this data structure is used for different type of data. for example:the bank details of a person which contaains differnt type of data.
