Basic concepts of linux OS

Source: Internet
Author: User


Some basic concepts of linux OS 1. what is OS? Www.2cto.com is a simple and good question. But if I really want to answer it in a slightly formal official language or text, can I really make it clear? Well, I will answer the question in my own language first. Go to the official definition page. My own answer: OS is a software that can be managed and reasonably allocated computer resources. Official answer: the Operating System (OS) is a computer program for managing computer hardware and software resources. It is also the kernel and cornerstone of the computer System. The operating system needs to handle basic transactions, such as managing and configuring memory, prioritizing supply and demand of system resources, controlling input and output devices, operating networks, and managing file systems. The operating system also provides an operation interface for users to interact with the system. (Baidu Baike's answer) an explanation from other places: the operating system is the most important system software on the computer. It manages various physical resources, it also provides various abstract interfaces for applications to use these physical resources. From the perspective of applications, the operating system provides a unified virtual machine, which does not have the specific details of various machines, only logical concepts such as process, file, address space, and inter-process communication are available. This abstract virtual machine makes application development relatively easy: developers only need to interact with various logical objects in the virtual machine, rather than understanding the specific details of various machines. In addition, these abstract logical objects allow the operating system to easily isolate and protect various applications. (I think this is a great answer) www.2cto.com 2. How does the application perform I/O operations on the data on the storage device? As mentioned above, "the operating system provides a unified virtual machine... and other logical concepts ". Therefore, an application only needs to perform I/O operations on a logical concept. This logical concept is "File ". When the application needs to perform I/O on this data, it only needs to read or write the one-dimensional address space of the "File, the relationship between the address space and the storage block on the storage device is maintained by the operating system. In Linux, when an application needs to read data from a file, the operating system first allocates some memory to read data from the storage device to the memory, then, the data is distributed to the application. When you need to write data to a file, the operating system first allocates memory to receive user data, and then writes the data from the memory to the disk. At this point, I had to talk about the "Open and Close file" operation I saw in my class book. The procedure for operating a file on www.2cto.com OS is as follows: Step 1: Search the file directory to find the specified file attribute and the location where the file is stored; Step 2: perform corresponding I/O operations on the file. To avoid multiple I/O operations on the same file, the OS introduces the "open" system call. The so-called "open" means that the system copies the specified file attributes (including the physical location of the file on the external storage) from the external storage to a table in the memory to open the file table, return the table ID (or index number) to the user. Later, when you want to perform operations on the file, you can use the index number returned by the system to send an operation request to the system. The system can then use this index number to search the open file table. "Close" means to delete the item from the open file table. 3. What is File Cache Management? First, we need to understand that File cache refers to the copy of file data in the memory. Second, we need to understand two points. First, the File cache, as part of the physical memory, needs to be allocated and recycled in the physical memory. Second, the data source in the File cache is stored on the storage device. You must read and write data between the file system and the storage device ..... "From the operating system perspective, File Cache can be seen as a link between the memory management system and the file system ". This statement seems quite reasonable. The File Cache Management of www.2cto.com refers to the management of the memory allocated by the operating system and used to store file data. The advantages and disadvantages of Cache Management are measured by two indicators: the first is the Cache hit rate. When the Cache hits, data can be obtained directly from the memory, and low-speed peripherals are no longer needed, which can significantly improve the performance; the second is the ratio of valid Cache, which refers to the Cache items actually accessed. If the ratio of valid Cache is low, A considerable amount of disk bandwidth will be wasted on reading useless Cache, and useless Cache will indirectly lead to system memory shortage, which may seriously affect the performance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.