Set Of System Programs That Control Computer Science Essay

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.

1.0 Introduction:

An Operating System is defined as a set of system programs that control and coordinate the operation of a computer system. An operating system is a program that acts as an intermediary between a user of a computer and the computer hardware. The purpose of an operating system is to provide an environment in which a user can execute programs. The primary goal of an operating system is thus to make the computer system convenient to use. A secondary goal is to use the computer hardware in an efficient manner.

An operating system is an important part of almost every computer system. A computer system can be divided roughly into 4 components: the hardware, the operating system, the applications programs, and the users. The hardware: the central processing unit (CPU), the memory, and the input/output (I/O) devices - provides the basic computing resources. The application program - such as compilers, database systems, games, and business programs - define the ways in which these resources are used to solve the computing problems of the users.

The operating systems controls and coordinates the use of hardware among the various application programs for the various uses. We can view an operating system as a resource allocator. A computer system has many resources (h/w and s/w) that may be required to solve a problem: CPU time, memory space, file storage space, I/O devices and so on. The operating system acts as the manager of these resources and allocates them to specific programs and users as necessary for tasks. Since there may be many requests of resources, the operating systems decide which requests are allocated resources to operate the computer system efficiently and fairly.

It is easier to define operating systems by what they do than by what they are. The primary goal of an operating system is convenience for the user. Operating systems exist because they are supposed to make it easier to compute with them than without them.

Every operating system has a kernel or a nucleus which permanently resides in the main memory of a computer to perform some of the basic functions of OS and to access other portions as and when they are needed. The remaining parts of an OS are normally stored in a disk ready to be loaded into the main memory when required and ordered to do so by the kernel.

2.0 Answer Question 1:

2.1 Operation System:

An Operating System, or OS, is low-level software that enables a user and higher-level application software to interact with a computer’s hardware and the data and other programs stored on the computer. An OS performs basic tasks, such as recognizing input from the keyboard, sending output to the display screen, keeping track of files and directories on the disk, and controlling peripheral devices such as printers. The type of OS included Microsoft Windows, Mainframe, DOS, OS/2, Linux, Mac OS.

The first of these (MS/PC DOS/Windows 3x) are single user, single task systems which build on a ROM based library of basic functions called the BIOS. There are system calls which write to the screen or to disk etc. Although all the operation systems can service interrupts, and therefore simulate the appearances of multitasking in some situations, the older PC environments cannot be thought of as a multi-tasking system in any sense. Only a single user application could be open at any time. Windows 95 replaced the old routine approach of quasi-multitasking with a true context switching approach, but only a single user system, without proper memory protection. Windows NT added a proper kernel with memory protection, based on the VMS system, originally written for the DEC/Vax. Later versions of Windows NT and windows 2000 (a security and kernel enhanced version of NT) allow multiple logins also through a terminal server. Windows 2000 thus has comparable functionality to UNIX in this respect.

The Macintosh system 7 can be classified as single-user quasi-multitasking. That means that it is possible to use several user applications simultaneously. A window manager can simulate the appearance of several programs running simultaneously, but this relies on each program obeying specific rules in order to achieve the illusion. The MacIntosh not a true multitasking system in the sense that, if one program crashes, the whole system crashes. Windows 9x is purported to be preemptive multitasking but most program crashes also crash the entire system. The might be due to the lack of proper memory protection. The claim is somewhat confusing.

UNIX is arguable the most important operating system today, and one which we shall frequently refer to below. It comes in many forms, developed by different manufactures. Originally designed at AT and T, UNIX split into two comps early on: BSD (Berkeley software distribution) and system 5 (ATandT license). The BSD version was developed as research project at the university if Berkeley, California. Many of the networking and user-friendly features originate from these modifications. With time these two versions have been merged back together and most system are now mixtures of both worlds. UNIX is generally regarded as the most portable and powerful operating system available today by impartial judges, but NT is improving quickly. UNIX runs on everything from laptop computers to Cray mainframes. It is particularly good at managing large database application and can run on systems with hundreds of processors. Most UNIX types support symmetric multithreaded processing and all support simultaneous logins by multiple users.

2.2 IOS VS Android

Android

The Android SDK has a dedicated team maintaining it. The Android Developers website has everything documented from installing the SDK to developing basic applications. Also many of the different elements of the programming language and Android tools are clearly explained and the use of them documented. It is possible to get very familiar with developing applications for Android only by visiting the Android Developers website.

Unlike iOS developers, the developers publishing their applications for Android Market have quite good control over their products even after releasing. This requires using Android Market Licensing, a feature allowing the publisher to allow or disallow the further use of the product.

Another factor clearly differing from programming for iOS is the cost of developing applications. Unlike iOS, it is basically free of cost to develop applications for Android, the only cost results from the minor developer’s fee charged when first registering into the Android Market. Unlike applications for iOS, the applications developed for Android can be distributed from anywhere. It is possible to download the .apk-file from the Internet, for example a personal server share, so it does not have to be releasedinto the Android Market to be downloaded.

IOS

Apple is actually quite known for their policy over their products. Often only Apple products are compatible with other Apple products. This sounds quite restricting, but it also simplifies many things. Since iOS and iOS SDK can only run on Apple’s devices, it brings down important everyday issues like system and software requirements. The iOS SDK is also very easy to install because everything that is needed for application development is built into the same installation package, and there is no need for third party applications, add-ons or plugins.

Compared to Android, developing iOS applications is quite expensive with its $99/year price tag. Of course anyone can become an Apple developer and not join a developer program, but that only allows the access to the actual SDK application and the developer canter resources. An Apple developer can’t even test applications on a real device nor distribute applications in any way. The fact that it is not possible to develop applications without a Mac computer is of course very restricting for non-Mac users. Those using a PC have to buy a Mac if they want their part of the Apple hype, and it requires more than just investments in hardware. The user interface, commands and even keyboard shortcuts differ from the PC-, and Windows-world, and getting to know Mac OS X takes its time. Al in all, iOS seems like a solid platform that will be on the market for a long time, and is likely to attract a lot of developers. iOS has a decent market share and an expanding number of users. This even though so far there are only a handful of devices on which the operating system runs: the iPhone, iPad and iPod touch families. If Apple continues to innovate like they have during the last years, their user base is likely to expand and that would bring more customers to 3rd party developers. By experience, another positive trend among the Apple users seems to be that they seem to be quite loyal to the brand.

3.0 Answer Question 2:

3.1 Virtual Memory:

Processes in a system share the CPU and main memory with other processes. However, sharing the main memory poses some special challenges. As demand on the CPU increases, processes slowdown in some reasonably smooth way. But if too many processes need too much memory, then some of them will simply not be able to run. When a program is out of space, it is out of luck. Memory is also vulnerable to corruption. If some process inadvertently writes to the memory used by another process, that process might fail in some bewildering fashion totally unrelated to the program logic. In order to manage memory more efficiently and with fewer errors, modern systems provide an abstraction of main memory known as virtual memory (VM). Virtual memory is an elegant interaction of hardware exceptions, hardware address translation, main memory, disk files, and kernel software that provides each process with a large, uniform, and private address space. With one clean mechanism, virtual memory provides three important capabilities.

It uses main memory efficiently by treating it as a cache for an address space stored on disk, keeping only the active areas in main memory, and transferring data back and forth between disk and memory as needed.

It simplifies memory management by providing each process with a uniform address space.

It protects the address space of each process from corruption by other processes.

Virtual memory is one of the great ideas in computer systems. A major reason for its success is that it works silently and automatically, without any intervention from the application programmer. Since virtual memory works so well behind the scenes, why would a programmer need to understand it? There are several reasons:

Virtual memory is central. Virtual memory pervades all levels of computer systems, playing key roles in the design of hardware exceptions, assemblers, linkers, loaders, shared objects, files, and processes. Understanding virtual memory will help you better understand how systems work in general.

Virtual memory is powerful. Virtual memory gives applications powerful capabilities to create and destroy chunks of memory, map chunks of memory to portions of disk files, and share memory with other processes. For example, did you know that you can read or modify the contents of a disk file by reading and writing memory locations? Or that you can load the contents of a file into memory without doing any explicit copying? Understanding virtual memory will help you harness its powerful capabilities in your applications.

Virtual memory is dangerous. Applications interact with virtual memory every time they reference a variable, dereference a pointer, or make a call to a dynamic allocation package such as malloc. If virtual memory is used improperly, applications can suffer from perplexing and insidious memory related bugs. For example, a program with a bad pointer can crash immediately with a "Segmentation fault" or a "Protection fault," run silently for hours before crashing, or scariest of all, run to completion with incorrect results. Understanding virtual memory and the allocation packages such as malloc that manage it, can help you avoid these errors.

Virtual memory with paging

In a paging implementation, the virtual address space is divided into a sequence of equal-sized contiguous blocks called pages; for P pages, these are numbered consecutively p0, p1, ..., pP−1. The most common page size is between 1K to 16K bytes. Similarly, the available physical memory is divided into a number of equal-sized contiguous blocks called page frames, numbered f0, f1, ..., fF−1, where F is the total number of frames. The page size is identical to the page frame size. A virtual address va is then interpreted as a pair (p, w), where p is a page number and w is a word number, i.e., an offset or displacement, within the page p. Let us denote the number of bits used to represent p as |p|, and the number of bits used to represent was |w|. A virtual address va is then a string of |p| + |w| bits, resulting in a virtual memory size of 2|p|+|w| words. The first |p| bits of va are interpreted as the page number

p, while the remaining |w| bits give the word number w.

3.3 Demand Paging:

Paging greatly simplifies the problem of placement, since any page can be loaded into any free page frame. But paging can also be used to solve the problem of limited memory size so that programs larger than the available main memory could be executed without requiring the programmer to specify an overlay structure. This is accomplished by implementing dynamic memory allocation mechanisms, where pages are loaded at the time they are actually needed rather than statically before program execution. This approach is called demand paging. It requires a mechanism that signals a "missing page" when reference is made to a page currently not resident in main memory. Such a missing page event is called a page fault. It invokes the operating system; in a lengthy procedure, the OS finds the desired page, loads it into a selected frame, and restarts the process that caused the page fault. The following extension of the address map function illustrates the principles of demand paging. The function resident (m) returns the value true if m designates a currently resident page and the value false if the page is missing from memory.

address map(p, w) {

if ( (resident(*(PTR+p))) ) {

pa = *(PTR+p)+w;

return pa; }

else page fault;

}

If no free frame is available at the time of the page fault, the operating system can either block the faulting process, or it may create a free frame. The latter is accomplished by evicting one of the currently resident pages to secondary memory, or by evicting an entire process, i.e., all its resident pages, to secondary memory. Deciding which page or which process to remove is governed by the load control and page replacement schemes employed.

3.3 Virtual memory with segmentation:

There are many instances where a process consists of more than the three basic segments: code, data and stack. For example, a process with multiple threads needs a separate stack for each thread, where each stack grows and shrinks independently. Similarly, files may be mapped temporarily into the address space of a process to simplify accessing their contents.

Such files may also grow and shrink as the process executes. Placing multiple dynamically changing entities into a single address space is a difficult problem.

Segmentation solves the problem in an elegant way. It implements virtual memory as a collection of address spaces, each of which is termed a segment and may be a different size. This organization permits the system to mirror the organization of a given application by using a separate segment for each logical component, such as a function, a module comprising multiple functions, an array, a table, or a stack. Each such component has a name by which it is identified by the programmer.

3.4 Paging with Segmentation:

To provide a multi-segment address space for each process and, at the same time, permit a simple placement algorithm, the principles of paging and segmentation have been combined into one memory management scheme. Under this scheme, memory is organized in variable-size segments, and, from the user’s perspective, there is not much difference between pure segmentation and segmentation with paging. From the point of view of the operating system, however, segments are not contiguous portions of memory. Rather, each segment is subdivided into pages of fixed-size.

The implementation of segmentation with paging requires the use of both segment tables and page tables, and results in two levels of indirection in the logical-to-physical address translation. As with pure segmentation, a segment table registers ST R points to a segment table for the current process. Each of the segment table entries points to the page table for the corresponding segment. Each page table then keeps track of the pages belonging to that segment.

3.5 Interrupt Process:

A computer process is a program in execution. Its state includes the executable code and data in the main memory (the memory image of the process), the value of the program counter (giving the address of the next machine instruction to execute), and the values of all the general-purpose registers.

When an event or process of higher priority needs to get prompt attention from the CPU, it can interrupt the execution of the current process holding the CPU, save its key state information in memory or hard disk, do whatever interrupt processing with the CPU, then resume the original process’s execution by restoring its state in memory and registers.

An interrupt is a dynamic event that needs prompt attention by the CPU. Usually an Interrupt only needs a short period of CPU time to serve it. After that the original process can resume its execution.

There are two types interrupting events: hardware interrupts that are those issued by I/O device controllers when they need CPU to process I/O data, and software interrupts, also called traps, that are raised when the current process executes a special trap instruction to indicate that something wrong has happened or the process needs special service from the operating system (like performing some I/O operation).

Only a limited number of types of interrupts are defined. For each type of I/O devices, there is a special program called an interrupt handler to serve the interrupt requests from these devices. For all software traps, there is also a special trap handler defined.

Each type of interrupt has an associated priority level. A running process would only be interrupted by an interrupt source or trap of higher priority. When the CPU is executing an interrupt handler, the interrupt handler may be further interrupted by an interrupt source of even higher priority.

4.0 Conclusion and Recommandation:

An Operating system is a program that controls the execution of application programs and acts as an interface between the user of a computer and the computer hardware. Every computer must have an operating system to run other programs. The operating system and coordinates the use of the hardware among the various system programs and application program for a various users. It simply provides an environment within which other programs can do useful work. However an operating system is very important for each computer or other device.

In my opinion, whether IOS or Android, each operating system is also has their strengths and weaknesses. Which OS is suitable for those users is depend on them. This two OS was very useful and powerful now generation. This two OS was very popular in this world. Everybody was using it in business, study, entertainment and more. Therefore, this two OS is very important.

In my opinion, managing main memory, especially if it needs to be shared among multiple concurrent tasks or even different users, is a challenging problem. While the size of memory has been increasing steadily and modern CPUs now use long address fields capable of generating very large address spaces, the amount of memory available and actually installed in most computers remains a limiting factor. This situation is not likely to change anytime soon as new applications, especially those using sound, graphics, and video, are capable of utilizing all the memory available.



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