Os Is Low Level Software Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Modern general-purpose computers, including personal computers and mainframes, have an operating system to run other programs, such as application software. Examples of operating systems for personal computers include Microsoft Windows, Mac OS (and Darwin), UNIX, and Linux. The lowest level of any operating system is its kernel. This is the first layer of software loaded into memory when a system boots or starts up. The kernel provides access to various common core services to all other system and application programs. These services include, but are not limited to: disk access, memory management, task scheduling, and access to other hardware devices. As well as the kernel, an operating system is often distributed with tools for programs to display and manage a graphical user interface (although Windows and the Macintosh have these tools built into the operating system), as well as utility programs for tasks such as managing files and configuring the operating system. They are also often distributed with application software that does not relate directly to the operating system's core function, but which the operating system distributor finds advantageous to supply with the operating system. The delineation between the operating system and application software is not precise, and is occasionally subject to controversy. From commercial or legal points of view, the delineation can depend on the contexts of the interests involved. For example, one of the key questions in the United States v. Microsoft antitrust trial was whether Microsoft's web browser was part of its operating system, or whether it was a separable piece of application software. Like the term "operating system" itself, the question of what exactly should form the "kernel" is subject to some controversy, with debates over whether things like file systems should be included in the kernel. Various camps advocate microkernels, monolithic kernels, and so on. Operating systems are used on most, but not all, computer systems. The simplest computers, including the smallest embedded systems and many of the first computers did not have operating systems. Instead, they relied on the application programs to manage the minimal hardware themselves, perhaps with the aid of libraries developed for the purpose. Commercially-supplied operating systems are present on virtually all modern devices described as computers, from personal computers to mainframes, as well as mobile computers such as PDAs and mobile phones.

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, AmigaDOS.

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.

AmigaDOS is an operating system for the commodore Amiga computer. It is based on the UNIX model and is a fully multi-tasking, single-user system. Several programs may be actively running at any time. The operating system includes a window environment which means that each independent program has a 'screen' if its own and does not therefore have to compete for the screen with other programs. This has been a major limitation on multi-tasking operating systems in the past.

MTS (Michigan timesharing system) was the first time-sharing multi-user system. It supports only simple single-screen terminal based input or output and has no hierarchical file system.

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.

NT is a new operating system from Microsoft based in the old VAX/VMS kernel from the Digital Equipment Corporation and Windows32 API. Initially it reinvented many existing system, but it is gradually being forced to adopt many open standards from the UNIX world. It is fully multitasking, and can support multiple users, but only one at a time, multiple logins by different users in not possible. It has virtual memory and multithreaded support for several processors. NT has a built in object model and security framework which is amongst the most modern in use.

The BE operating system, originally develop for a new multimedia computer called the BEBOX, is also new and is a fully multitasking OS. It is optimized for multimedia and is now saleable software developed by Be.com after the new computer concept failed due to lack financial backing. BeOS has proper memory protection but allows direct access to video memory and required for fast video games. It also has virtual memory, is pre-emptive multitasking and is based on a microkernel design. Its shares little with UNIX except for a Bash shell, a POSIX programming interface and about 150 UNIX commands.

2.2 IOS VS 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.


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 ef¬ciently 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 ¬les, 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 ef¬ciently 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 simpli¬es 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, ¬les, 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 ¬les, and share memory with other processes. For example, did you know that you can read or modify the contents of a disk ¬le by reading and writing memory locations? Or that you can load the contents of a ¬le 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 o¬€set 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 ¬rst |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 simpli¬es 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 ¬nds 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, ¬les may be mapped temporarily into the address space of a process to simplify accessing their contents.

Such ¬les may also grow and shrink as the process executes. Placing multiple dynamically changing entities into a single address space is a di¬ƒcult 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 di¬€erent 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 identi¬ed 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 di¬€erence 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 ¬xed-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 di¬€erent users, is a challenging problem. While the size of memory has been increasing steadily and modern CPUs now use long address ¬elds 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.