系统资源:(System Resource:)足智多谋是一种普遍具有吸引力的特质,足智多谋不等于拥有大量资源可供使用,而是能够最大限度地发挥自己的潜力或在任何给定时间提供给他或她的稀缺资源。这不仅在现实世界中如此,而且在硬件以及我们在日常生活中使用的软件中也是如此。从长远来看,即使许多人都渴望、幻想和渴望以性能为导向的车辆,但并不是每个人最终都会购买跑车或运动自行车,即使你问大多数人为什么他们有能力购买没有买这样的车,他们的回答是“不实用”。
现在,这意味着即使作为一个社会,我们的选择也倾向于效率。具有最高大众吸引力的车辆并不是极具吸引力,但它们提供的是成本、燃油经济性和维护方面的效率。因此,如果仅仅编辑一个简单的电子表格(如今也可以在智能手机上完成)或者简单地安装最昂贵的游戏或软件也不会这样做,那么简单地拥有最昂贵的硬件并不会削减它。我们一打开它就会冻结。什么使事情变得高效的答案是能够以非常智能的方式管理可用资源,从而以最少的能源和资源支出为我们提供最大的性能。
什么是系统资源?(What is a system resource?)
对此的一个简短而清晰的定义是,操作系统利用所有硬件和软件尽其所能有效执行用户请求的任务的能力。
由于技术的快速进步,计算机系统的定义已经超越了一个带有一些闪烁灯的盒子,上面连接着键盘、屏幕和鼠标。智能手机、笔记本电脑、平板电脑、单板计算机等已经彻底改变了计算机的概念。但是,为所有这些现代奇迹提供动力的基础技术在很大程度上保持不变。也不会很快改变的东西。
让我们深入研究一下系统资源是如何工作的?就像(Just)我们打开计算机时的任何资源一样,它会验证并验证与其连接的所有当前现有硬件组件(hardware components),然后将其登录到Windows 注册表(Windows Registry)中。在这里,存在有关容量和所有可用空间、RAM量、外部存储介质等的信息。
与此同时,操作系统也会启动后台服务和进程。这是第一次立即使用可用资源。例如,如果我们安装了防病毒程序或任何需要定期更新的软件。这些服务在我们打开 PC 时立即启动,并开始在后台更新或扫描文件,当然是为了保护和保持我们的更新。
资源请求可以是应用程序以及系统需要的服务,或者是程序根据用户请求运行的服务。因此,当我们打开一个程序时,它会检查所有可用于运行的资源。在检查是否满足所有要求后,程序按预期工作。但是,当不满足要求时,操作系统会检查哪些应用程序占用了该稀缺资源并尝试终止它。
理想情况下,当应用程序请求任何资源时,它必须将其归还,但通常情况下,请求特定资源的应用程序最终在完成任务时没有提供所请求的资源。这就是为什么有时我们的应用程序或系统会冻结的原因,因为某些其他服务或应用程序正在占用它在后台运行所需的资源。这是因为我们所有的系统都带有有限的资源。所以,管理它是最重要的。
不同类型的系统资源
硬件或软件使用系统(System)资源相互通信。当软件想要将数据发送到设备时,例如当您想要将文件保存到硬盘驱动器或当硬件需要注意时,例如当我们按下键盘上的键时。
我们在操作系统时会遇到四种类型的系统资源,它们是:
- 直接内存访问 (DMA) 通道
- 中断请求线 (IRQ)
- 输入和输出地址
- 内存地址
当我们按下键盘上的一个键时,键盘想要通知CPU一个键已被按下,但由于CPU已经忙于运行其他进程,现在我们可以停止它,直到它完成手头的任务。
为了解决这个问题,我们必须实现一个叫做中断请求线(IRQ)(interrupt request lines (IRQ))的东西,它的作用就像它听起来像中断CPU一样,让CPU知道有一个新的请求来自键盘,所以键盘在分配给它的IRQ线上放置一个电压。该电压用作CPU的信号,表明存在需要处理的请求的设备。
操作系统将内存视为一长串可用于保存数据和指令的单元,有点像一维电子表格。将内存地址想象(Think)为剧院中的座位号,无论是否有人坐在每个座位上,都会为每个座位分配一个编号。坐在座位上的人可能是某种数据或指令。操作系统不以姓名来指代该人,而仅以座位号来指代该人。例如,操作系统可能会说,它想打印内存地址 500 中的数据。这些地址最常以段偏移形式的十六进制数字显示在屏幕上。
输入输出(Input-output)地址也简称为端口,CPU可以用来访问硬件设备,就像它使用内存地址访问物理内存一样。主板上(address bus on the motherboard)的地址总线有时承载内存地址,有时承载输入输出地址。
如果地址总线已设置为携带输入输出地址,则每个硬件设备都会监听该总线。例如,如果CPU要与键盘通信,它会将键盘的Input-Output地址放在地址总线上。
一旦地址被放置,CPU会向所有在地址线上的输入输出设备宣布地址。(Input-Output)现在所有的输入输出控制器都在监听它们的地址,硬盘控制器说不是我的地址,软盘控制器说不是我的地址,但键盘(keyboard)控制器说是我的,我会回应。因此,这就是当按下一个键时键盘(keyboard)最终与处理器交互的方式。考虑工作方式的另一种方式是总线上的输入-输出(Input-Output)地址线的工作方式很像旧的电话线——所有(All)设备都能听到地址,但最终只有一个设备响应。
硬件和软件使用的另一个系统资源是直接内存访问(Direct Memory Access)( DMA ) 通道。这是一种快捷方法,可以让输入输出设备完全绕过CPU直接将数据发送到内存。某些设备(例如打印机)被设计为使用DMA通道,而其他设备(例如鼠标)则不是。DMA通道不像以前那样受欢迎,这是因为它们的设计使它们比新方法慢得多。但是,较慢的设备(如软盘驱动器、声卡和磁带驱动器)可能仍使用DMA通道。
所以基本上硬件设备使用中断(Interrupt)请求来引起(Requests)CPU的注意。软件通过硬件设备的输入输出地址调用硬件。该软件将内存视为硬件设备,并使用内存地址对其进行调用。DMA通道在硬件设备和内存之间来回传递数据。
推荐:(Recommended:) 改善 Windows 10 慢速性能的 11 条技巧(11 Tips To Improve Windows 10 Slow Performance)
因此,这就是硬件与软件通信以有效分配和管理系统资源的方式。
系统(System) 资源(Resources)中可能发生的错误是什么?
系统(System)资源错误,它们是最糟糕的。在我们使用计算机的那一刻,一切都很好,只需要一个资源匮乏的程序,双击该图标并告别正常运行的系统。但是为什么会这样,可能是糟糕的编程,但它变得更加棘手,因为即使在现代操作系统中也会发生这种情况。任何被执行的程序都需要通知操作系统它可能需要运行多少资源并指定它可能需要该资源多长时间。有时,由于程序运行的过程的性质,这可能是不可能的。这称为内存泄漏(memory leak)。但是,该程序应该归还它之前请求的内存或系统资源。
如果没有,我们可能会看到如下错误:
- “您的计算机内存不足(Your computer is low on memory)”
- “系统(System)资源严重不足”
- “系统资源不足(Insufficient),无法完成请求的服务”
和更多。
我们如何修复系统资源(System Resource)错误?
3 个神奇键“Alt”+“Del”+“Ctrl”的组合,对于经常遇到系统死机的人来说,这应该是必备的。按下它会直接将我们带到任务管理器(Task Manager)。这让我们可以查看各种程序和服务使用的所有系统资源。
通常情况下,我们通常能够找出哪个应用程序或程序正在消耗大量内存或进行大量磁盘读写。成功定位后,我们可以通过完全结束有问题的应用程序或卸载程序来收回丢失的系统资源。如果它不是任何程序,那么我们可以搜索任务管理器的服务部分,这将显示哪个服务在后台默默地消耗或占用资源,从而抢夺了这个稀缺的系统资源。
有些服务会在操作系统启动时启动,这些称为启动程序(startup programs),我们可以在任务管理器的启动部分找到它们。本节的美妙之处在于,我们不必实际手动搜索所有需要大量资源的服务。相反,此部分很容易显示具有启动影响等级的系统影响服务。因此,使用它我们可以确定哪些服务值得禁用。
如果计算机没有完全冻结或只是某些应用程序被冻结,上述步骤肯定会有所帮助。如果整个系统完全冻结怎么办?在这里,我们将呈现没有其他选项的任何键都不起作用,因为所有操作系统都被冻结,因为它运行所需的资源不可用,但要重新启动计算机。如果它是由于行为不端或不兼容的应用程序引起的,这应该可以解决冻结问题。在检测到导致此问题的应用程序后,我们可以继续卸载有问题的应用程序。
有时即使上述步骤也没有多大用处,如果系统仍然挂起,尽管上述详细过程。有可能是硬件相关问题。特别是在这种情况下,随机存取存储器 (RAM)(Random Access Memory (RAM))可能存在问题,我们将不得不访问系统主板上的RAM插槽。如果有两个RAM模块,我们可以尝试分别使用两个 RAM 运行系统,(RAM)以确定哪个RAM出现故障。如果检测到RAM有任何问题,更换有故障的RAM将最终解决系统资源不足导致的冻结问题。
结论
有了这个,我们希望您了解什么是系统资源,任何计算设备中存在哪些不同类型的系统资源,我们在日常计算任务中会遇到什么样的错误,以及我们可以处理的各种程序承诺成功解决系统资源不足的问题。
What is a System Resource? | Different Types of System Resources
System Resource: Being resourceful is a universally attractive trait, what resourceful does not equal to is having a lot of resources at one’s disposal but the ability to maximize one’s potential or the scarce resources available to him or her at any given time. This is not only true in the real world but also in hardware as well as the software we have come to use in our day to day life. To put things in perspective, even though performance-oriented vehicles are desired, fantasized, and craved by many not everyone will end up buying a sports car or a sports bike even if they had the means to if you ask most of the people why they did not buy such a vehicle their reply would be “it’s not practical”.
Now, what it means is that even as a society our choices skew towards efficiency. The vehicles that have the highest mass appeal aren’t extremely attractive but what they offer is efficiency in terms of cost, fuel economy and maintenance. So simply having the most expensive hardware won’t cut it if it draws a lot of power to just edit a simple spreadsheet which can also be done on a smartphone these days or simply installing the most expensive game or software won’t do either if it freezes as soon as we open it. The answer to what makes something efficient is the ability to manage the available resources in a very smart way that gives us the maximum performance for the least amount of energy and resource expenditure.
What is a system resource?
A short and crisp definition of this would be, the ability of the operating system to efficiently carry out the user-requested tasks utilizing all of the hardware and software to the best of its ability.
Due to the rapid advancements in technology the definition of a computer system has moved beyond a box with some blinking lights that have keyboard, screen, and mouse attached to it. Smartphones, laptops, tablets, single board computers, etc. have completely shifted the idea of a computer. But, the underlying fundamental technology that powers all of these modern marvels have largely remained the same. Something which won’t change anytime soon either.
Let’s dig deeper into how does a system resource work? Just like any resource the moment we turn on our computer, it verifies and validates all the current exiting hardware components connected to it, which then gets logged into the Windows Registry. Here, the information on the capacities and all the free space, amount of RAM, external storage media, etc is present.
Along with this, the operating system starts the background services and processes as well. This is the first immediate use of the resources available. For eg., if we have installed an antivirus program or any software that needs updating regularly. These services start right when we turn on the PC, and start updating or scanning files in the background to of course to protect and keep us update.
A resource request can be a service that an application, as well as the system, needs or for programs to run upon user request. So, the moment we open a program, it goes checking for all the resources available for it to run. Upon checking if all the requirements are met the program works just as intended. However, when the requirement is not met, the operating system, checks which apps are hogging on that scare resource and tries to terminate it.
Ideally, when an application requests for any resource, it has to give it back but more often than not, the applications that requested specific resources end up not giving the requested resource upon completing the task. This is why sometimes our application or system freezes because some other service or application is taking away the required resource for it to run in the background. This is because all of our systems come with a limited amount of resources. So, managing it is of prime importance.
Different types of System Resources
A System resource is used by either hardware or software to communicate with each other. When software wants to send data to a device, such as when you want to save a file to a hard drive or when the hardware needs attention, such as when we press a key on the keyboard.
There are four types of system resources we will be encountering while operating the system, they are:
- Direct Memory Access (DMA) channels
- Interrupt request lines (IRQ)
- Input and Output addresses
- Memory addresses
When we press a key on the keyboard, the keyboard wants to inform the CPU that a key has been pressed but since CPU is already busy running some other process there is now we can stop it till it completes the task at hand.
To tackle this we had to implement something called interrupt request lines (IRQ), it does exactly what it sounds like it interrupts the CPU and lets the CPU know that there is a new request that has come up from say the keyboard, so the keyboard places a voltage on the IRQ line assigned to it. This voltage serves as a signal for the CPU that there is a device that has a request which needs processing.
An operating system relates to memory as a long list of cells that it can use to hold data and instructions, somewhat like a one-dimensional spreadsheet. Think of a memory address as a seat number in a theatre, each seat is assigned a number regardless of whether someone is sitting in it or not. The person sitting in a seat could be some kind of data or instruction. The operating system does not refer to the person by the name but only by the seat number. For example, the operating system might say, it wants to print data in memory address 500. These addresses are most often displayed on the screen as a hexadecimal number in the segment offset form.
Input-output addresses which are also simply called ports, the CPU can use to access hardware devices in much the same way it uses memory addresses to access physical memory. The address bus on the motherboard sometimes carries memory addresses and sometimes carries input-output addresses.
If the address bus has been set to carry input-output addresses, then each hardware device listens to this bus. For example, if the CPU wants to communicate with the keyboard, it will place the Input-Output address of the keyboard on the address bus.
Once the address is placed, CPU announces the address to all if the Input-Output devices that are on the address line. Now all input-output controllers listen for their address, hard drive controller says not my address, floppy disk controller says not my address but keyboard controller says its mine, I’ll respond. So, that’s how the keyboard ends up interacting with the processor when a key is pressed. Another way to think about the way work is Input-Output address lines on the bus work much like an old telephone party line – All devices hear the addresses but only one responds ultimately.
Another system resource used by hardware and software is a Direct Memory Access (DMA) channel. This is a shortcut method that lets an input-output device send data directly to memory bypassing the CPU completely. Some devices such as the printer are designed to use DMA channels and others such as the mouse are not. DMA channels are not as popular as they once were this is because their design makes them much slower than newer methods. However, slower devices such as floppy drives, sound cards, and tape drives may still use DMA channels.
So basically hardware devices call the CPU for attention using Interrupt Requests. The software calls hardware by the input-output address of the hardware device. The software looks at a memory as a hardware device and calls it with a memory address. DMA channels pass data back and forth between the hardware devices and memory.
Recommended: 11 Tips To Improve Windows 10 Slow Performance
So, that’s how the hardware communicates with software to allocate and manage system resources efficiently.
What are the errors that can occur in System Resources?
System resource errors, they are the worst. One moment we are using the computer everything is going fine all it takes is one resource-hungry program, double click that icon and say goodbye to a system that works. But why is that though, bad programming possibly but it gets even more tricky because this happens even in the modern operating systems. Any program that gets executed needs to inform the operating system what amount of resources that it may need to run and specify how long it may need that resource. Sometimes, that may not be possible due to the nature of the process the program runs. This is called the memory leak. However, the program is supposed to give back the memory or the system resource that it requested earlier.
And when it doesn’t we may see errors like:
And more.
How can we fix System Resource Errors?
A combination of 3 magical keys ‘Alt’ + ‘Del’ + ‘Ctrl’, this should be a staple for anyone who faces a frequent system freezes. Pressing this takes us directly to the Task Manager. This lets us view all the system resources utilized by various programs and services.
More often than not we would be able to usually find out which application or program is consuming a lot of memory or making a high amount of disk reads and writes. Upon successfully locating this we would be able o take back the lost system resource by either ending the problematic application altogether or by uninstalling the program. If it is not any program it would be beneficial for us to go searching into the services section of the task manager that would reveal which service is consuming or taking up resources silently in he background thus robbing of this scarce system resource.
There are services that start when the operating system starts these are called startup programs, we can find them in the startup section of the task manager. The beauty of this section is that we don’t have to actually do a manual search for all of the resource-hungry services. Instead, this section readily displays the system impacting services with a startup impact rating. So, using this we can determine which services are worth disabling.
The above steps would definitely help if the computer doesn’t fully freeze or just certain application is frozen. What if the whole system is frozen completely? Here we would be rendered with no other options none of the keys are function as all of the operating system is frozen due to unavailability of the required resource for it to run but to restart the computer. This should fix the freezing issue if it was caused due to a misbehaving or non-compatible application. Upon detecting which application caused this we can go ahead and uninstall the problematic application.
There are times that even the above steps won’t be of much use if the system keeps hanging despite the above-detailed procedure. Chances are that it could be a hardware related issue. Especially, it could be some issue with the Random Access Memory (RAM) in this case, we will have to access the RAM slot in the motherboard of the system. If there are two modules of RAM, we can try running the system with one RAM individually of the two, to figure out which RAM is at fault. If any issue is detected with the RAM, replacing the faulty RAM would end up solving the freezing issue caused by low system resources.
Conclusion
With this, we hope you understood what system resource is, what are the different types of system resources that exist in any computing device, what kind of errors we can come across in our day-to-day computing tasks, and various procedures we can undertake to fix the low system resource issues successfully.