COSC65 | Finals Flashcards
refers to the process of designing and implementing the components and protocols that manage the interaction between a computer system and its external environment, including peripherals such as keyboards, monitors, disk drives, network interfaces, and other devices
Input/Output System Design
data or instructions entered into the computer system for processing
input
processed data or results produced by the computer system and presented to the user or another system
output
input or output devices that are connected to computer
peripheral devices
these devices are designed to read information into or out of the memory unit upon command from the CPU and are considered to be the part of computer system
peripheral devices
types of peripheral devices
input peripherals
output peripherals
input-output peripherals
a specialized software that operates a particular computer-connected device
device driver
it offers a software interface to the hardware allows operating systems and other computer applications to access hardware functionalities
device driver
Understanding device driver development
- Know the equipment
- Write the driver code
- Initialize the hardware
- Begin data communication with the hardware
- Control data communication
- Test the driver and debug it
Types of Device Driver
Kernel-mode Device Driver and User-mode Device Driver
it includes some generic hardware that loads with the operating system as part of the OS these are BIOS, motherboard, processor, and some other hardware that are part of kernel software
Kernel-mode Device Driver
it includes the minimum system requirement device drivers for each operating system
Kernel-mode Device Driver
other than the devices which are brought by the kernel for working the system the user also brings some devices for use during the using of a system that devices need device drivers to function those drivers
User-mode Device Driver
the user needs any plug-and-play action that comes under this
User-mode Device Driver
it works by using a combination of hardware and software to map the physical addresses used by a program to virtual addresses
virtual memory
it allows the operating system to swap data in and out of physical memory as needed, providing the illusion of a larger memory space
virtual memory
Virtual memory separates the logical memory space used by programs from physical memory, allowing each program to have its own virtual address space
Address space separation
Virtual memory only loads the portions of a program that are needed into physical memory, reducing the amount of physical memory required and allowing for more efficient use of resources
Demand paging
When physical memory becomes full, virtual memory uses this algorithm to determine which pages to swap out to disk in order to make room for new pages
Page replacement
Virtual memory uses this to map virtual addresses to physical addresses, allowing the operating system to manage the mapping between virtual and physical memory
Page tables
Virtual memory provides this by assigning different levels of access permissions to different pages of memory, preventing programs from accessing memory that they are not authorized to access
Memory protection
Virtual memory allows files to be mapped directly into memory, enabling efficient file I/O operations and simplifying memory management for the operating system
Memory-mapped files
Virtual memory uses this technique to optimize memory usage by allowing multiple processes to share the same memory pages until one of them attempts to modify the page, at which point a copy of the page is made
Copy-on-write
PRINCIPLES OF VIRTUAL MEMORY
- Address space separation
- Demand paging
- Page replacement
- Page tables
- Memory protection
- Memory-mapped files
- Copy-on-write
it is a memory management technique used by operating systems to optimize memory usage
Demand Paging
in this, only the required pages of a program are loaded into memory when needed, rather than loading the entire program at once
Demand Paging
it helps to reduce memory wastage and improve overall system performance
Demand Paging
it is an important part of virtual memory management, and it helps the OS to decide which memory page can be moved out, making space for the currently needed page
page replacement algorithm
the ultimate objective of this is to reduce the number of page faults
page replacement algorithm
it is the simplest page replacement algorithm
first in, first out (FIFO)
in this algorithm, the operating system keeps track of all pages in the memory in a queue, the oldest page is in the front of the queue
first in, first out (FIFO)
When a page needs to be replaced page in the front of the queue is selected for removal
first in, first out (FIFO)
it happens when a running program accesses a memory page that is mapped into the virtual address space but not loaded in physical memory
page fault
it refers to a set of techniques and hardware/software features used in computer systems to control and manage access to memory resources
Memory Protection Mechanisms
under of Memory Protection Mechanisms
- Memory Segmentation
- Memory Paging
- Virtual Memory
- Memory Protection Rings
- Address Space Layout Randomization (ASLR)
- Executable Space Protection (NX bit)
- Memory Access Violation Handling
it divides the computer’s memory into logical segments, each with its own base address and size
Memory Segmentation
it can have different access permissions, such as read-only, read-write, execute, or no access
segments
it breaks memory into fixed-size blocks called pages
Memory Paging