Operating System Overview
What services does an operating system provide?
Program development for example editors and debuggers.
Program execution. The OS should be able to handle the numerous tasks that are required to execute any program.
Access any I/O devices. Each device that the OS interacts with has a unique interface between the device and the OS. The OS Should present a standard interface to all users.
Controlled access to files. Allowing access to different forms of media while presenting a common interface to the user.
Provide protection and security capabilities in multi-access systems.
Control system access to the operating system and its resources.
Error detection and specific user responses to internal and external hardware errors. This can include software errors, and instances where the OS cannot grant permission of use.
Accounting and usage statistics. You need the ability to monitor the performance of the OS.
The Role of an OS
A computer is only a collection of resources that allow for the storage, movement, and processing of data. The operating system is the primary device responsible for managing the resources of the computer.
What is an Operating System?
An OS is just like any other piece of software that you might install on your computer. It has to be executed by the CPU of the computer. The OS gives up control of the processor to other programs, and yet continues to manage overall computer stability.
The operating system should be able to evolve over time to allow new hardware upgrades, and services, as well as updates and fixes.
Its job is to provide an interface between the applications and the hardware of the computer.
Operating System Processing Capabilities Timeline
This is an evolution of the different technologies used.
Serial Processing is when the OS performs instructions in a sequence and uses FIFO (First in First Out) to control the order.
Batch processing is when similar types of instructions are prepared together and processed together in one go. A load and run function are normally used for this type of operation.
Multi programmed batch systems are similar except they allow you to execute multiple programs on the system at any one time.
Real-time systems which are also known as real-time processing systems, have a response time that is fixed. This is for mission-critical infrastructure or processing. There are two types of real-time systems, these are:
Hard real-time system. This means the CPU of the computer will process the data as soon as we enter the data into the machine.
Soft real-time system means that after a microsecond the commands to the CPU are executed.
Distributed Operating Systems are when data is stored and processed in multiple locations. The network collections of computers are usually connected to each other.
Multiprocessing is when a computer has two or more CPUs in the computer system. This allows the computer to execute more than one set of instructions at a time. If the work of the first CPU is finished, and the second still has instructions to execute, they will be divided by both to improve efficiency.
Parallel operating systems work with multiple networked computers to complete a result and task in parallel. The way a parallel OS works is by dividing the sets of calculations into small parts and then distributing them between the other machines in the network for processing. This all happens seamlessly and in parallel. The architecture of the software that is used in this kind of environment is often Unix.
Operating System Modes of Operation
There are two types of modes, the first is the normal user mode which allows the user program to run, and often has certain areas of memory protected from the user for security and safety. Disallowing some instructions to be executed also.
The second mode is kernel mode. This is when you need to boot up into the resource monitor. Privileged instructions that you can’t execute in user mode are able to be executed, and all memory is accessible.
Uniprgramming Vs Multiprogramming
Uni programming is seen in legacy computers and mobiles. It’s when you have the operating system loading only one application at a time. So say goodbye to multitasking.
With multiprogramming, the processor can switch to do another job while the first one is being waited for with either input or output.
Evolution of Operating Systems
The software that is operating systems, is among the most complex software ever written. The OS must be able to handle processes on the OS, as well as memory management for resource allocation. There is also information and data protection and security included. Scheduling of activities and resource management are also some main pillars, as well as the actual system administration.
This is fundamental to the structure of the OS. A process is actually just a program running in execution, or an instance of a running program. The process should be able to be assigned and executed on a processor. It can also be a single sequential thread of execution. A current saved state, or even an associated set of system resources.
Errors in the process can be subtle, and difficult in nature to diagnose. The type of errors you can expect are incorrect synchronization of data or resources. Failed mutual exclusion, meaning that protected memory is accessible, by who shouldn’t be accessing it.
Components of the process consist of an executable program, the associated data required by the program to operate. Also, a component of a process can be a process state. So this might be while you are working on a completely different process, the original one will still have to stay running within the OS. There is execution context, which is what contains all the information the operating system needs to manage and resume the process.
Each OS has 5 principal storage management responsibilities. These are process isolation, which means that each process is protected from each other on the OS. Automatic allocation and management of memory for each application you might open or close on your computer. Support for modular programming, along with protection and access control, and also long term storage.
Virtual memory is when the file system implements long terms storage as a fall over for memory capacity on the OS. Paging is the memory management technique that the computer uses to store and retrieve data from long terms storage, for use in main memory. A page is the smallest unit of data for memory management. It is a fixed length of continuous virtual memory, which is referenced in the page table. The virtual address is a page number and an offset within the page, just like an array in programming. Pages can be located anywhere in the main memory.
Information Protection and Security
Computer systems require a way to control access to the information contained within them. The main issues facing information protection are availability, confidentiality, data integrity, and authenticity.
Scheduling and Resource Management
The key responsibility of an OS is managing the resources of the computer. Resource allocation policies must include Fairness, differential responsiveness, and efficiency.
This is taking the view of the system as a series of levels. Each of these levels performs a related subset of functions, and on each level, the next lower level performs the more primitive functions.
Microkernel architecture includes the older architecture of the computer and processor. Most of the functionality of an OS takes place and resides in the kernel. A microkernel will assign a few of the essential functions to the main kernel. These include address spaces, Interprocess communication IPC. Basic scheduling or processes, and hardware communications.
Multithreading is when the process is divided into different threads that run concurrently. A thread is a single unit of work and can be interpreted. It executes sequentially. A process is a collection of one or more threads.
Symmetric multiprocessing (SMP) is a system that uses multiple processors, and each of these processors shares the same main memory and I/O resources. All processors can perform the exact same functions. It is the job of the OS of the SMP that schedules the processes or threads across all of the processors. The advantages of the SMP is clear, it offers increased performance with parallel processing. The failure of a single process means the system doesn’t just fall over. The ability to scale and add additional processors is available.
Distributed Operating Systems provide the illusion of single main memory space and also secondary memory space. This is when subsystems of the OS on different computers with separate processors handle all the jobs evenly and as a distributed workload across the computers.
Object Orientated Design is a way that allows the ability to add modular extensions to a small kernel. It also enables programmers to customize the operating system, without impacting the integrity of the system. Single user multitasking was developed for 32bit and 64bit microprocessors. They are designed for single users that want to run multiple programs.
Windows OS and applications all use the client/server model. In the client-server model, the server controls the security of the network. The server in this model can be made more powerful to cope with higher demand. Can be used for a single system.
Was created in the 1960s at AT&T Bell Labs. It is a propriety operating system and works with a CLI (command-line interface). Unix is a popular OS for large companies, and universities. The features of Unix, include a multitasking operating system, which can be used as a master control program in the workstations and servers connected to it. There are also hundreds of commercial applications available.
Limitations of Unix
It has an unfriendly interface that can make it difficult for new users. Typing mistakes int he CLI can be bad, and even destroy files. The versions on various machines are different so there is a lack of os consistency. Also, it doesn’t support real-time response time systems.
The kernel is monolithic yet it is structured as a collection of modules. This helps the OS have loadable modules and an object file that can be linked or unlinked at run time. The characteristics of this type of kernel are dynamic linking and stackable modules.
What is Linux?
Linux was developed by Linus Torvalds at the University of Helsinki in 1991. Development and life story is one of the most successful examples of free open-source software collaboration. There are many different versions of Linux, all based on the main Linux Kernal.
Linux supports multitasking, and each program has one or more processes and each process has one or more threads. It can easily function alongside other operating systems. It pro0perly protects different users and sets privacy settings correctly. Although Linux is a close replica of Unix, it doesn’t share any code.
There are still some limitations to the Linux OS. These include support for drivers. You are at the mercy of how quickly the developers of the Linux implement the new device drivers into the OS. It isn’t as user friendly as Windows. You can emulate Windows programs on the Linux OS.