Review day2 Flashcards
abstract data type (ADT)
An abstract data structure specifies what operations can be performed on the data. For example, in a stack, the abstract operations might include push, pop, and peek, but how these operations are implemented (e.g., using an array or a linked list) is not specified.
Example of ADTs
- Stack
- Queue
3.List
Benefits of using ADTs
1.Modularity (promote modular code design by separating the interface)
2.Maintainability (easier to modify code)
3.Reusability (can be reused across different applications)
Stack
A collection that follows the Last In, First Out (LIFO) principle
Queue
A collection that follows the First In, First Out (FIFO) principle
List
A collection that represents an ordered sequence of elements
System resources
- CPU
- RAM (memory)
- Secondary Storage
- Bandwidth (The capacity of the system to transfer data)
- Screen Resolution
- Sound Processor
- GPU
- Cache (Small, fast memory close to the CPU to speed up frequent operations)
- Network Connectivity (Access to LAN/WAN/Internet)
Operating System Functions
- Application Interface
- Device/Peripheral Interface
- CPU Management
- Memory Management
- File Management
- Provide User Interface
Application Interface
Allows different software applications to communicate and interact with each other
Device/Peripheral Interface
Act as the translator in communication between the operating system and the device
CPU Management
An operating system must decide which jobs the CPU is working on.
Memory Management (Primary)
Memory is allocated to each program or process that is running.
Memory Management (Virtual)
If primary memory runs short, hard drive space
may be used as virtual memory. The OS handles
pages going from RAM to HDD and back.
File Management
The OS manages the files on a computer’s secondary storage (HDD/SSD).
Provide User Interface
The OS must provide a way for the user to interact with the data and programs.
Resource Management Techniques
1.scheduling
2.policies
3.multitasking
4.virtual memory
5.paging
6.interrupt
7.polling
Scheduling
Assigning work to resources, controlling and prioritizing what is sent to the processor.
Policies
Restricted access/security
multitasking
Computer handles multiple tasks at once by quickly switching between them.
virtual memory
If primary memory runs short, hard drive space
may be used as virtual memory.
paging
Paging is the act of copying pages from virtual memory storage into main memory when needed
interrupt
An interrupt is a message sent to the CPU to get its attention, usually because something needs to be handled right away.
polling
Polling is when the CPU keeps checking a device over and over to see if it needs attention.