Você está na página 1de 5

computer.howstuffworks.

com/operatin
g-system3.htm
1.Need of Operating System
At the simplest level, an operating system does two things:

1. It manages the hardware and software resources of the system. In a desktop


computer, these resources include such things as the processor, memory, disk
space, etc. (On a cell phone, they include the keypad, the screen, the address
book, the phone dialer, the battery and the network connection.)
2. It provides a stable, consistent way for applications to deal with the hardware
without having to know all the details of the hardware.

The first task, managing the hardware and software resources, is very important, as
various programs and input methods compete for the attention of the central processing
unit (CPU) and demand memory, storage and input/output (I/O) bandwidth for their own
purposes. In this capacity, the operating system plays the role of the good parent, making
sure that each application gets the necessary resources while playing nicely with all the
other applications, as well as husbanding the limited capacity of the system to the greatest
good of all the users and applications.

The second task, providing a consistent application interface, is especially important if


there is to be more than one of a particular type of computer using the operating system,
or if the hardware making up the computer is ever open to change. A consistent
application program interface (API) allows a software developer to write an application
on one computer and have a high level of confidence that it will run on another computer
of the same type, even if the amount of memory or the quantity of storage is different on
the two machines.

Even if a particular computer is unique, an operating system can ensure that applications
continue to run when hardware upgrades and updates occur. This is because the operating
system and not the application is charged with managing the hardware and the
distribution of its resources. One of the challenges facing developers is keeping their
operating systems flexible enough to run hardware from the thousands of vendors
manufacturing computer equipment. Today's systems can accommodate thousands of
different printers, disk drives and special peripherals in any possible combination.

The operating system is the interface between the hardware and the user. If there were no
O/S, the computer would be an expensive door stop.

Types of scheduler?
Types of operating system schedulers
Operating systems may feature up to 3 distinct types of schedulers: a long-term scheduler
(also known as an admission scheduler or high-level scheduler), a mid-term or medium-
term scheduler and a short-term scheduler (also known as a dispatcher). The names
suggest the relative frequency with which these functions are performed.

[edit] Long-term Scheduler

The long-term, or admission, scheduler decides which jobs or processes are to be


admitted to the ready queue; that is, when an attempt is made to execute a program, its
admission to the set of currently executing processes is either authorized or delayed by
the long-term scheduler. Thus, this scheduler dictates what processes are to run on a
system, and the degree of concurrency to be supported at any one time - ie: whether a
high or low amount of processes are to be executed concurrently, and how the split
between IO intensive and CPU intensive processes is to be handled. In modern OS's, this
is used to make sure that real time processes get enough CPU time to finish their tasks.
Without proper real time scheduling, modern GUI interfaces would seem sluggish.
[Stallings, 399].1

Long-term scheduling is also important in large-scale systems such as batch processing


systems, computer clusters, supercomputers and render farms. In these cases, special
purpose job scheduler software is typically used to assist these functions, in addition to
any underlying admission scheduling support in the operating system.

[edit] Mid-term Scheduler

The mid-term scheduler temporarily removes processes from main memory and places
them on secondary memory (such as a disk drive) or vice versa. This is commonly
referred to as "swapping out" or "swapping in" (also incorrectly as "paging out" or
"paging in"). The mid-term scheduler may decide to swap out a process which has not
been active for some time, or a process which has a low priority, or a process which is
page faulting frequently, or a process which is taking up a large amount of memory in
order to free up main memory for other processes, swapping the process back in later
when more memory is available, or when the process has been unblocked and is no
longer waiting for a resource. [Stallings, 396] [Stallings, 370]

In many systems today (those that support mapping virtual address space to secondary
storage other than the swap file), the mid-term scheduler may actually perform the role of
the long-term scheduler, by treating binaries as "swapped out processes" upon their
execution. In this way, when a segment of the binary is required it can be swapped in on
demand, or "lazy loaded". [Stallings, 394]
[edit] Short-term Scheduler

The short-term scheduler (also known as the CPU scheduler) decides which of the ready,
in-memory processes are to be executed (allocated a CPU) next following a clock
interrupt, an IO interrupt, an operating system call or another form of signal. Thus the
short-term scheduler makes scheduling decisions much more frequently than the long-
term or mid-term schedulers - a scheduling decision will at a minimum have to be made
after every time slice, and these are very short. This scheduler can be preemptive,
implying that it is capable of forcibly removing processes from a CPU when it decides to
allocate that CPU to another process, or non-preemptive (also known as "voluntary" or
"co-operative"), in which case the scheduler is unable to "force" processes off the CPU.
[Stallings, 396].

2.What is short term scheduler and


medium term scheduler?
3.SINGLE TERM SCHEDULER:

MS-DOS
AmigaOS
Classic Mac OS (System 1 through Mac OS 9).
Windows 1.0
Windows 2.0
Windows 3.0
Windows 3.1x
Windows 95
Windows 98
Windows ME

Types of Operating Systems


Within the broad family of operating systems, there are generally four types, categorized
based on the types of computers they control and the sort of applications they support.
The categories are:

• Real-time operating system (RTOS) - Real-time operating systems are used to


control machinery, scientific instruments and industrial systems. An RTOS
typically has very little user-interface capability, and no end-user utilities, since
the system will be a "sealed box" when delivered for use. A very important part of
an RTOS is managing the resources of the computer so that a particular operation
executes in precisely the same amount of time, every time it occurs. In a complex
machine, having a part move more quickly just because system resources are
available may be just as catastrophic as having it not move at all because the
system is busy.
• Single-user, single task - As the name implies, this operating system is designed
to manage the computer so that one user can effectively do one thing at a time.
The Palm OS for Palm handheld computers is a good example of a modern single-
user, single-task operating system.
• Single-user, multi-tasking - This is the type of operating system most people use
on their desktop and laptop computers today. Microsoft's Windows and Apple's
MacOS platforms are both examples of operating systems that will let a single
user have several programs in operation at the same time. For example, it's
entirely possible for a Windows user to be writing a note in a word processor
while downloading a file from the Internet while printing the text of an e-mail
message.
• Multi-user - A multi-user operating system allows many different users to take
advantage of the computer's resources simultaneously. The operating system must
make sure that the requirements of the various users are balanced, and that each of
the programs they are using has sufficient and separate resources so that a
problem with one user doesn't affect the entire community of users. Unix, VMS
and mainframe operating systems, such as MVS, are examples of multi-user
operating systems.

Photo courtesy Apple


Mac OS X Panther screen shot

It's important to differentiate between multi-user operating systems and single-user


operating systems that support networking. Windows 2000 and Novell Netware can each
support hundreds or thousands of networked users, but the operating systems themselves
aren't true multi-user operating systems. The system administrator is the only "user" for
Windows 2000 or Netware. The network support and all of the remote user logins the
network enables are, in the overall plan of the operating system, a program being run by
the administrative user.

With the different types of operating systems in mind, it's time to look at the basic
functions provided by an operating system.

Você também pode gostar