The story of the stupid rabbit-learn about Ubuntu and Linux (34 ~ 37)

Source: Internet
Author: User
(34) QQ
  
The host sent a bunch of photos and processed them with gimp. After adjusting the color and brightness, let alone the quality. It was better than before. However, there is a saying that being happy is not as good as being happy. The host can't look good at himself and want to share it with friends. What should I do? Find someone. You probably know QQ.
  
QQ, like leather band, is also an instant messaging software, that is, a mail. However, he did not ask for anything from the software source, but he downloaded it from QQ's website. This QQ is called pain. Oh no, it's called pain ...... What does it hurt? Oh, yes, it hurts. It hurts at first, and then it hurts-_-B, which is done by a company called pain points. This is a pain point. I think the ICQ software is very popular, so I also got an OICQ and seized the domestic market. Later, the name of OICQ was changed to QQ, but for a long time, for various reasons, the company had to make QQ for the wdinwos version, but not for Linux. It doesn't matter if you don't have it. Google
There is no Linux version for talk, but people are based on the open-source XMPP protocol and the Protocol is public. As a result, Linux cool people around the world, it is easy to make a lot of methods to talk about googlt in Linux.
Talk software. In fact, even if they do not do this, the rubber band itself also supports the XMPP protocol, you can talk about gatlk after setting it. However, QQ is different. The QQ protocol is determined by the company, which does not allow others to know and does not provide the Linux version, using QQ in Linux has always been a headache. Of course, these are all history, and now the company finally wants to open it and provides QQ for Linux. Although its functions are simple, it is still okay to upload a picture. Well, I don't need to talk much nonsense (this is a lot of nonsense). Hurry up and ask QQ to get up and work.
  
Qq suddenly walked into the work room, wrapped up the text written by the master, wrapped up the envelope, and sent it to the QQ over there. After a while, the host will send pictures, and QQ will be a little messy. It seems that it is better to send text for sending pictures, but it is better to send it. MM also sent two pictures over there. QQ took them and showed them to the master. The master was full and asked mm to send several more pictures. So mm sent 5 in one breath and then ............ Qq was dizzy. After several times, it was impossible to establish a connection with the QQ of the other party. It's really disappointing to say that this guy is not doing well. The master was so angry that he had to shut down QQ and asked me to wake up another person, Eva.
  
I believe everyone has heard of Eva. His English name is Eva, and his Chinese name is the gospel warrior of the new century. In other words, Japan has a chastity line ...... Oh, sorry, it's a long journey. Forget to commit to the good faith and the new century gospel warriors. They have nothing to do with Eva here, and I am related to Eva, Sister yfan. Many people use EVA to chat with QQ before the Linux version is provided. This Eva is completely the result of cloud dajie's packet capture research, the black box was written to crack windows QQ. The function is also powerful. It can be used for basic chat, image uploading, and sending and receiving custom expressions in a group. You can even display a friend's custom avatar. (This seemingly simple function is not implemented by official QQ at present.) So when QQ is unreliable, the host still called reliable Eva to continue uploading images with MM. QQ is different from Eva in many ways. One is official, the other is shanzhai (not derogatory), the other is GTK-based, the other is QT-based, and the other is closed-source, one is open-source, the other is 32-bit, and the other is 64-bit.

(35) Operation
Someone asks, you always say this 32-bit, 64-bit. What do you mean?
  
The number of digits indicates the number of digits in the binary number calculated by the CPU at a time. The CPU is like a calculator, and the CPU used by our software is like a calculator used by humans. It is very important. We need to calculate a bit of things and use the CPU. (Don't tell me how to use mental computing. I'm a software, OK ?) The CPU computing capability is limited. What are the restrictions? Let's take a look at your calculator. It's 28 + 783. No problem. It's okay to calculate a 7836-473, right? Can you calculate another 72635446584939202937346537 + 1? It is estimated that 99% of the comrades have a problem (it is not ruled out that some cool people have a very good calculator): "How can I count on so many computers? I can display the next 11 digits in total ". Yes, this is the number of digits limit of the calculator. The same is true for the CPU. The number he can calculate at a time cannot be infinitely large. He has to have an edge, but not in decimal digits, but in binary digits. As for what is decimal or binary, you can ask the dog's eldest brother, but it doesn't matter if you don't know it. For the moment, we will use our usual decimal format. For example, I can only calculate the number within 99, that is, only two digits (decimal ). How can we use this CPU for our software? The CPU has a lot of small counters that store data, called registers. Each register has its own special purpose, so we will not discuss it much. For addition, you have to do this: there are two registers, that is, the small register. Open these two small register and put data in it. The data is abstract, think about it as a piece of paper with numbers. However, because it is a two-bit CPU (again, we use Decimal for example, the real CPU is not), so the Register can only put two digits of data, that is, the note can only contain numbers less than 99. Well, I write a 12, put it in a notebook, write another 9, put it in B notebook, and then press a button that says "add" to listen to a click, the CPU automatically pops up a piece of paper with 21 words on the paper, which is his computing function. Another big one, write a 50 to A, write a 51 to B, click the button, click it, open a piece of paper, and write 01. That said, this is wrong! Don't worry, just click again and write "yes, you have to enter" again. This is the right time. Why? Because the CPU is two digits, only two digits can be output. If the number is exceeded, the system tells you to carry.
  
Well, the basic operation is finished. Now let's talk about the subject, the difference between different digits. The two CPUs are just like what we just mentioned. Assume that we need to calculate 3173 + 644. Here we have two CPUs and one four CPUs, respectively, what is the difference?
  
Let's take the two first. Some people have said that the two are only two. What is this? Alas, this machine is dead, and our software is active. We can only calculate two at a time. Won't we separate them and count them several times. First of all, write a 73, write a 44, button, click it, and a 17, click it, and then write it again. Well, remember, you have to carry it. Then write another 31, write another 6, click the button, and click 37. Don't be too busy. You have to carry it just now. Isn't it? Write another 37, write a 1, button, click it, and come out with 38. Good. The final result is one piece. The highest value is 38 and the lowest value is 17. The final result is 3817.
  
Take the four digits for calculation. A four-digit query means that both the input data and the output data can be four digits. That is to say, I can write a 3173, write a 644, put it in, and click the button, the answer is 3817, and the job is completed ~

(36) bits
  
This is the difference between the two-bit CPU and the four-bit CPU. Theoretically, the four-bit CPU is faster than the two-bit CPU. As shown in the above example, with a larger number, the four-bit CPU can be used up in one minute, and the two-bit CPU needs to be processed several times. However, the four-digit CPU has to be used. This requires four-digit software to use a four-digit CPU.
  
Finally speaking of the number of digits of the software, the number of digits of the CPU is the number of digits that can be calculated at a time. What about the number of digits of the software? Indicates the number of CPUs required for the software. Computing is required for software work, So CPU is used for computing. Two-Bit software uses two-bit CPU, the 4-digit software uses a 4-digit CPU (or a decimal digit ). For example, if there is a two-digit software (it indicates that the software will use a two-digit CPU), this is the case when the software runs on a two-digit CPU computer: for example, if we want to calculate 3173 + 644, We will calculate 73 + 44 first, then remember carry, then calculate 31 + 6, then add carry, and finally get the answer, as described above. What happens when the two-digit software runs on a four-digit CPU? He will calculate 73 + 44 first, then remember carry, then calculate 31 + 6, then add carry, and finally get the answer ...... Someone said, why not he calculate it directly? Can a 4-bit CPU be used out directly? But don't forget that he is a two-digit software. He won't use a four-digit CPU, but not a two-digit CPU. He can still use the four-digit CPU as two-digit, it's just a waste. So what should we do if we want to fully utilize the performance of 4-bit CPU? Of course, four software players are required. When a 4-bit software runs on a 4-bit CPU, how does one calculate 3173 + 644? As you may know, You can directly calculate and complete it once. What happens when a 4-bit software runs on a 2-bit CPU? This software will write a 3173 piece of paper to plug in the CPU register, the impatient sweat is not to plug in, the last hand -- don't do it, this broken CPU can't be used! Of course, this is just a metaphor. It doesn't mean that 4-bit software can calculate 3173 + 644 on 2-bit CPUs, even if it cannot calculate 1 + 1. A four-digit software cannot run on a two-digit CPU.

(37) Collaboration
64-bit Eva skillfully uses 64-bit CPU. At the same time, 32-bit stream is also using the same CPU. (Of course, it is used as a 32-bit CPU .) At the same time, pipin also reported from time to time whether the master's MSN and Gtalk friends sent messages; at the same time, the fox sister was not idle, wandering between various websites; at the same time .................. In short, everyone in the memory performs their respective jobs, and there is a prosperous and harmonious scene. Behind this harmonious scene is the fact that I have carefully studied the xxx ideology, xxx theory, and three tables.
-_-B
Well, I am a multi-task operating system. What is multitasking? Intuitively, you can chat while watching movies and typing. (What? You said you can't? That's because your brain is not a multitasking system .) Some people have to say, which computer does the system support chatting and typing? This is a long story. A long time ago, the company was still a little soft. Before the advent of the ancestor of Cha Pi, it was a little soft, is an operating system called DOS. This operating system is a single task, that is, only one software can run in the memory.
Isn't it difficult to let several programs run into the memory? The answer is -- yes. The memory we use, including CPU, is a very important resource, especially the CPU, one CPU can only be used by one program at a time (the current multi-core CPU is multiple CPUs for the Program). If you want to allow many programs to run together at the same time, you must allocate the CPU properly. It is relatively simple to crash the system, basically regardless of the allocation. For example, the host wants to start the fox sister (the thought is certainly not the fox sister, for example). If the system crashes, the host will wake up the fox sister, then she said to her: Fox, get up and work. You see there is a Pentium 166 CPU and 16 M memory. Is it enough for you? "That's enough," said fox. Then, let's just say, well, let's go to work. I don't care. When it's done, call me. Then I went to bed, and the whole machine was controlled by my sister fox. So it is impossible to run two programs at the same time.
What is the system with multiple tasks? For example, I and the checkskin next door are multi-task operating systems. We will not use all the resources of the entire computer for a program, but make reasonable and planned. For example, if I call my sister Fox, I will tell her: Fox, get up and work. Sister Fox will get up and tell me, okay, I need 10 MB of memory now. I will check the memory space and tell her, yes, that 10 MB space will be used for you. Then the fox entered the studio. When he started working, he had to use the CPU. When he needed it, the fox had to find me and apply to me. I will check whether someone is using the CPU. If so, let the fox wait. If not, use it for her. However, if you use it for her, you can only use it for a while, because there are other programs to use. This "takes a while" time. It is a professional term called a time slice. Each running program takes turns to "use for a while", that is, each program allocates a certain time slice. The program that has no time slice is waiting, but the switching time is very short. In the host, there is no sense that the program is waiting for CPU usage, so in the host's opinion, that is, multiple programs run together, that is, what we call multitasking.
Multi-task implementation also has different modes, including collaborative multi-task and preemptible multi-task.
Collaborative multitasking requires that each program that is using the CPU voluntarily give up control of the CPU and re-allocate it by the operating system. If I was a collaborative multi-task operating system, it would look like this: Sister Fox used the CPU for a while and said, well, I don't need it now. I went to the network port and other data packets. Rabbit brother, let's use the next program. Then I recycled all the CPU control and turned around. After waiting for a long time, I gave him the CPU. Then he said, okay, I will use it later, let's start the next program ...... In this way, everyone is humble and the memory is prosperous and harmonious. This is mainly because I have learned the xxx idea, xxx theory ...... Wear three tables. However, the disadvantage of doing so is that there is a program that is not harmonious. For example, my sister Fox has been using it for a long time. I told her, "Fox, you see, you have used CPU for 1 second (for our program, 1 second is already quite a long time.) Is it time to let other children ...... Oh, no. Did you just use other programs? The fox turned his head and said, "No! So I cannot. If the fox can never let go of the CPU, then other programs will wait until the sky is deserted, the sea is full, until the machine restarts, until the district loses power.
What about preemptible multitasking? It is determined by the operating system when the CPU control is withdrawn, rather than automatically giving up by the program. The core of this method is a word-grab! If I am a preemptible multi-task operating system, I am a preemptible multi-task operating system. This is what it looks like: Sister Fox used the CPU for a while. I told her that your CPU usage time has reached, and immediately stops using it and queues again. Then the fox handed over the CPU and waited for the next CPU usage. I asked the next program to use the CPU. After using the CPU for a period of time, I made the program stop using it and let the next one come and go back and forth in a prosperous and harmonious way, this is mainly ...... Thoughts ...... Theory ...... We also wear three tables.
When! Alas ~

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.