For the past five weeks I have been taking a course in Operating Systems Theory and Design. This course has been eye opening in my understanding of the inner workings of contemporary operating systems. Throughout this course, I have been creating a group of concept maps to show the fundamental concepts of operating systems.
There are many different operating systems that exist, but they all seem to have three main purposes. The first purpose is to create an environment that a user will use to be able to communicate with a computer's hardware. Essentially, this allows a user to give the computer directions of what it needs to do. The second purpose is to make sure that the computer's resources are allocated. Finally, the last purpose of an operating system is to allow the computer to run efficiently meaning that programs will run without errors, fixing errors when they occur, and making sure that I/O devices can communicate properly.
Each operating system has those goals in mind and uses certain functions to accomplish those goals. While the way an operating system functions differ, there are some fundamental functions that guide the operating system. These functions are:
While protection deals with protecting the files and resources from the system and its users against accidental misuses, security deals with protecting the system from deliberate attacks. Some of the most common types of attacks are:
There are many different operating systems that exist, but they all seem to have three main purposes. The first purpose is to create an environment that a user will use to be able to communicate with a computer's hardware. Essentially, this allows a user to give the computer directions of what it needs to do. The second purpose is to make sure that the computer's resources are allocated. Finally, the last purpose of an operating system is to allow the computer to run efficiently meaning that programs will run without errors, fixing errors when they occur, and making sure that I/O devices can communicate properly.
Each operating system has those goals in mind and uses certain functions to accomplish those goals. While the way an operating system functions differ, there are some fundamental functions that guide the operating system. These functions are:
- Allocation of Resources
- File Systems
- Communication
- Program Execution
- Error Detection
- I/O operations
- Accounting
- Security
Processes are how an operating system accomplishes each task. As a program or file executes, it runs through different states called processes. The process states are new, ready, waiting, running, and terminate. A thread is a unit that it is the path of execution within a process. Single-thread is the idea that a process is only able to perform one task at a time (Silberschatz, Galvin & Gagne, 2014). Multithreaded means that a process can have multiple threads that work together to perform a process. Using multithreads and synchronization allow the threads to share data and code. This means that information is able to be shared and cuts out idle time, because the CPU is always able to work on something during a process.
This leads us to memory. Memory management and memory allocation are vital to an operating system. Memory is not an infinite resource and it has to be used wisely. For the CPU to run processes they have to be in the memory that the CPU is able to access. The memory that the CPU is able to access is small compared to the disk memory that we save our programs on. Because of this, memory has to be managed wisely so that the computer is able to fulfill all the requests of the user and to work efficiently and properly.
Memory also has to be protected. This is extremely important because processes should not be allowed to access memory that don't belong to it. Registers of where a process belongs in memory and limit registers are created in order to accomplish this. This protects memory from being accessed or used by the wrong processes.
Memory allocation is one of the main jobs of memory management. Memory is divided into partitions and the way that these partitions are used is how memory is allocated. You can think of these partitions as slices of pizza. Each partition is allowed to hold one process. Sometimes a process only uses just a sliver of the partition which creates holes in the memory. There are three solutions that can be used to allocate memory to allocate memory in an efficient way. These solutions are first fit, best fit, and worst fit. First fit is when the first hole that is big enough to for a process to fit into is used. Best fit searches the entirety of memory to use the smallest hole available. Worst fit will fit a process into the largest hole available.
Fragmentation is what happens when these strategies are used leaving tiny holes that aren't usable in memory. This is essentially wasted space because each hole is to tiny to ever get used. When these holes are spread throughout a memory partition is can lead to a lot of wasted space. While each individual hole is tiny, added up it can be a lot of wasted space. For instance if there were 100 tiny holes, put together it could equal enough space for a few processes if it wasn't spread throughout memory.
Segmentation is a memory management scheme that instead looks at how programmers look at and use memory. This uses logical addresses and segment names and lengths and is used to store processes into memory. Segmentation can lead to compaction of memory.
Paging is another memory management scheme. It involves breaking physical memory into frames and logical memory into pages. Processes are then able to be executed into any frame and page that is available. This memory scheme allows memory to be used without having to worry about fragmentation or compaction.
Virtual memory allows unused hard drive space to be temporarily used as memory. Because RAM is a finite resource, it is easy for it to run out of space easily. Virtual memory essentially allows unused hard drive space to be used temporarily as memory and then the it can be copied into memory later. This allows processes to run and larger programs to work even if memory is full. When used in conjunction with main memory, virtual memory can temporarily be used to keep processes running while memory is being managed.
File systems are a "mechanism for online storage of and access to both data and programs of the operating system and all users of the computer system" (Silberschatz, Galvin & Gagne, 2014). They are the way that files are stored on a computer and how they are maintained. This system is how the computer keeps track of all of the information that is saved on its like the files name, its size and location, when it was created, and who can access it.
There are quite a few operations that occur within a file system. These include:
- creating a file
- writing a file
- reading a file
- repositioning a file
- deleting a file
- truncating a file
There are also a few different types of directories used to store files. Single-level directories are the simplest directory structure which is when all the files are stored in the same directory. While extremely simplistic, this type of directory can lead to problems like each file needing to have its own unique name. The next type of directory system is called a two-level directory. This is slightly more complicated and involves each user having their own separate directory space. If there are other users, they will not be able to read, write, or delete a different users files. This means that multiple users can have files named the same thing, but can lead to a lot of wasted space if the same files are duplicated in each users' files. Tree-structured directories are another type of directory system. These systems use many subdirectories to organize files. These structures are fantastic for organziation because you can have numerous subcategories, but it is also easy for information to get buried beneath these subcategories making the system hard to navigate or to pinpoint certain files. There are also other structures that each grown upon the downfalls of the previous structure, yet continue to change in complexity. Each of these structures have their own advantages and disadvantages depending on what type of system it is being run on. A system with many users is going to benefit from using a different structure than one with one user.
Another main job of an operating system is I/O or input/output. Everything we do on a computer is an input and the results that we see are the output. I/O can be divided between hardware and software. Some hardware I/O are all the kinds of devices that we connect to our computers. A mouse, keyboard, monitor and speakers are all types of hardware that are I/O. I/O works by being plugged into a port on the computer, traveling over the bus to get processed. Then they follow a path back across the bus to become the output that we see. This works by having drivers which are a type of software that enables the I/O devices that we use to work with the computer system.
Protection and security are vital parts of an operating system. Protection has to do with the inner workings of the operating system while security has to do with the external vulnerabilities of the operating system. Protection involves making sure that each domain and object are a need-to-know only basis. Basically, each program, user, file, etc. only is given enough access to privileges as it needs in order to accomplish its task. There a few different ways that protection can be accomplished including domain of protection, MULTICS Ring Structure, Access Matrices, and capabilities lists.
While protection deals with protecting the files and resources from the system and its users against accidental misuses, security deals with protecting the system from deliberate attacks. Some of the most common types of attacks are:
- Breach of Confidentiality
- Breach of Integrity
- Breach of Availability
- Theft of Service
- Denial of Service
Firewalls are devices or software that are used to restrict and monitor traffic going into and out of the computer from/to the internet. Computer threats and attacks are always changing. These programs and firewalls must be constantly updated to prevent these threats and attacks from harming computer systems and the theft of user information.
The knowledge that I have gained throughout this course will be extremely helpful in my future classes and in my future career in the IT field. I know have a better understand of all the intricacies that go into an operating system. I certainly have better knowledge of everything that goes into each click of my mouse. Before, I just expected the output that appears on my monitor. Now I have working knowledge of all that goes into what happens once I ask the computer to do something. This will also help me in my career because I have a better understanding of the IT field which I hope to one day work in. I'm sure that this knowledge will also help me in my future classes as well as I delve further into getting my degree in Computer Software Technology.
References:
Silberschatz, A., Galvin, P. B., & Gagne, G. (2014). Operating system concepts essentials (2nd ed.). Retrieved from https://redshelf.com/
No comments:
Post a Comment