Operating System Concepts

Operating System Definition

Operating systems, OSs, are software programs acting as engines in computer systems in charge for the management and coordination of actions and the allocation of the resources of the computer. A major purpose of an operating system is to take care of the details of the action of the hardware. This relieves application programs from having to do this work and makes it easier for applications to be written.

Operating systems give various services to application programs and users. Applications are able to access and use these services through what is called an application programming interface (API). Through these interfaces, the applications are able to request a service from the operating system, pass a parameter, and get the output of the operation (Auslander, Larkin, & Scherr, 2008). A computer operating system has kernel- level services, library-level services, and application-level services. Processes are responsible for running Applications which are connected together with libraries that carry out standard services.

The kernel supports the processes by supplying a path to the peripheral devices. Interrupts from devices are provided by kernel responds to service calls. The kernel is the heart of the operating system which is a control program that operates in privileged state -an execution context that makes it possible for hardware commands to be executed, reacting to interrupts from outside devices and for servicing requests and or traps from processes.

Operating system functions include: implementing the user interface, allocation of hardware among users, enabling computer users to share computer resources, preventing interference from different users when using the these resources, scheduling of resources to various users, coordinating input/output, carrying out errors recover procedures, accounting and managing resource usage, makes possible for parallel operations, managing data for safe and rapid access, and an operating system is also responsible for coordinating network communications.

Processes

The concept of process is central to the appreciating Windows operating systems.

A process can be defined simply as a program in execution. First a process and a program are two distinct things. A process is an active unit while a program is a passive unit. In this contest a program being a passive, is only part of process. A process on the other hand, includes five of the following: a value of Program Counter (PC), contents of the processors registers, variable values, process stack (SP) that contains provisional data such as return address, subroutine parameter, and temporary variables and finally a process can be a data segment having global variables. In other words a process is basically a unit of work in a system.

Theoretically, each process is allocated its own virtual CPU and the CPU switches back and forth among several processes. This rapid switching back and forth is Window operating system is known as multiprogramming. The four stages used in creating a process in Windows operating system are: system initialization, process execution and system calls, user request to create another new process and batch job initialization. A process usually creates a new process. The creating process is parent process and the created one is the child process. Only one parent is required to create a child process but a parent may have many child processes.

Note that a process has only one parent. The parent and the child processes resemble each other in the sense that they have the same memory image, same environment strings and same open files. But a parent and child process has different address space. For example if the parent process changes a word in its address space, the child process will not be able to see the change. A process terminates after finishing executing its last statement. Then at this point its resources are taken back to the system, emptying its system lists, and the process control block (PCB) of the process is deleted. At the same time the process’ PCB’s memory space is given back to the free memory pool.

The new process usually brings to an end the existing process, basically due to: normal exist when processes terminate because they have done their job, error exist when a the process encounters a fatal error, fatal error usually when there is a bug in the program being executed, or Killed by another process. Process has the following states new, terminated, blocked or waiting, running and ready states. Basically the running state and ready state are one and the same. This is because both the processes are able to execute, only that in the ready state, there is momentarily no CPU available for it. The blocked state is not able to run because the process is stopped, even if the CPU was present.

Threads

Despite of the fact that a thread always execute in a process, the process and its related threads are two different concepts. Processes are used to collect resources together while threads are the entities designed for executing. A thread can be explained as a single sequential stream found within in a process. Due to the fact that threads have similar properties as those of processes, they are at times referred to as lightweight processes. In a process, threads allow several executions of streams.

In many respect, threads improve application execution through parallelism. The CPU switches speedily back and forth among the various threads giving false impression that the threads are running in parallel. A thread has the same state as those of a process but in addition a thread contains a stack. Since thread usually call different procedures and these results in a different execution history. This is the main reason why a thread needs its own stack (Stallings, 2005).

In windows operating system a thread is the basic unit of CPU optimization. Windows operating system threads are used for the following reasons: A process with several threads makes a excellent server for example printer server, because threads are able to share common data, they do not require to use inter-process communication and threads are able to maximize the benefits of multiprocessors.

Memory Management

There are two types of memory; Primary Memory (RAM) and Secondary Memory (hard disk). Primary memory holds data and programs used by a process that is executing and it the only type of memory that a CPU deals with. On the other hand Secondary memory is non-volatile memory used to store data permanently when a process is not executing. An operating system contains a memory manager (MM) whose purpose is to manage the use of primary and secondary memory. Its responsibilities include allocating primary memory to processes, moving processes between primary and secondary memory and optimizing memory usage.

There are two types of memory that can be used within a process: Stack which is used for local/automatic variables and for passing parameters to function calls, and Heap which is used for dynamic memory allocation. Whenever there is a process to run it requests memory from the memory manager (MM). Here different strategies are usually used to allocate memory; they are fixed-partition strategies and variable-partition strategies. In fixed-partition strategy memory is divided into fixed regions with usually unequal size. MM will allocate a region to a process that best fits it. Often unused memory within an allocated partition called internal fragmentation.

In variable-pattern strategy MM allocates regions equal to the memory requirements of a process at a particular time and as processes die, holes develop in the memory and MM inserts new processes into holes using a best fit strategy. When a process is blocked, it does not need to be in memory, thus the operating system removes it by a process called swapping and saves it to the hard disk in a swap file. This is implemented on Windows 9X/Me. Virtual memory is also allocated. This is as a result that all of a process’ address space is not needed at once.

File handling

Computer can store files on the disk that is secondary storage, which provide long term storage. A file system normally is organized into directories to ease their use. These directories may contain files and other directories. The following are activities of an operating system in regard to file management: creation files and directories, deletion of files and directories, support of primitives for manipulating files and directories, mapping of files onto secondary storage and back up of files on stable storage media.

I/O Operations

Each program running in the computer requires an input and will have to produce output. This involves the use of Input/Output.

The operating systems hide the user from the details of principal hardware for the I/O. All the user is able to see is that the I/O has been carried out without any details. So the Windows operating system is responsible for providing and carrying out the I/O. This makes it handy for the users to run programs. Operating System control mechanism prohibits users from controling I/O, so these services are not carried out by user-level programs but by windows operating system.

Security

Using the concept of multitasking windows operating system programs are shared by a variety of system resources including the computer’s memory, I/O devices, files, and its processor(s).

A reliable operating system such as Windows NT must make certain that applications are secure, with access permitted to resources only after authorization, and there is no domination on resources of one application at the expense of others. An object is a coding model in which the data and the functions necessary to manipulate the data are combined in one programming construct. Files, memory, processes and windows operating system resources are represented in Windows NT as objects.

Objects are vital for security in Windows operating systems because the only way a program is able to access an operating system object and therefore the resource associated with the object is by asking the operating system to perform the action on the object on its behave (Bic, & Shaw, 2003). Resources are not accessed by programs directly but through the operating system. Memory in which a Windows operating system runs are usually protected from all other programs and user programs are not permitted to directly contact devices.

References

Auslander, M. A., Larkin, D. C., & Scherr, A L. (2008). The evolution of the MVS Operating System. IBM J. Research & Development. Web.

Bic, L. F., Shaw, A. C. (2003). Operating Systems. Pearson: Prentice Hall.

Stallings (2005). Operating Systems, Internals and Design Principles. Pearson: Prentice Hall.

Cite this paper

Select style

Reference

Premium Papers. (2021, October 3). Operating System Concepts. https://premium-papers.com/operating-system-concepts/

Work Cited

"Operating System Concepts." Premium Papers, 3 Oct. 2021, premium-papers.com/operating-system-concepts/.

References

Premium Papers. (2021) 'Operating System Concepts'. 3 October.

References

Premium Papers. 2021. "Operating System Concepts." October 3, 2021. https://premium-papers.com/operating-system-concepts/.

1. Premium Papers. "Operating System Concepts." October 3, 2021. https://premium-papers.com/operating-system-concepts/.


Bibliography


Premium Papers. "Operating System Concepts." October 3, 2021. https://premium-papers.com/operating-system-concepts/.