An operating system (OS), is a collection of software that manages computer hardware resources and provides common services for computer programs.
An operating system is the core software, which allows a computer system to operate and execute its command as it was intended to do so.
The operating system manages the user interface, hardware, and all other software components.
Examples of operating systems are Windows, Linux, IOS, MacOS, Unix, Symbian, and Android etc.
Without these operating systems, the platform being used wouldn’t be able to function, and it would just be a collection of components generating heat aimlessly.
Operating systems generally share a number of functions such as:
- Providing a user interface
- Managing the computer’s memory
- Managing the hardware
What is a Multi Task Operating System?
During the early days of computing, when a computer system ran a program and it required access to one of the peripherals on the system, it would require to stop running the execution of a program, access the peripheral, retrieve the data, and then continue to with the execution that is was already carrying out. This was of-course, extremely inefficient, and let’s not forgets, computers in the early days were extremely expensive, thus making them expensive and in-efficient, nonetheless it was a revolutionary step.
However in 1961, the LEO III emerged, which was a British computer machine that had enabled the use of multitasking in operating systems.
The term multitasking, when paired with an operating system, refers to the users being allowed to accomplish more than one computative task, for instance: allowing the user to perform more than one task on an application program at a given time.
The operating system is able to keep track of what the user is doing and is able to navigate from one application to another without losing information.
Almost all operating systems nowadays use multitask systems. Users of these systems are always in need of the system to carry out multitask operations, a simple operation which requires multitasking is using a “Web browser” and a “Word document” at the same time.
However, that being said, a system can only perform tasks efficiently depending on its structural capacity, i.e. its hardware which includes RAM, ROM, CPU etc.
This is because each task consumes system storage and other resources, therefore as more tasks are initiated, the system will prioritise some of that storage to that application, thus decreasing the overall efficiency of all the other applications, as it portioned out some run time for the new application.
A multitask operating system works on more than one tasks, by switching between them in a very quick manner. Tasks may concern a single user or multiple users, the operating system will ultimately save the current state of each user and task so that it does not lose its place when it comes back to a task to resume the execution. This allows for efficiency and allows the system to switch smoothly between tasks.
An Operating System does the following to carry out activities related to multitasking:
- Initially the user will give instructions to the operating system or to a program/application directly, and they will receive an immediate response.
- To display this quick response, the operating system handles multitasking by “slicing” some of the processors operating capability to that program.
Types of Multitask Operating Systems
Preemptive systems date back to the 1960’s where they were first implemented, it up until 1969 when they were available in some operating systems for computers.
Preemptive operating systems are a core feature of all Unix-like operating systems, ranging from Solaris, Linux, as well as the modern versions of Windows.
Preemptive multitasking allows the computer system to more reliably allow each process running on the operating system to get a regular amount of operating time. This regular amount is referred to a “slice” of operating time.
Preemptive multitasking operating systems allow the system to deal with important external events rapidly, for instance like incoming data, moreover, these events may require the immediate attention of one or another of the process to function.
Processes can be grouped into two categories at any specific time:
- Those that are waiting for input or output, which are referred to “I/O bound”.
- Those which are fully utilising the CPU, these are referred to “CPU bound”.
In preemptive systems, the software would often “poll”, or “busywait” while waiting for the requested input (such as disk, keyboard, or network input). Though during this time, the system is not performing any tasks and is regarded to be inefficient.
Poll: Polling in computer science refers to actively sampling the status of an external device by a client program as a synchronous activity.
Busywait: Busywait in computer science refers to a technique, which a process repeatedly checks to see if a condition is true. An example of this is to see whether the keyboard input is allowed or if it’s locked.
Cooperative multitasking is a technique, which allows two or ore programs to cooperatively share the processing time and resources of the host processor.
In cooperative multitasking also known as “time-sharing multitasking”, programs in the processing queue must equally allocate the processors resources within each other.
Cooperative multitasking works on the joint cooperation of programs in efficient processor sharing. Each program most give equal processing time to other programs, therefore this ultimately means that any program which isn’t configured properly to do that efficiently may stop other programs from functioning properly, as it would cause other programs to halt (wait) until the processor releases the current program, which results in inefficiency and lag for the user.
Or if a poorly designed program consumes all of the CPU time for itself, either by performing “extensive calculations” or by “busy waiting”, both would result the whole system to “hang”. In a server environment, this is a hazard that would result in making the entire environment fragile.
Although nowadays cooperative multitasking is rarely used in larger systems, however it is used in specific applications such as CICS (Customer Information Control System), which is an application that provides transaction management and connectivity for applications on IBM mainframe systems.
Though once, cooperative multitasking systems were the only scheduling scheme employed by Microsoft Windows and Classic Mac OS to enable multiple applications to run at the same time. That being said, cooperative multitasking systems can still be found in RISC operating systems nowadays.
Characteristics of a Multi Task Operating System
Context switching refers to when a multitask operating system executes one jobs and then does another.
For instance, when the system finishes a print job for one user, the computer could switch to resizing a graphic for another user.
Multitask operating may receive messages to signify that a peripheral in the hardware requires attention, thereby the system will “interrupt” other tasks to focus on that peripheral.
Multitask operating systems allow the use of a single computing resource by multiple users at the same given time, this is done as the computer has the ability to switch rapidly between users and what they require.
One processor cannot change the data of another process in the main memory, each process uses it’s own allocated space.
Multitasking operating systems allowed for the design of real time computing systems, where there are a number of possibly unrelated external activities that require control by the the single processor system. In these systems, a hierarchical interrupt system is coupled with process prioritisation, the reasoning for this is to ensure key tasks/applications/programs are given a greater share of available process time.
Multitasking had greatly improved overall throughput of computers, furthermore this had allowed programmers to implement applications as sets of cooperating processes (which means one process gathers input data, one process processes input data, one process writes out results on the disk). Though to allow this to work efficiently, it required the “threads” mechanism.
Threads are used as they’re the most efficient way for cooperating processes to exchange data between each other and to share their entire memory space.
Threads can be defined as processes that run in the same memory context and share other resources with their parent processes, for instance like open files. They can be called “lightweight processes” because switching between threads does not involve changing the memory context.
Multitask operating systems use more than one CPU to handle system tasks. This requires an operating system that is capable of dividing tasks between multiple processors.
Memory swapping refers to a technique which provides more memory than there is physically on the system by keeping portions of primary memory in secondary storage. (Secondary storage is not directly accessible by the CPU, like a hard drive disk)
While memory swapping and multitasking operating systems are two unrelated techniques, both of them are usually used together in systems.
This is because swapping memory allows more tasks to be loaded at the same time. This coincides with multitasking operating systems as they allow another process to run when the running process hits a point where it has to wait for some portion of memory to be reloaded from secondary storage.
One of the most essential parts of a multitasking operating system is to have the ability to safely and effectively share access to system resources.
Having access to memory must be very strictly governed to make sure that there are no processes that can inadvertently or deliberately read/write to the memory locations outside the process’s address space. The reasons for having memory protection and using it, is to ensure general system stability, data integrity, and data security.
In a correctly implemented multitasking operating system, any given process cannot have any direct memory access to another process (though an exception of this is shared memory).
If memory protection in a multitasking operating system was inadequate, due to poor implementations or flaws in the system design, it may allow for security flaws/vulnerabilities in the system, which could be potentially exploited by malicious hackers/software.
Advantages of a Multi Task Operating System
One of the key benefits and one of the main philosophies of multitask operating system is the fact that all tasks are given a suitable amount of processor time to execute actions, which results no waiting time in the CPU.
This decreases lag, and increases efficiency.
Handles Multiple Users:
Multitask operating systems can handle multiple users running multiple tasks at the same time, without lag or glitches. All users of the operating system are given a suitable amount of processor time.
Unauthorised applications are not given permission to overuse memory, therefore coming to the conclusion that memory is better managed in multitasking operating systems.
Efficient virtual memory:
If a program will be delayed due to any input/output interrupt, that program will be given to the virtual memory. Once the input/output operation is completed, the program will come back to the Random Access Memory (RAM).
This allows for extreme efficiency, as the transfer to virtual memory means that the other programs aren’t delayed and a backlog of programs waiting to be executed doesn’t occur.
- The difference between virtual memory and RAM?
Random Access Memory (RAM) is a physical memory storage, which holds the applications, documents and procedures on a computer.
Virtual memory is the storage area that holds the files on the hard drive for retrieval when a computer runs out of RAM.
So therefore some applications may use virtual memory (if the process demands it) to remove the strain on RAM to remove the chances of lag.
Programs can run in the background:
Despite not being physically visible to the computer user, the operating system will have background applications running to maintain and make sure that other programs are running smoothly and efficiently. Therefore these programs are also given an allocation of time in the operating system.
A computer firewall is an example of these applications.
Increases reliability in the system:
The operating runs smoothly when multitasking. Programs and users alike will feel the efficiency.
User can make use of multiple programs and computer resources:
The system can handle multiple applications at the same time, like a Web browser, MS Word etc. Furthermore, the computer hardware like the RAM, processors, hard drives, Input/output devices are better managed in multitasking operating systems.
Disadvantages of a Multi Task Operating System
While it can be an advantageous point to carry many operations at once, it does come with its drawbacks.
Limitation of Memory:
Due to running multiple applications/programs at the same time, a computer systems memory could become overloaded with too many programs, as the memory tries to give each program run time.
Each system model could have a different amount of RAM, so the less RAM a system has, the more overloaded the memory will be, which means that the user will have experience more lag when requiring many applications to operate at the same time.
Dependency on the processor:
Despite having a multitask operating system, the system performance will ultimately still depend on the processor specification. Therefore, the lower the spec on the processor, the slower it is for it to manage programs, thus such processors cannot process many heavy-duty programs at the same time efficiently.
In a multitask operating system, the processor is always busy due to it carrying out multiple actions for multiple programs, therefore the more demand is required the more heat generation from the CPU will incur.
Summary and Facts
What is a Multi Task Operating System?
- A multitask operating system works on more than one tasks, by switching between in a very quick manner. Tasks may concern a single user or multiple users, the operating system will ultimately save the current state of each user and task so that it does not lose its place when it comes back to a task to resume the execution. This allows for efficiency and allows the system to switch smoothly between tasks.
- Almost all operating systems nowadays use multitask systems. Us users are always requiring the operating system to carry out multitask operations, a simple operation, which requires multitasking is using a “Web browser” and a “Word document” at the same time.
Types of Multitask Operating Systems:
- Preemptive Multitasking:
- Preemptive multitasking allows the computer system to more reliably allow each process running on the operating system to get a regular amount of operating time.
- Cooperative Multitasking:
- Cooperative multitasking is a technique, which allows two or ore programs to cooperatively share the processing time and resources of the host processor.
Characteristics of a Multi Task Operating System:
- Context Switch
- Hardware Interruption
- Memory swap & Multitask operating systems utilise the use of memory swapping
- Memory Protection
Advantages of a Multi Task Operating System:
- Handles multiple Users
- Protected memory
- Efficient virtual memory
- Programs can run in the background
- Increases reliability in the system
- User can make use of multiple programs and computer resources
- Process allocation
Disadvantages of a Multi Task Operating System:
- Limitation of Memory
- Dependency on the processor
- CPU overheating