Wednesday, November 22, 2006
Lord Frozen
Lord Jack Frostmourne™ Rulez...My might cannot be match...muhahahaa!






Labels: ,

posted by Gi-an Carlo Yap @ 10:29 PM   0 comments
Monday, November 20, 2006
Assignment #2 [What is Operating System?]
An operating system (OS)


is a computer program that manages the hardware and software resources of a computer. At the foundation of all system software, the OS performs basic tasks such as controlling and allocating memory, prioritizing system requests, controlling input and output devices, facilitating networking, and managing files. It also may provide a graphical user interface for higher level functions.






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: task scheduling, memory management, disk access, and access to hardware devices.

An example of MS-DOS's command-line interface, this one showing that the current directory is the root of drive C
Apart from the kernel, an operating system is often distributed with system software that manages a graphical user interface (GUI), although Microsoft Windows and Apple MacOS have integrated these programs into the operating system, as well as utility programs for tasks such as managing files and configuring the operating system. Oftentimes distributed with operating systems are application software that does not directly relate to the operating system's core function, but which the operating system distributor finds advantageous to supply with the operating system.
Delineating between the operating system and application software is not a completely precise activity, 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 the "kernel" should manage 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.

Services

Process management
Every action on a computer, be it background services or applications, is run inside a process. As long as a von Neumann architecture is used to build computers, only one process per CPU can be run at a time. Older OS such as DOS did not attempt any artifacts to bypass this limit and only one process could be run under them (although DOS itself featured TSR as a very partial and not too easy to use solution). Modern operating systems are able to simulate execution of many processes at once via multitasking even with one CPU. Process management is an operating system's way of dealing with running multiple processes. Since most computers contain one processor with one core, multitasking is done by simply switching processes quickly. As more processes run, all timeshares become smaller. On many systems, this can eventually lead to problems such as skipping of audio or jittery mouse movement (called thrashing, a state in which OS related activity becomes the only thing a computer does). Process management involves computing and distributing "timeshares". Most OSs allow a process to be assigned a process priority which impacts its timeshare. Interactive OSs also employ some level of feedback in which the task with which the user is working receives higher priority.

Memory management
According to Parkinson's law "Programs expand to fill the memory available to hold them". Thus the programmers prefer a memory of infinite size and infinite speed. Nowadays most of the computer's memory is arranged in a hierarchical manner, starting from the fastest registers, cache, RAM and disk storage. The memory manager in an OS coordinates the memories by tracking which one is available, which is to be allocated or deallocated and how to swap between the main memory and secondary memories. This activity which is usually referred to as virtual memory management greatly increases the amount of memory available for a process (typically 4GB, even if the physical RAM available is less). This however comes at a speed penalty which is usually low, but can become very high in extreme cases and, again, lead to thrashing.
Another important part of memory management activity is managing virtual addresses, with help from the CPU. If multiple processes are in memory at once, they must be prevented from interfering with each other's memory (unless there is an explicit request to share a limited amount of memory, in controlled ways). This is achieved by having separate address spaces. Each process sees the whole virtual address space (typically from address 0 up to the maximum size of virtual memory) as uniquely assigned to it (ignoring the fact that some areas are OS reserved). The CPU stores some tables to match virtual addresses to physical addresses. This process, as it is known, is called paging.
By creating a separate address space for each process, it is also simple for the operating system to free all of the memory that was used by a particular process. If a process does not free memory, it is unimportant once the process ends and the memory is all released.

Disk and file systems
Operating systems have a variety of native file systems. Linux has a greater range of native file systems, those being: ext2, ext3, ReiserFS, Reiser4, GFS, GFS2, OCFS, OCFS2, NILFS and Google File System. Linux also has full support for XFS and JFS, along with the FAT file systems, and NTFS. Windows on the other hand has limited file system support which only includes: FAT12, FAT16, FAT32, and NTFS. The NTFS file system is the most efficient and reliable of the four Windows systems. All the FAT systems are older than NTFS and have limitations on the partition and file size that can cause a variety of problems.
For most of the above file systems there are two ways it can be allocated. Each system can be journaled or non-journaled. Journaled being the safer alternative under the circumstances of a system recovery. If a system comes to an abrupt stop, in a system crash scenario, the non-journaled system will need to undergo an examination from the system check utilities where as the journaled file systems recovery is automatic. Microsoft's NTFS is journaled along with most Linux file systems, except ext2, but including ext3, reiserfs and JFS.
Every file system is made up of similar directories and subdirectories. Along with the operating systems file system similarities there are the subtle differences. Microsoft separates its directories with a back slash and its file names aren't case sensitive whereas Unix-derived operating systems (including Linux) use the forward slash and their file names generally are case sensitive.

Networking
Most current operating systems are capable of using the now-universal TCP/IP networking protocols. This means that one system can appear on a network of the other and share resources such as files, printers, and scanners.
Many operating systems also support one or more vendor-specific legacy networking protocols as well, for example, SNA on IBM systems, DECnet on systems from Digital Equipment Corporation, and Microsoft-specific protocols on Windows. Specific protocols for specific tasks may also be supported such as NFS for file access.

Security
Many operating systems include some level of security. Security is based on the two ideas that:
The operating system provides access to a number of resources, directly or indirectly, such as files on a local disk, privileged system calls, personal information about users, and the services offered by the programs running on the system;
The operating system is capable of distinguishing between some requestors of these resources who are authorized (allowed) to access the resource, and others who are not authorized (forbidden). While some systems may simply distinguish between "privileged" and "non-privileged", systems commonly have a form of requestor identity, such as a user name. Requestors in turn divide into two categories:
Internal security: an already running program. On some systems, a program once it is running has no limitations, but commonly the program has an identity which it keeps and is used to check all of its requests for resources.
External security: a new request from outside the computer, such as a login at a connected console or some kind of network connection. To establish identity there may be a process of authentication. Often a username must be quoted, and each username may have a password. Other methods of authentication such as magnetic cards or biometric data might be used instead. In some cases, especially connections from the network, resources may be accessed with no authentication at all.
In addition to the allow/disallow model of security, a system with a high level of security will also offer auditing options. These would allow tracking of requests for access to resources (such as "who has been reading this file"?)
Security of operating systems has long been a concern because of highly sensitive data held on computers, both of a commercial and military nature. The United States Government Department of Defense (DoD) created the Trusted Computer System Evaluation Criteria (TCSEC), which is a standard that sets basic requirements for assessing the effectiveness of security. This became of vital importance to operating system makers, because the TCSEC was used to evaluate, classify and select computer systems being considered for the processing, storage and retrieval of sensitive or classified information.

Internal security
Internal security can be conceptualized as protecting the computer's resources from the programs concurrently running on the system. Most operating systems set programs running natively on the computer's processor, so the problem arises of how to stop these programs doing the same task and having the same privileges as the operating system (which is after all just a program too). Processors used for general purpose operating systems generally have a hardware concept of privilege. Generally less privileged programs are automatically blocked from using certain hardware instructions, such as those to read or write from external devices like disks. Instead, they have to ask the privileged program (operating system) to read or write. The operating system therefore gets the chance to check the program's identity and allow or refuse the request.
An alternative strategy, and the only strategy available where the operating system and user programs have the same hardware privilege, is the operating system not running user programs as native code, but instead either emulates a processor or provides a host for a p-Code based system such as Java.
Internal security is especially relevant for multi-user systems; it allows each user of the system to have private files that the other users cannot tamper with or read. Internal security is also vital if auditing is to be of any use, since a program can potentially bypass the operating system, inclusive of bypassing auditing.

External security
Typically an operating system offers (hosts) various services to other network computers and users. These services are usually provided through ports or numbered access points beyond the operating systems network address. Typically services include offerings such as file sharing, print services, email, web sites, and file transfer protocols. At the front line of security are hardware devices known as firewalls. At the operating system level there are various software firewalls. A software firewall is configured to allow or deny traffic to a service running on top of the operating system. Therefore one can install and be running an insecure service, such as Telnet or FTP, and not have to be threatened by a security breach because the firewall would deny all traffic trying to connect to the service on that port.

Graphical user interfaces
Today, most modern operating systems contain Graphical User Interfaces (GUIs, pronounced g-oo-ey-s). A few older operating systems tightly integrated the GUI to the kernel—for example, the original implementations of Windows and Mac OS. More modern operating systems are modular, separating the graphics subsystem from the kernel (as is now done in Linux, and Mac OS X, and to a limited extent Windows).
Many operating systems allow the user to install or create any user interface they desire. The X Window System in conjunction with GNOME or KDE is a commonly found setup on most Unix and Unix derivative (BSD, Linux, Minix) systems. However, some operating systems do not give such a flexible GUI, such as Windows. These operating systems require the use of software to modifiy the existing GUI, and more often that not, they are only able to change simple attributes such as menu style, colors, etc.
GUIs tend to change with time. For example, Windows has modified its GUI every time a new major version of Windows is released and the Mac OS GUI changed dramatically with the introduction of Mac OS X.

Device drivers
A device driver is a specific type of computer software developed to allow interaction with hardware devices. Typically this constitutes an interface for communicating with the device, through the specific computer bus or communications subsystem that the hardware is connected to, providing commands to and/or receiving data from the device, and on the other end, the requisite interfaces to the operating system and software applications. It is a specialized hardware dependent computer program which is also operating system specific that enables another program, typically an operating system or applications software package or computer program running under the operating system kernel, to interact transparently with a hardware device, and usually provides the requisite interrupt handling necessary for any necessary asynchronous time-dependent hardware interfacing needs.
The key design goal of device drivers is abstraction. Every model of hardware (even within the same class of device) is different. Newer models also are released by manufacturers that provide more reliable or better performance and these newer models are often controlled differently. Computers and their operating systems cannot be expected to know how to control every device, both now and in the future. To solve this problem, OSes essentially dictate how every type of device should be controlled. The function of the device driver is then to translate these OS mandated function calls into device specific calls. In theory a new device, which is controlled in a new manner, should function correctly if a suitable driver is available. This new driver will ensure that the device appears to operate as usual from the operating systems' point of view for any person.








Major components of OS


An operating system has two functions. It acts as a resource manager on the one side and a virtual machine on the other side. The resource manager of the operating system manages allocation of memory, processing time and disk space. The virtual machine should provide a nice user interface, other than the bare hardware would provide.UNIX for instance has a resource manager, which allocates memory and processing time in a very efficient way. However the virtual machine leaves a lot to be desired on most UNIX systems. The Apple Macintosh in contrast provides a very nice virtual machine with its graphical user interface, but lacks features like protecting programs from each other and fair distribution of processor time. MS-DOS unfortunately provides neither a powerful resource manager nor a friendly virtual machine.An operating system provides two main services: Filemanagement and Processmanagement.FilesProcessesShells FilesFiles are used to store data and directories are a way of organising files in a hierarchical structure. What UNIX does differently from DOS and other systems is the way it organises different physical storage devices.In DOS there are individual drive names (actually letters from A to Z) denoting the different drives. In UNIX there is essentially just one virtual drive. All physical drives are sub-directories of this virtual drive or other drives.Example: In DOS the first floppy disk drive is always A: and the first hard disk is always C:. When copying a file from the floppy disk directory flop_dir to the hard disk directory hard_dir, we issue the following instruction:copy A:\flop_dir\file C:\hard_dir ProcessesA process is basically a program in execution. It consists of a program, its data, its ownership information (UID), the current position at which the computer is in the programs execution and all the other information needed to run the program. The UNIX operating system will occasionally decide to halt a process running and run another process. This gives every process its fair share of processing time. A process is also halted if it is waiting for some I/O operation to finish, like accessing a printer.When a process is halted the operating system has to store all the information about the processes current state, so that the process can later be restarted exactly where it left off.Processes can start other processes. These child processes have exactly the same ownership and permissions as the parent processes. Parents can control their children and send them signals. The operating system can also send signals to processes. Their are a wide variety of signals, and most programs react to signals by dying. There are a number of programs though, which are mostly operating system related and take more intelligent action towards signals sent to them. ShellsThe strict definition of an operating system limits it to only the basic program which runs the computer and provides systems calls to the users' programs. Usually the command interpreter or shell is not considered part of the operating system. But without the shell, which executes users' commands and programs, and is the primary interface between the computer and the user, a computer would be virtually impossible to use.The basic function of a shell is to allow users to execute programs. Many advanced shells though have features which allow writing of scripts, command-line completion and command-line histories.

Labels:

posted by Gi-an Carlo Yap @ 7:01 PM   0 comments
about me

Name: Gi-an Carlo Yap
Home: Kidapawan, 12, Philippines
About Me: Greedy.Jackfrozen
See my complete profile
Last Post
Archives
Quotes
    When I protect
    someone,
    I won't let
    them get hurt.
    When I dodge,
    I won't let
    them cut me.
    When I attack,
    I won't let them
    cut me!

    I am the sword
    of my bones,
    Steel is my body,
    Fire is my blood,
    I have created a
    thousand blades,
    I am unknown by death,
    nor known by life,
    Have withstood pain,
    to create many weapons,
    yet those hands,
    will never hold anything.
    so, as I pray.
    Unlimited Blade Works


Music
Favorite sites
Classmate-Allstars
Home
Free Blogger templates