Introduction
In this term paper, I have explained important concepts of memory management and compared the memory management system of windows and Linux.
- The memory management system is one of the important parts of the operating system.
- Its basic function is to manage the memory hierarchy of RAM and secondary memory devices.
- There is always a need of more memory than physical memory. Memory management allows this to be done through the concept of virtual memory.
- Virtual memory can be many times larger than the physical memory.
- The most important task of memory management includes allocation and dealloacation of memory to the processes.
Memory management system provides:
- Large Address Space
- Protection
- Memory Mapping
- Physical Memory Allocation for Processes
- Shared Virtual Memory.
Some Important Terms and Concepts
Logical and physical Address
- Logical address is generated by CPU and also called as virtual address.
- Physical address is the address seen by the Memory Unit.
Memory Management Unit
- It is a hardware that maps logical address to physical address.
- Value of relocation register is added to value generated by user process.
Paging
- The logical address space is divided into fixed size blocks called pages. The pages are located at different memory locations in the memory.
- Physical address space is divided into fixed size blocks called frames.
- Address translation is actually done by the MMU (Memory Management System) by using a page table as shown in the figure below.
MMU converts logical addresses to physical addresses that consist of a page frame number and an offset within that page.
Address Translation scheme
Logical address generated by the CPU is divided into two parts-
Page number (p) and page offset (d)
Page number- it contains base address of each page in physical memory.
Page offset- it defines physical address that is sent to memory unit.
Memory Protection
- A protection bit is associated with each frame.
- Valid-invalid bit is added to each entry in the page table.
- If bit is valid it means page is valid and is present in process’s logical address space
- If bit is invalid it means page is invalid and is not present in process’s logical address space.
- If the page is not present, it leads to generate page fault.
Virtual Memory
Virtual addresses are created by the CPU. We require mapping function to implement the concept of virtual memory. Mapping performs address translation, converting virtual address to physical address. Virtual address is the address used to refer a memory location and physical address is the actual memory location.
Memory Compaction
It is the technique of relocating all occupied areas of the memory to one end so as to get a large block of free memory space.
It can be done under three conditions-
- As soon as process terminates.
- When a new job cannot be loaded into memory due to fragmentation.
- At fixed time intervals.
Comparison
1) Data structures
Windows
- Windows uses tree data structure.
- Each node of the tree is called Virtual Address Descriptors (VAD).
- VAD marks each node as free, committed or reserved.
- Committed nodes are those nodes that are currently being used.
- Free nodes are unused nodes.
- Reserved nodes cannot be used until reservation is lifted off.
Linux
- It uses linked list data structure.
- It maintains a list of vm_area_structs.
- This list is searched whenever a page is to be found.
- It also records the range of address, protection mode and the direction in which it grows (up or down).
- If number of entries becomes more than 32, Linux converts linked list into a tree.
- Linux uses data structure depending upon the situation.
2) Distribution of Process Address Space
Windows
- Windows on 32 bit x86 systems can access up to 4GB of physical memory.
- Windows allows each process to have its own 4GB logical address space by using paging.
- The upper 2GB is kept for windows kernel mode.
- The lower 2GB of the address space is reserved for user mode.
Linux
- 3GB of memory space is reserved for user mode
- 1GB is kept for Kernel mode.
3) Paging
Linux uses demand paging with no pre paging
- Linux do not swap the entire process instead uses a lazy swapper.
- It never swaps a page into the memory unless that page is needed.
- Instead of swapping in a whole process, the pager swaps only necessary pages into memory.
- It thus avoids reading pages that will not be used, this decreases swap time and amount of physical memory required.
- To distinguish between the pages that are in memory and are on the disk we use valid and non valid bits.
- If bit is valid it shows that the page is legal and is in the memory and if bit is set to invalid it indicates that it is on the disk.
Linux uses three level paging
Windows uses cluster demand paging
- Pages are brought in the memory when they are needed.
- Instead of bringing pages one by one, eight pages are brought in the memory simultaneously.
- It makes use of working set model.
- Working set is the amount of memory currently assigned to the process.
- It contains the pages that are in the main memory.
- Size of working set can be changed accordingly.
Windows uses Two Level Paging
4) Address structure
Linux
Linear address is broken into four parts:
- Global Directory.
- Middle Directory.
- Page Table
- Offset.
Windows
Address is divided into two parts:
- Page number
- Page offset
5) Page replacement
Linux uses LRU
- Least Recently Used Page Replacement Algorithm (L.R.U.)
- The page that is not used for a long period of time is selected as victim page and is replaced.
- Implemented in two ways- Counters and stack.
- In counters, each page table entry is associated with a time-of-use field. The page with smallest time value is replaced.
- In stack, the page at the bottom is removed and put on the top of the stack. Least recently used is always at the bottom of the stack.
Here is an example of LRU page replacement algorithm.
No. of page faults=12
Windows uses FIFO
- First in First out Page Replacement Algorithm (F.I.F.O.).
- The oldest page is chosen for replacement.
- It suffers from be lady’s anomaly.
- Page fault rate may increase when we increase number of frame.
- It has low performance.
- It has maximum number of page faults.
Here is an example of FIFO page replacement algorithm.
No. of page faults =155)
Windows divides virtual pages into four lists:-
- Modified Page List.
- Stand-by Page List.
- Free Page List.
- Zeroed Page List.
Pages that have been modified are in modified page list. After writing to disk they are stored in standby list. Pages that have not been modified go to stand by list. The modified page list is called dirty list and standby list is called clean list.
Linux divides the pages into four lists:-
- Active List.
- Inactive-dirty List.
- Inactive clean List.
- Free List.
Active pages are on the list 1. If some of the pages are not active, their age decreases and goes down to zero, which means it has to be removed.
Order Now
Download
Analysis,
Pages 3 (621 words)
Save to my list
Remove from my list
Introduction
Windows and Linux, two of the most widely used operating systems, cater to diverse user bases and preferences. Windows, favored by beginners and everyday computer users, stands in contrast to Linux, renowned as the operating system of choice for advanced users and often associated with the realm of hackers. This essay explores the distinctions between these operating systems, focusing specifically on their memory management approaches. Memory management is a critical aspect of an operating system, influencing its efficiency, responsiveness, and overall performance.
Memory Management in Windows
Windows employs a hierarchical memory management system structured as a tree, with each node designated as a Virtual Address Descriptor (VAD).
Don’t use plagiarized sources. Get your custom essay on
“ Divergent Memory Management in Windows & Linux: A Comparative Analysis ”
Get custom paper
NEW! smart matching with writer
These VADs categorize virtual memory nodes as either free, reserved, or committed. In the initial stages of a process, all addresses are marked as free, signifying their availability for commitment to memory or reservation for future use. Prior to utilization, a free address must undergo allocation as either reserved or committed.
Additionally, Windows allocates virtual memory space through paging.
In 32-bit systems, it provides access to a standalone logical address space and physical memory of up to 4GB. The upper 2GB of the address space are allocated for Windows kernel-mode, while the lower 2GB are dedicated to user-mode.
Memory Management in Linux
In contrast, Linux employs a linked list data structure stored in the vm_area_struct structure. This linked list initiates a search whenever a page is located, recording information such as address range, protection mode, and growth direction. If the number of entries surpasses 32, Linux dynamically converts the linked list into a tree data structure based on the prevailing conditions.
Likewise, Linux allocates virtual memory space through paging. Comparable to Windows, a 32-bit Linux system has access to 4GB of physical memory. However, the upper part is allocated with 1GB for kernel-mode, while the lower part reserves 1GB for user-mode.
Page Replacement Systems
One pivotal element in any memory management system is the page replacement mechanism, determining which memory pages to swap out when a new page needs allocation. Windows employs cluster demand paging, where pages are brought into memory as needed, with the system capable of bringing in multiple pages simultaneously. The working set concept, based on the amount of memory assigned in the current process, governs Windows’ page replacement algorithm, which adheres to the «First In, First Out» (FIFO) principle.
Conversely, Linux adopts demand paging, ensuring that only necessary pages are swapped into memory. This approach prevents the inclusion of unused pages, reducing both physical memory consumption and the time required for page swapping. Linux employs valid and non-valid bits to distinguish between pages residing in memory and those on disk. The page replacement algorithm used by Linux is the «Least Recently Used» (LRU) algorithm.
Comparative Analysis and Conclusion
While both Windows and Linux exhibit their respective advantages and disadvantages in the realm of operating systems, their memory management systems play a pivotal role in fulfilling user needs. Windows relies on a tree data structure for virtual memory management, employing the FIFO page replacement algorithm. In contrast, Linux utilizes a linked list structure, implementing the LRU page replacement algorithm.
Despite their differences, both operating systems share similarities in the distribution of process virtual address space through paging. Windows allocates 2GB each for kernel-mode and user-mode in its 32-bit systems, while Linux designates 1GB for each. The efficiency of the page replacement systems significantly influences the overall performance and responsiveness of the operating systems.
As technology advances, the future holds the promise of more intricate memory management systems in both Windows and Linux. Users will continue to seek operating systems that strike a balance between user-friendly interfaces and advanced functionalities, ensuring optimal performance for a diverse range of computing needs.
When exploring the differences between Windows and Linux processes, it’s essential to focus on how each operating system manages these processes. In Windows, the process known as “csrss.exe” handles running the GUI and command line console, reflecting a more centralized approach. On the other hand, Linux utilizes daemon processes for background tasks, resulting in a modular and flexible handling of system processes.
We’ve all encountered the Command Prompt in Windows, a powerful yet often underutilized tool by many users. Linux users, however, are more familiar with the Terminal, a staple of the open-source operating system. The use of command-line interfaces in both systems sheds light on their fundamental differences. Linux’s commands are deeply integrated into the system’s functionality, while Windows offers command-line tools as an alternative to its predominantly graphical user interface.
This divergence isn’t just technical; it speaks volumes about the philosophies driving these operating systems. Whether it’s the stability and customization offered by Linux or the user-friendly approach of Windows, understanding these differences enhances our ability to choose the right tool for our needs. Let’s jump in and dissect what makes Windows and Linux processes tick!
Contents
- 1 Understanding Operating Systems Fundamentals
- 1.1 Key Functionalities of OS
- 1.2 Comparative Overview: Linux vs. Windows
- 1.3 Operating System Architecture Types
- 2 Diving into Core Components
- 2.1 Process Management and Scheduling
- 2.2 Memory and Storage Systems
- 2.3 User Interface Elements: GUI and Command Line
- 3 Security and User Management
- 3.1 User Access Levels: Root vs. Administrator
- 3.2 Security Mechanisms and Best Practices
- 4 Software and Development Ecosystem
- 4.1 Programming Languages & Development Environments
- 4.2 Licensing and Open Source Culture
- 4.3 Role of Community in OS Evolution
Understanding Operating Systems Fundamentals
Operating systems are the backbone of any computer, managing both hardware and software resources. We’ll dive into their key functionalities, compare Linux and Windows, and examine various architecture types.
Key Functionalities of OS
Operating systems (OS) perform several critical tasks:
- Process Management: Handles creation, scheduling, and termination of processes.
- Memory Management: Controls allocation and deallocation of memory.
- File System Management: Organizes storage and retrieval of data on disk.
- Device Management: Interfaces with hardware peripherals.
- Security & Access Control: Protects data integrity and manages user permissions.
These functionalities ensure efficient and secure operation of a computer.
Comparative Overview: Linux vs. Windows
Linux and Windows, while both popular, differ significantly:
Aspect | Linux OS | Windows OS |
Kernel Type | Monolithic Kernel | Hybrid Kernel |
Customizability | Highly Customizable | Limited Customizability |
Source | Open Source | Proprietary |
Market Share (Desktops) | 3% | 80% |
Market Share (Servers) | 80% | 20% |
Linux is open-source and highly customizable, making it popular for servers. Windows is proprietary, offering a user-friendly interface and broad hardware compatibility, making it dominant in the desktop market.
Operating System Architecture Types
Different OS architectures impact system performance and capabilities:
-
Monolithic Kernel: Found in Linux OS, this architecture means the entire operating system runs in kernel mode, leading to high performance but potential stability risks if one component fails.
-
Microkernel: Minimizes code running in kernel mode, enhancing stability and security, but may incur performance overhead.
-
Hybrid Kernel: Used by Windows OS, it combines aspects of both monolithic and microkernel architectures to balance performance and stability.
Understanding these architectures helps us choose the right OS for our needs, balancing performance, security, and reliability. Each architecture has its pros and cons, but they all aim to optimize how the OS interacts with hardware and software.
Diving into Core Components
Exploring how Windows and Linux handle core components helps us understand their differences better. Each system’s approach to processes, memory, and interfaces highlights unique strengths and challenges.
Process Management and Scheduling
Process management varies significantly between Windows and Linux. In Windows, processes are handled by the Windows Task Scheduler, which uses a priority-based scheduling algorithm.
Linux, on the other hand, uses the Completely Fair Scheduler (CFS). This scheduler aims to allocate CPU time fairly among all running processes.
Both aim for efficiency, but they achieve it in different ways:
- Windows Task Scheduler: Prioritizes according to pre-set priorities.
- Linux CFS: Strives for fairness, ensuring no single process dominates CPU time.
Memory and Storage Systems
When it comes to memory and storage management, Windows and Linux again show distinct characteristics. Windows uses a virtual memory system that includes a page file. This file acts as a buffer when the physical memory is full.
Linux uses a different method, utilizing a swap space. Additionally, Linux’s memory management is closely linked with its kernel, allowing dynamic allocation.
Here are some key points:
Windows Memory Management | Linux Memory Management |
Uses a page file | Uses swap space |
Virtual memory system is less dynamic | Kernel-linked dynamic allocation |
User Interface Elements: GUI and Command Line
User interface elements are also distinct in Windows and Linux. Windows heavily relies on its Graphical User Interface (GUI), which is user-friendly and integrated into the core system functionalities.
Conversely, Linux offers both GUI and Command Line Interface (CLI) options, giving users flexibility depending on their preferences or needs.
A breakdown of these differences includes:
- Windows GUI: Integral, consistent, user-focused.
- Linux GUI/CLI: Flexible, choice-driven, suitable for advanced users.
By understanding these core components, we can see how each system caters to different user needs and technical requirements.
Security and User Management
Both Windows and Linux have unique approaches to security and user management, stressing different aspects of accessibility and protection. Understanding these differences can help you decide which system best meets your needs and expectations.
User Access Levels: Root vs. Administrator
In Linux, the root user has unrestricted access to all commands and files in the system. The root account is typically reserved for administrative tasks, similar to the Administrator account in Windows. However, Linux often uses sudo for temporary root privileges, increasing security by limiting the need to log in as root.
Windows relies on User Account Control (UAC) to request permission for administrative tasks, adding a layer of security. While both systems aim to protect critical system areas, Linux’s reliance on the root and sudo could be seen as more straightforward, albeit potentially riskier if mishandled.
Security Mechanisms and Best Practices
Linux is widely praised for its open-source nature, allowing for rapid deployment of security patches and robust community monitoring. Windows, on the other hand, uses a closed-source approach, necessitating reliance on Microsoft for updates. Both operating systems must keep up with security patches to stay protected.
Security-enhanced implementations like SELinux and AppArmor in Linux and Windows Defender and BitLocker in Windows provide advanced protection mechanisms. Security-Enhanced Linux (SELinux) enforces mandatory access controls, while Windows Security Health (SEH) offers similar protections.
Additionally, Linux’s diverse distributions can either fragment or strengthen security based on community support, whereas Windows’ unified platform simplifies security patch deployment but can be slower in responding to threats.
Software and Development Ecosystem
The software and development ecosystems of Windows and Linux differ in their structure and cultural attitudes. Let’s look at programming languages, development environments, licensing practices, and the role of community in shaping both operating systems.
Programming Languages & Development Environments
Windows often emphasizes Visual Studio for development, which many developers find comprehensive. It supports languages like C#, .NET, and C++. Microsoft promotes its own solutions, tailoring environments to integrate seamlessly with Windows systems.
In contrast, Linux offers flexibility with multiple languages such as C, Python, and Java. Popular IDEs include Eclipse, IntelliJ, and Code::Blocks. Many Linux distributions, including Ubuntu and Linux Mint, provide robust repositories for these development tools.
Linux servers dominate the web, giving developers the incentive to develop directly within Linux environments. It offers stability and customization advantages, essential for enterprise solutions.
Licensing and Open Source Culture
Linux thrives in an open-source environment. Created by Linus Torvalds, its UNIX roots ensure it’s free and open to modification. Most Linux distributions, like Fedora and Ubuntu, are available under GPL licenses, encouraging worldwide collaboration.
Windows, developed by Microsoft, operates under proprietary licensing. Users must purchase licenses for both Windows OS and many development tools. While it supports open-source projects, the community is less cohesive compared to Linux.
Linux encourages sharing, improving, and redistributing source code. This culture appeals to those who prefer transparency and collaboration in software development. The freedom to modify and share code can lead to faster innovation and problem-solving.
The Linux community is driven by enthusiasts and developers who contribute to its continuous improvement. Forums, mailing lists, and repositories like GitHub facilitate collaboration. For example, the Linux kernel constantly evolves with contributions from thousands of developers.
Microsoft also fosters a strong developer community. However, it’s more centralized, with Microsoft steering major development directions. Community feedback helps shape updates, but contributions are more restricted compared to Linux.
Linux users often participate in the evolution of distributions like Red Hat and Fedora, enhancing features to meet evolving needs. This grassroots approach ensures rapid adaptation and troubleshooting.
Recognizing the distinct development philosophies offers insights into choosing the right platform. By grasping these differences, we can better align our needs with the most suitable operating system.
Все чаще и чаще натыкаюсь на восторженные отзывы о том, что винда начинает в разы, если не на порядки, быстрее работать при установке системы на SSD. Объясняю для рядовых пользователей (те, кто в теме, они — в теме, такая вот тавтология).
С незапамятных времен, когда 640 Кб хватало на все про все, бу-га-га, было придумано использование файла подкачки на жестком диске для увеличения объема доступной оперативной памяти. Кстати, в те времена его (файла подкачки) использование было весьма оправдано, проверено практикой, однако! Так вот в современных системах остался рудимент — НЕОБХОДИМОСТЬ наличия этого самого файла подкачки. А настройки систем (и винды и Linux) по умолчанию таковы, что даже при наличии весьма значительного объема свободной оперативной памяти, эти самые системы начинают активно использовать файл подкачки. В Linux по умолчанию стоит значение 60% (привет идиоту, который привнес данную дикость из виндо-мира! повбивав бы…). Т.е. когда отъедается больше 40% оперативы, Linux начинает лезть в файл подкачки. Если вы таки думаете, что в винде это значение сильно отличается, то какого черта тогда так подскакивает производительность винды при установке SSD? Объясните себе, мне не надо, я вообще нужный параметр в 0 выставляю у себя.
А самое грустное — это именно НЕОБХОДИМОСТЬ в файле подкачки на ядреном уровне, без оного возможны все и всяческие чудесатости. И в винде, и в Linux-е. Про другие системы я не буду говорить, ибо не копал в эту сторону достаточно глубоко. Вот такие вот пироги.
И вообще любой улучшайзинг винды начинается с оптимизации этого самого файла подкачки — сколько себя помню, вчегда так было. Так есть. И так, видимо, будет во веки веков. Аминь!
ЗЫ. Надеюсь, из Linux-а все-таки этот дебилизм таки выкинут.
ЗЫЫ. Чегой-то как-то сильно многабукав получилось, я удивлен.
Сравнительная таблица возможностей ОС Windows и Linux
№ п/п |
Сравниваемые возможности, характеристики или |
WINDOWS |
LINUX |
Условия существования (для LINUX) |
1. |
Быстродействие ПК. |
Стандартное (в соответствии с типом микропроцессора) |
В несколько раз выше (например, 486 превращается в Pentium II) |
При работе с консольной версией, без KDE или GNOM. |
2. |
Инсталляция и установка ОС. |
Стандартная |
Проще и быстрее, чем Windows. |
Зависит от выбранной версии ОС, возможностей |
3. |
Настройка ОС |
Обычная |
Позволяет управлять любыми настройками ОС вплоть до |
Определяется уровнем знания системы. |
4. |
Необходимость работы в командной строке |
Стандартная |
В среднем, несколько чаще , чем в Windows. |
При работе без установки графических KDE или GNOM. |
5. |
Наличие программных приложений |
Много |
Достаточно много |
Просто многие из них менее известны и популярны. |
6. |
Особенности приложений для офиса |
Как правило, пакет состоит из нескольких приложений, |
Имеются приложения , которые реализованы на базе одной |
|
№ п/п |
Сравниваемые возможности, характеристики или |
WINDOWS |
LINUX |
Условия существования (для LINUX) |
7. |
Надежность и устойчивость в работе. Защита информации. |
Низкая, исключая сетевые версии |
Высокая. Самопроизвольные отказы в работе исключены. Практически не подвержена воздействию компьютерных |
Во многом, определяется уровнем подгот овки пользователя. |
8. |
Совместимость ОС |
Создано большое количество фи льтров и утилит для прервода |
Можно: 1) Linux сеансы MS-DOS; 2) запускать стандартный NC; 3) запускать Windows- приложения (например, |
|
9. |
Получение помощи и поддержки. |
Существует служба поддержки |
Можно обратиться за помощью к тематическим серверам, |
|
10. |
Интерфейс пользователя |
Является универсальным для всех версий ОС. |
Можно подобрать на свой вкус и цвет . |
Определяется уровнем подгот овки пользователя. |
11. |
Русифицированные дистрибутивы ОС. |
Широко распространены. |
Поддаются русификации далеко не все. |
|
12. |
Стоимость ОС |
В зависимости от версии. |
Многие версии ОС можно скачать бесплатно в сети Internet. |
|
13. |
Перспективы развития |
Windows Vista вынудит пользователей перейти на Linux |
Расходы по переводу рабочих превысят затраты по |
Это, в свою всерьез задуматься открытой |
№ п/п |
Сравниваемые возможности, характеристики или |
WINDOWS |
LINUX |
Условия существования (для LINUX) |
14. |
Графические среды (Интерфейс пользователя). |
Каждая новая система от Microsoft (например, более требовательна к ресурсам компьютера,(чем, |
На самом деле KDE и GNOME (Гном) — это нечто |
Linux не привязан к графическому интерфейсу |
15. |
Файловые менеджеры. |
Чем больше количество |
Чем меньше разнообразных Прежде всего, файловые менеджеры имеют узкую специализациюработают с файлами. (Midnight Commander, Krusader и др.) |
Совершенствуя только те функции, которые |
16. |
Работа с ОС без инсталяции. |
Нет аналогов |
KNOPPIX — это собрание готовых программ |
KNOPPIX можно использовать как |
№ п/п |
Сравниваемые возможности, характеристики или |
WINDOWS |
LINUX |
Условия существования (для LINUX) |
18. |
Открытость ОС |
Модульность построения обеспечивает дальнейшее развитие |
Имеются версии (например, KNOPPIX), которые настоящими (open source) открытыми Исходный код для KNOPPIX-специфичных пакетов |
Эти версии можно использовать как основу для |
19. |
Настройка раскладки клавиатуры. |
Маловариантная , но простая . |
Многовариантная, но сложная и ненадежная. |
На примере версии Mandrake Linux. |
20. |
Русификация ОС |
В русифицированной версии ОС в полном |
Как правило, не является полной. |
|
21. |
Архитектура ОС |
По устанавливается |
На диске создается три независимых раздела (см.рис.1): — — — |
Пользователь ПК имеет возможность так настроить ПК, что |
Архитектура ОС Windows и Linux
Рис.1.
Выводы
LINUX является более
продуманной, систематизированной и качественно организованной системой, чем
WINDOWS. Это, прежде всего, обусловлено тем, что LINUX создавался с учетом трех
основных критериев работы ПК:
1)
максимального быстродействия;
2)
высокой надежности;
3)
строжайшей экономии
ресурсов ПК.
В то время как WINDOWS (традиционно,
с появлением каждого нового образца):
1) стремится
занять как можно больше места на диске;
2)
требует все больше и больше оперативной памяти;
3) заставляет
пользователя покупать и устанавливать на ПК все больше и больше дополнительного
оборудования (абсолютно не интересуясь, необходимо это для работы пользователю
или нет);
4)
часто переустанавливать систему
из-за сбоев и т.д.
LINUX :
1)
позволяет работать с вдвое болдьшей скоростью и аналогичным
графическим интерфейсом на старом оборудовании снебольшим количеством
оперативной памяти;
2)
устанавливается быстро и
очень компактно;
3)
при грамотной установке и
обращении может работать без сбоев годами.
Справочная информация
В процессе обработки данных
на ПК постоянно возникают ситуации, когда не хватает такого важного ресурса как
память (оперативная, дисковая). Возникает необходимость временно занять
(“одолжить”) какой-то объем того или иного вид памяти, который в настоящий
момент свободен.
1.
Заем оперативной памяти у
дисковой.
2.
Наоборот.
3.
Использование буфферной
области в оперативной памяти.
1.
Виртуальная память
Память, имитирующая
(эмулирующая) оперативную путем использования как физической оперативной, так и
дисковой памяти. Поэтому емкость виртуальной памяти получается больше реальной.
Когда для работы открытых приложений физической оперативной памяти не
хватает, приложения (программы),не использующие в этот момент микропроцессор,
выгружаются на диск в файл подкачки (свопинга). Когда одному из таких
приложений передается управление, то оно вновь загружается в оперативную память),о
может привести, а может и не привести к выгрузке другого, пассивного в данный
момент приложения). Так приложения и циркулируют между диском и оперативной
памятью. Поддержка виртуальной памяти позволяет одновременно открыть большее
количество приложений, но выгрузка/загрузка (свопинг/подкачка) снижают
производительность компьютера. Свопинг ощущается при переключении с одного
приложения на другое, когда оперативная память перегружена – интенсивную работу
жесткого диска и задержку переключения невозможно не заметить.
Файл
свопинга (swap file)
Файл подкачки, в котором хранится содержимое виртуальной памяти. Он
обычно находится в основной папке системы. Не удивляйтесь его большой длине.
2.
Виртуальный диск
Диск, который
имитируется с помощью некоторой области оперативной памяти. Ему присваивается
имя накопителя, и доступ к такому диску организуется, как к реальному.
Виртуальный диск обладает высоким быстродействием, но не может хранить данные
после выключения питания.
Другим способом
повышения быстродействия диска, который все чаще используется, является
КЭШИРОВАНИЕ.
3.
Кэширование дисков
Процесс, в ходе которого в оперативной памяти
создается буферная область («перевалочная база») для хранения данных, считанных
с дисков и подлежащих записи на диски. Кэшировать при чтении удается как
магнитные, так и компакт – диски. Кэширование при записи используется только
для магнитных дисков.
В случае поступления
запроса на чтение с диска сначала проверяется, не находятся ли требуемые данные
в кэше. Если они там имеются, обращение к диску не производится. Используя
механизм кэширования можно обойтись однократным чтением с дисков тех данных,
которые требуются программе многократно.
Современные средства кэширования способны считывать данные с диска с
упреждением, асинхронно по отношению к выполнению программы, выдающей запросы
на чтение. Это увеличивает эффект кэширования. Для хранения данных, считанных в
таком режиме, выделяется отдельная зона памяти, называемая буфером упреждающего
чтения.
Данные, посылаемые на диск, могут сначала заноситься в кэш.
Переписываются они на диск позже – когда освободятся необходимые для этого
технические средства. В результате получается так называемая отложенная запись.
Оперативная память функционирует значительно быстрее дисков, и именно
поэтому кэширование обеспечивает повышение быстродействия дисков.
FAT
Таблица размещения файлов, содержащая всю информацию об их расположении
на диске. Состоит из последовательности элементов, каждый из которых
соответствует КЛАСТЕРУ.
КЛАСТЕР представляет собой единицу распределения дисковой памяти,
которая может выделяться файлу или папке. Для размещения файлов и папок всегда
выделяется целое число кластеров. Кластер представляет собой один или несколько
смежных секторов.
В свою очередь СЕКТОР – участок дорожки диска, хранящий порцию данных,
которая может быть прочитана или записана за один прием (сеанс обмена
информацией). Таким образом, сектор тоже является единицей хранения информации
на диске. Размер сектора составляет 512 байтов.
В Windows 9х (начиная с Windows 95 OSR2) наряду с FAT16 появилась FAT32.
Ее основными особенностями являются следующие:
·
BOOT RECORD (загрузочная запись) занимает не один, а два сектора;
·
Имеются две полные
резервные копии этой записи;
·
Корневой каталог может
размещаться в любом месте диска, и он ограничен 65 535 элементами;
·
Допускается использование
резервной копии FAT вместо основной;
·
Некоторое увеличение
размера системной области диска и незначительное (~ 5%) снижение
быстродействия, из-за чего время выполнения приложений может увеличиваться (~1%).