Posts

Operating Systems in a Nutshell !

Operating systems are event driven collection of programs that manages integrate hardware and software services and makes them available to users, hardware, and other operating systems. The main goal for an Operating system is to make it easier for users and I/O devices. The major services of the operating system are:

User Interface and Command Execution Services

The main purpose of this service is to be an intermediate between the user and the computer. The two main interfaces are the Graphical User Interface GUI and the Command Line Interface CMI. As their names suggest with the GUI everything is primarily displayed as images and somewhat “dumb-ed” down for users. The CMI mechanism provides the user with a usually black screen, and the user can type in commands he wants to be executed.

The command execution service can be subdivided into two categories, resident and nonresident commands. The resident commands are those commands the reside in memory in order to be accessed immediately. The nonresident commands, as you might expect, do not remain on memory and is loaded into memory as necessary.

File management

The OS also serves file management system. Because files are not always stored contiguously on the disk a file management system is needed in order to be able to keep track where files are stored on the disk. The file management system also provides tools, in which a user can copy, move or load a file. It also takes care of providing I/O devices with the files needed, even though the I/O device or the user doesn’t know the file structure of the device being accessed.  More advanced file management systems provide users with back up features and recovery mechanisms which are useful if “things go wrong.”

Input/Output Services

Some of the I/O services include the implementations of interrupts (described in a previous post). The I/O drivers also assure access to critical devices.  These drivers are usually stored in the systems BIOS. The Basic Input Output System is responsible for initializing major I/O devices when first starting up a computer. Some of these I/O peripherals include the keyboard, mouse, graphics card, hard disk…etc

Process Control Management

A process is simply a program in execution. The Operating system, which also consists of processes, manage these processes giving them the “right of execution.” Also it keeps track of what resources each process needs and what resources have been released from a process to make it available for other processes. Some programs break down processes even further down into what is called threads.

Memory Management

Memory management is a very important service of an operating system. It allocates memory for process to be able to execute. It also keeps track of memory in use, and may provide a process with more memory as needed. It also clears up memory when a process is done with execution. The concept of virtual memory becomes very important here, and the reason why the user feels the computer is actually multi-tasking, doing more than one thing at a time. I will elaborate about this concept in a later post.

Scheduling and Dispatch

In order for no process to starve the operating system is in charge of scheduling which process is next on the list to be executed, this is called high level scheduling. It is also responsible of dispatching the processes, in which is the actual selection of the process in which will transmitted for execution.

This task is a very hard task in order to have an efficient and smooth running system. There are many strategies used. The first one is the a program uses the CPU and once it needs to use an I/O device the second program is executed and so on. A more effective method is by using a technique called time-slicing. What happens within this technique an OS dispatcher program throws an clock interrupt and give another process the “right of execution.”( I like using the word throw because it remind me with exceptions “thrown” in JAVA)

This service is also responsible for what is called context switching. It is responsible for the preservation of the context of a process and reloading it later on. The context of a process are: the process state, program counter, register values, and other parameters representing the state of the program.

Secondary Storage Management

The secondary storage management makes use of completing I/O tasks in an efficient manner; it uses a combination of both software and hardware to make it possible. It uses different algorithms   in order to facilitate the disk space in such a manner that would be able to maximize the use of the disk.

Network and Communications Support Services

The operating system provides users with an array of network and communication services. Some include the top layers of the TCP/IP suite, which was described in a previous post. Other applications includes the control of VoIP and other network applications such as file sharing.

System Administrative Support And Security.

The Operating System allows users to change different settings on the computer in an easy manner. This of course includes administrating different users on a certain computer, managing networks and others. Security is also an important part of the operating system. Some of these services includes protecting user files from other users on the computer, or preventing users from accessing system files on the computer.