Before we get started with all of the content for this unit, let me set the stage for our analogy. Perhaps this will be a dated analogy at some point, to much of the dismay of our librarian, but at least for now it is relevant. While this unit touches upon how an Operating System works, and our problem set focuses on its inner workings, this is really a topic that deals with the management of resources, hence the topic name, Resource Management. Here are the actors of our analogy:
Operating System is the Librarian
The computer system is the library
The data are the contents of books
The data blocks are the physical books
The computer memory are the shelves on the library where the books sit
The processes(running programs) are the students
A quick overview of the analogy is “Students at a school are very interested in doing a good job. They go to the library to get the books they need to perform well. The librarian is all-powerful, he/she tells students when they can study. The student only gets to take out one book at a time. There is a limited amount of books in the library, so the librarian has to manage which books go out and to who.”
Just like there are many types of books in a library, there are also many types of resources that computer systems need to manage. For programs to be able to perform operations, they need to have access to memory. We’ve studied primary and secondary memory in a previous unit, so we won’t delve too much into what they are. The Operating System must control how primary (RAM and its Caches) and secondary memory (hard drives, usb, SSD) is shared among students. For the purposes of our Library Analogy™, these two are going to be our school library and the store (aka book depot) where the school orders books from. Primary memory will be our library and secondary memory will be the book depot. Primary memory is mainly used to store operations that we’re currently working on and Secondary memory will be used to store all of the information that we need to remember long term.
Again, there are a limited number of books in our library, so the Librarian has to make sure that one Student doesn’t take too many of them. There are also a limited number of books in the book depot (albeit way more than the school library), so we have to be managed those resources as well.
There are many other types of resources that we won’t look at directly with our problem set, but that still need management. These might still appear on a test, but they are more of a common sense thing than some important technical skill you need to know.
Processor speed: If we were to apply this to the Library Analogy™, it would be the speed at which students can read information and apply it. So the processor == the student. This doesn’t make a whole lot of sense, so perhaps we can look at our Restaurant Analogy™ from last unit, since the chef == processor. This would be the speed at which the chef can cook a meal. Processors use MIPS(Million Instructions Per Second).
Bandwidth: This is the rate at which data can travel between the different caches of the CPU and it is expressed in Mb per second (mbps). Many things can affect this but if we look at our restaurant, it is how fast we can move ingredients between the MAR and the MDR.
Network Connectivity: Can our computer connect to other computers, and if so, how fast?
Sound Processor: Sound processors have the ability to convert analog sound to digital files and digital files to analog sound.
Certain systems have much bigger resources than others, so we can’t categorize all computer systems as personal computers. As Operating systems manage resources, we must take into account how many resources can be managed. A Librarian that has 100 books at their disposal should behave differently than one who has a million.
In order of most resources to least resources:
Supercomputers: Have tens of thousands of processors and are composed of massive parallel systems of multiple sets of computer systems.
Mainframe: Mainframes are the largest computer systems available, but not the most powerful, so they are tied at #1 on this list with super computers. They have the most amount of RAM, secondary storage and are able to handle high volumes of input and output. They are used by large organisations to handle large-bandwidth communication. Think Facebook processing all of their data or Google processing billions of searches a day.
Servers: A server has a lot of primary memory so it can process many requests at once, needs multiple network connections, has high bandwidth speeds, and uses advanced backup systems which means its secondary memory is very reliable (and huge).
Laptops: Lower RAM, secondary memory, bandwidth and network connectivity than servers, but better screens and sound.
Tablets: A step down from laptops in everything, in terms of resources.
Cellphones: Another step down from everything, in terms of resources.
Microcontroller: We can keep going lower and lower, but you get the point.