Functions In An Operating System

Print   

02 Nov 2017

Disclaimer:
This essay has been written and submitted by students and is not an example of our work. Please click this link to view samples of our professional work witten by our professional essay writers. Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of EssayCompany.

Operating Systems

The operating system is the most vital program that runs on a computer. An operating system can be considered as the core of the computer. Every computer needs an operating system to run other programs. An operating system can perform tasks like getting input from the keyboard, keeping track of the users’ files in hard disks and also manages the connection between the computer and external peripherals such as USB drivers and printers.

Functions in an Operating System

There are a total of 5 different functions that an operating system can do to utilize its processes. They are known as multi-user, multiprocessing, multitasking, multithreading and real time process.

Multi-user operating systems allow more than one user to run programs at the same time. For example, multiple remote users can access the UNIX shell at the same time. This function proved to be very useful for system administrators.

Multiprocessing means a computer system’s ability to support more than one program running at a time on a CPU.

Multitasking is a method where multiple tasks or processes are done in the same period of time.

Multithreading is the ability of an operating system to execute different parts of a program, known as threads, at a simultaneous time. A precise coding must be taken into care by the programmers and developers of the operating systems so that the threads can run at the same time without interfering with each other.

Real time basically means something to occur immediately. In this case, the operating system needs to guarantee a certain capability within a specified time constraint. A disk operating system (DOS), however, is not considered real time as it needs a few seconds or minutes to respond to the input. An example of a real time system may be used in navigations (GPS).

Introduction to Windows 7

Windows 7

Windows 7 is an operating system developed by Microsoft. It was released to manufacturing on July 22, 2009. It was made available to the public 3 months after its first release. Windows 7 is one of the most successful versions of the Windows operating system series ever released.

Windows 7 is preceded by Windows Vista. Microsoft has definitely put a lot of effort in developing the operating system as it has improved vastly compared to Windows Vista.

Editions of Windows 7

There are a total of six different editions of Windows 7, namely:

Windows 7 Ultimate

Windows 7 Professional

Windows 7 Home Premium

Windows 7 Enterprise

Windows 7 Starter

Windows 7 Home Basic

All of these editions come by 32-bit or 64-bit versions.

Microsoft’s plans for Windows 7 is to offer Mainstream Support or bug patches and fixes until January 2015 while Extended Support or security updates will be available until January 2020.

Windows 7 Service Packs

A service pack is a collection of updates and fixes, more known as patches, for an operating system. The main reason of a service pack is to give easy installment for the users. Instead of downloading all the patches and fixes one by one, the user can just download the service pack which includes all the patches that has been developed by Microsoft. Therefore, it saves time and effort.

For Windows 7, the latest service pack is Service Pack 1 or known as SP1. It was released on February 9, 2011. Microsoft does not have any plans in releasing any future service pack for Windows 7.

Hardware and System Requirements for Windows 7

The following requirements shown are the minimum or basic specs that a computer needs to have in order to run Windows 7. If one of the categories is not met, the operating system might not serve the user the best of its functions and processes.

Minimum Requirements

Processor

Intel® Pentium™, 1.8 GHz processor or equivalent

RAM

2 GB

Monitor resolution

1280x1024 screen resolution

Graphics card

NVIDIA® GeForce® 6000/7000 series, 128 MB graphics card or equivalent

USB port

USB2.0 port (if connecting to a NanoBoard-NB2 or NanoBoard 3000)

HDD size

3.5 GB of hard disk space

Process Control Management in Windows 7

The developers at Microsoft designed Windows so that it could be as responsive as possible to the users. Every process that happens in Windows contains one or more threads. The main executable unit is the Windows thread. Availability of resources such as CPUs, priority, and physical memory all effect on how the threads will be scheduled in the operating system.

Each thread in the system shares some properties such as the codes, environment strings, resources and global variables. However, each thread is individually and independently scheduled based on its priority.

Scheduling

An operating system which provides a really fast response to the user needs to have the best method of scheduling so that the files can be processed as fast as possible with the possibility of eliminating any delays. Scheduling is done so that the CPU is not idle and will always be active to work and process data. Without scheduling, an operating system will not work at its best as it is definitely a fundamental function for it.

There are a few reasons of why an operating system needs to be scheduled. The first one would be fairness. This is to ensure that all the processes get the fair share of CPU time and to avoid the program from starvation. Other than that, it is for the efficiency of the whole operating system itself. Besides that, scheduling will benefit a lot in improving the operating system’s response time. A more consistent and minimized response time would be achieved. Lastly, the turnaround time can be minimized.

Types of scheduling

There are two types of scheduling in operating systems. They are known as preemptive and non-preemptive scheduling.

The preemptive scheduling is prioritized. The process that is currently utilized will have the highest priority compared to the other processes. A few examples would be round robin, multilevel queue and multilevel feedback queue.

Non-preemptive scheduling’s processes will only release the CPU upon completion of the process. The state of a process will keep on running and will not be deleted from the scheduler until after it has finished its services. For example, first come first serve (FIFO) and shortest job first.

Scheduling in Windows 7

Priorities in Windows are arranged in into two bands, real time and variable. Each of the bands consists of 16 levels of priorities. The highest priority is given to the threads in the real-time class. For example, communication programs such as Skype and messengers. All of these software would need as close to zero delay to maximize its potential.

Overall in Windows, it utilizes the preemptive scheduler more compared to non-preemptive scheduler. The operating system is implemented by using a flexible system of priority levels. It uses a round-robin technique with a multi-level feedback queue of priority scheduling. This is the main method of scheduling used in Windows operating systems ever since the development of Windows NT. Round-robin scheduling assumes that all the processes should be treated equally, they are all of the same value of importance. Most of the time, this is not true. This is because a long and CPU-intensive process needs to be given a lower priority compared to interactive processes. An example would be the processes of a system administrator in comparison with the students’. In special cases, some levels were given dynamic priority variation based on how busy the current thread activity is.

Handling of Threads in Windows 7

Windows 7 seemingly handled the priorities in two different classes. The one in real-time priority, and anything else (high, normal, low) are inside the other class. All of the active threads at a given priority level are inside the queue of the round-robin algorithm. In the variable priority class, the initial value of a thread may change, probably going up or down in a random manner through the thread’s lifetime. Therefore, it can be said that there is a FIFO queue at each priority level but a process might move to the other queues within the scope of the variable class.

There are two quantities that determine the initial priority of a thread, the process base priority and thread base priority. A value from 0 to 15 may vary depending on the process that the program is doing at that particular time. Every thread object associated with a process object has thread base priority properties that shows the thread’s base priority relative to the process that the system is processing. If a process has a base priority of 7 and one of its threads has a base priority of -2, then the initial priority of that thread is 5.

Figure .0

The thread’s dynamic priority or better known as actual priority, may fluctuate, either going up or down within given boundaries. As the diagram in Figure 1.0 show, the dynamic priority may never fall below the lower range of the thread’s base priority and it will not go over 15. A base priority attribute of 4 is given to the process object. The objects associated with each thread must have an initial priority of between 2 and 6. The dynamic priority for each thread may fluctuate in the range of 2 to 15. If, for any reason a thread is interrupted because it has used up its current time given, the operating system will lower its priority. Therefore, processor-bound threads tend to be in the lower priorities and I/O-bound threads tend toward higher priorities. This is because for I/O-bound threads, the executive raises the priority processes more for interactive waits. For example, a keyboard input will be put into a higher priority than the disk I/O. Thus, in the variable priority class, interactive threads tend to have the highest priorities of all.

Figure .0

As shown in Figure 2.0, the user can choose and set the priority of a certain process to either be Realtime, High, Above Normal, Normal, Below Normal and Low. For processes which are set to Realtime, it will be given the highest priority of all, devoting most of the RAM to the process. If the process is set to Low, then it is in danger of getting into starvation, where a process is perpetually denied the necessary resources that it needs to run properly.

Problems Confronted and the Solutions

Any operating systems in the world would not be able to run without facing any problems at all. Windows’ own scheduling method itself has its own flaws.

The Starvation Factor

The common problem with a priority-based scheduling method that is used in Windows 7 is that the possibility of a low-priority process may be locked out by the ones who are of the higher priority ones. Basically, the process could not be processed completely within a given time constraint because the system is giving all of its energy towards the higher priority processes. This phenomenon will cause the starvation of threads or processes. When starving, it does not mean that every low-priority thread could not be able to do their tasks. They can, but only just a few. Some threads make progress, and some others might not actually be executed at all.

A good example is, let there be 2 threads in the situation, A and B. Suppose that these threads execute a critical section in an infinite loop. The operating system allows thread A to enter the critical section once per few hours whereas for B, it is allowed to enter once per few minutes. Both threads are definitely allowed to do their tasks, but thread A is suffering miserably and working painfully slow.

A Remedy For The Pain

As mentioned above, threads in Windows face painful starvation day by day. Luckily, the developers at Microsoft have a solution for this situation. The solution is to provide the operating system with the aging priority. This means that the priority of each process will gradually increase in time after the process spends a specific amount of time in the system. Eventually, the older, or low priority processes will be high priority and will be able to complete its task in finite time. This definitely solves the problem with the scheduling method that Windows 7 uses and proved to fasten the system.Computer Systems Architecture

In computing, the system needs to process data efficiently and in a very quick session to send the output back to the user. Moreover, it needs to speed up its operations to the same programs which are always used by the user. To achieve this, the computer uses the register to complete the task.

Registers in Computer System Architecture

A register is a very small amount of very fast and swift memory that is imbedded into the CPU in order to speed up its process and operations by providing quick access to commonly and recently used values. These are memory cells built into the CPU that has the specific data that the CPU needs, particularly the arithmetic and logic unit (ALU).

C:\Users\IrfaNNazari\Downloads\Assignments\HSSN\register1.png

Figure .0

Based on Figure 3.0, it can be seen that registers are on top of the memory hierarchy. It is the fastest way for the system to manipulate and process data. Below them are several stages of cache memory. Cache memory, although slower compared to registers, they are more abundant. Going down past the various levels of cache is the main memory. It is slower but more abundant, too.

Organization and types of registers

As discussed and shown in Figure 3.0 before, the computer system employs a memory hierarchy. Memory is faster, smaller and more expensive at higher levels of the system. Inside the processor, there are special registers that perform and function as a level of memory above the main memory and cache in the pyramid. The registers have two functions which are divided into control and status registers and user-visible registers.

A user-visible register is the register which allows the machine to minimize the main memory references by optimizing the usage of the registers.

In the other hand, a control and status register control the executions of the programs. This is all done by the control unit to control the progression of the processor in processing the files and programs in the operating system.

User-Visible Registers

This type of register is the one that the machine language that the processor executes. Under user-visible registers, it can be characterized under general-purpose, data, address and condition codes.

General-purpose registers can be assigned with many functions by the developer. Any general-purpose register can contain the codes for any operations. There are limitations to this, though. There may be a specific register for floating-point and stack operations. General-purpose registers can be used for pointing and setting functions. For example, register indirect and displacement.

Data registers are registers that are only used to hold data. The register cannot be executed in the calculation of an operand address.

Address registers are registers which are used for general purposes, or they may be focused to process a particular address mode. For examples, segment points, indexes register, and stack pointers. Segment pointers are pointers in a machine with a segmented addressing that holds the address of a specific segment. There are probably more than one registers. For instance, one for the main operations of the OS and one for the current process that is being handled by the system. Index registers are registers that are used for indexed addressing. The basic example for this would be the search function in Windows. To find files in Windows efficiently, it will index the whole system first for a few couple of minutes. Then when the user types in the file that they want to find, the results will be shown in just only a few seconds. Stack pointers, on the other hand are points which allows implicit addressing. For example, push, pop and other stack instructions that do not need to contain an explicit stack operant. This generally happens if there is a situation where a dedicated register that points to the top of the whole stack.

The final category of register that falls under the type of User-Visible Registers is the condition codes. This is also known as ‘flags’. The processor hardware set the bits of the condition codes as the result of operations. For instance, an arithmetic operation may produce a few multiple of outputs in the form of positive, negative or zero. The result will then be stored in a register or memory, but a condition code is also set to the process. The code may be tested as a part of a conditional branch operation.

Control and Status Registers

The second part of the category is known as the control and status registers. There are many processor registers that are executed to control the operation of the main processing system. On most of the machines, these are not visible to the user for security purposes. There are a total of four registers that are responsible for the instruction execution in a system to be successful. They are program counter, instruction register, memory address register and memory buffer register.

Program counter is the address of an instruction that is yet to be fetched. An instruction register is the instruction that is most recently fetched. Memory address register (MAR) is the address of a location in memory. Memory buffer register (MBR) is the word of data that is to be written to memory or the word that is most recently read.

The processor will update the PC after each instruction is fetched so that the PC always points the system to the next instruction that is to be executed. The four registers above are used for the movement of data between the memory and processor. Within the processor, data must be sent to ALU for the processing process. This is because the ALU have direct access to memory buffer register and other user-visible registers.

Processors are designed with a set of registers, known as the program status word that contains status information. In program status word, it generally contains the condition codes and other important status information. Common fields or flags that can be seen are sign, zero, carry, equal, overflow, and interrupt enable/disable and supervisor. A sign is the sign bit of the result of the last done arithmetic operation. Zero is set when the result produced is 0. Carry is set when the operation resulted in an addition into or borrows out of a high-order bit. This is mostly used for multiword arithmetic operations. Equal is set if a logical compared results of the process are equal. Overflow is used to show that there is a presence of arithmetic overflow. Interrupt enable/disable does what the name of it suggests. It will enable or disable incoming interrupts. Supervisor is an indicator that sees whether the processor is executing in supervisor or user mode. Certain restricted instructions can be accessed and executed only in supervisor mode. Specific areas of memory too can only be accessed through supervisor mode. Only developers who know what they are doing should use the mode. Using this mode without any technical knowledge about it might affect the system.



rev

Our Service Portfolio

jb

Want To Place An Order Quickly?

Then shoot us a message on Whatsapp, WeChat or Gmail. We are available 24/7 to assist you.

whatsapp

Do not panic, you are at the right place

jb

Visit Our essay writting help page to get all the details and guidence on availing our assiatance service.

Get 20% Discount, Now
£19 £14/ Per Page
14 days delivery time

Our writting assistance service is undoubtedly one of the most affordable writting assistance services and we have highly qualified professionls to help you with your work. So what are you waiting for, click below to order now.

Get An Instant Quote

ORDER TODAY!

Our experts are ready to assist you, call us to get a free quote or order now to get succeed in your academics writing.

Get a Free Quote Order Now