Operating System Essay

QUESTION 1 Scheduling is a fundamental operating systems function. Almost all computer resources are scheduled before use. CPU is one of the primary computer resources uses scheduling to design the processes in an operating system. The operating system can make the computer more productive by switching the CPU among processes called CPU scheduler. a) Explain what is CPU scheduler? State FOUR (4) goals of the CPU scheduler in an operating system. CPU scheduler is to selects from among the processes in memory ready to execute and allocates the CPU to one of them. CPU scheduling decisions may take place when a process: Switches from running to waiting state (by sleep). • Switches from running to ready state (by yield). • Switches from waiting to ready (by an interrupt). • Terminates (by exit). Four goals of the CPU scheduler: 1. Utilization and efficiency – to keep the CPU as busy as possible all of the time with useful work. 2. Turnaround time – from the time of submission to time of completion, minimize the time batch users must wait for output. 3. Response time – time from submission till the first response is produced. A scheduler should minimize response time for interactive users. 4.

Fairness – to make sure each process gets a fair share of the CPU and no process can suffer indefinite postponement. b) Briefly describe some important concepts related to scheduling algorithms that exist in several operating systems below: 1. First-Come, First-Served Scheduling (FCFS) In First Come First Served the job that has been waiting the longest is served next, simply queues processes in the order that they arrive in the ready queue. • Since context switches only occur upon process termination, and no reorganization of the process queue is required, scheduling overhead is minimal. Throughput can be low, since long processes can hog the CPU • Turnaround time, waiting time and response time can be low for the same reasons above • No prioritization occurs, thus this system has trouble meeting process deadlines. • The lack of prioritization does permit every process to eventually complete, hence no starvation. 2. Shortest-Job-First Scheduling (SJF) • Shortest Job First scheduling algorithm is a nonpreemptive scheduling algorithm that chooses the job that will execute the shortest amount of time. Maintain the ready queue in order of increasing job lengths. When a job comes in, insert it in the ready queue based on its length. When current process is done, pick the one at the head of the queue and run it. 3. Priority Scheduling • In priority scheduling, processes are allocated to the CPU on the basis of an externally assigned priority. The key to the performance of priority scheduling is choosing priorities for the processes. • Scheduling method where at all times the highest priority process is assigned the resource. • Allows CPU to be given preferentially to important processes. Scheduler adjusts dispatcher priorities to achieve the desired overall priorities for the processes, e. g. one process gets 90% of the CPU. 4. Round-Robin Scheduling (RR) • Round Robin scheduling is a scheduling method where each process gets a small quantity of time to run and preempted for the next process gets to run. • This is called time-sharing and gives the effect of all the processes running at the same time. • Run process for one time slice, then move to back of queue. Each process gets equal share of the CPU. 5. Multiple-Processor Scheduling CPU scheduling more complex when multiple CPUs are available due to load sharing. • Each processor schedules itself, dealt with a single processor. • Homogeneous processors within a multiprocessor (CPUs must be the same). • Asymmetric multiprocessing – only one processor accesses the system data structures. • Load sharing – use a common ready queue. c) Many criteria have been suggested for comparing CPU scheduling algorithms. Discuss FIVE (5) scheduling criteria that can be determine of the best algorithms. Different CPU scheduling algorithms have different properties.

We will write a custom essay sample on
Operating System Essay
or any similar topic only for you
Order now

Choice of a particular algorithm may favor one class of processes over another. Many criteria suggested for comparing CPU scheduling algorithms and any characteristics are used for comparison can make a difference for the best CPU scheduling algorithms. The criteria as following: 1. CPU utilization – We want to keep the CPU as busy as possible. CPU utilization can range from 0 to 100 percent. In a real system, it should range from 40 percent (for a lightly loaded system) to 90 percent (for a heavily loaded system). 2. Throughput – When CPU is busy executing processes, then work is being done.

One measure of work is the number of processes that are completed per time unit. For long processes, this rate may be one process per hour. For short transactions, it may be 10 processes per second. 3. Turnaround time – From the point of view a particular process, the important criteria is how long it takes to execute that process. The interval from the time of submission of a process to the time of completion. Turnaround time is the sum of the periods spent waiting to get into memory, waiting in ready queue, executing on the CPU, and doing input-output. . Waiting time – CPU scheduling algorithm does not affect the amount of the time during which a process executes or does I/O, it affects only the amount of time that a process spends waiting in the ready queue. Waiting time is the sum of periods spend waiting in the ready queue. 5. Response time – In an interactive system, turnaround time may not be the best criteria. Often, a process can produce some output fairly early and can continue computing new results while previous results are being output to user.

Thus, another measure is the time from the submission of a request until the first response is produced. This measure, called response time, is the time it takes to start responding, not the time it takes to output the response. The turnaround time is generally limited by the speed of the output device. d) Discuss the scheduling algorithms in the Windows XP Operating System. Explain what types of scheduling algorithm that are running in an operating system? • Windows XP uses a quantum-based, preemptive priority scheduling algorithm • Threads are scheduled rather than processes. Preemptive priority algorithm is implemented with multiple queues, it can also be considered a multiple feedback-queue algorithm. However, each class of thread is normally restricted to a small band of 5 priority levels, from 2 below the base priority for its process to 2 above. Each band of priorities overlaps with the band above it and the band below it. • Preemption can occur for any of 4 reasons: o higher-priority thread becomes ready o thread terminates o time quantum exhausted o thread performs a blocking system call, such as for I/O, in which case it leaves the READY state and enters a WAITING state. 32 priority levels are used, where priority 31 is the highest priority and priority 0 is the lowest priority o memory management thread: priority 0 ? text shows idle thread with priority 1, which is higher than the memory management thread, but it does not explain how this could work o variable class of priorities (1-15) o real-time class of priorities (16-31) • Threads in the real-time class have fixed priorities • The running thread is always one with the highest priority level. • If no ready thread exists, the idle thread is run. When a thread’s time quantum runs out, its priority is lowered (by one it appears), but its priority is never lowered too far • When a thread becomes READY after WAITING, it is given a priority boost, with the largest boost for waiting for keyboard I/O and a smaller boost for waiting for disk. • Any thread of the process associated with the window that the user is currently interacting with (the foreground process) is given a priority boost and as well has its quantum size tripled. QUESTION 2 Linux is a freely distributed operating system that behaves like the Unix operating system.

Linux was designed specifically for the PC platform and takes advantage of its design to give users comparable performance to high-end UNIX workstations. Many big-name companies have joined the Linux bandwagon such as IBM and Compaq, Red Hat, Corel, and Samba. a)Explain briefly the history of Linux operating system. State THREE (3) design goals for the Linux operating system. History of Linux. Linux is developed in 1991 by Linus Torvalds when he was a student at the University of Helsinki, Finland. He released it for free on the internet. Linux is a Unix-like computer Operating System that uses the Linux kernel.

Linux started out as a personal computer system used by individuals, and has since gained the support of several large corporations, such as Sun Microsystems, HP and IBM. It is now used mostly as a server operating system, with some large organizations using an enterprise version for desktops. Design goals for the Linux operating system. 1. Linux is friendly network – Linux supports most of the major protocols, internet, nvell, windows, appletalk networking and quite a few of the minor ones. 2. Linux is multi user – One user is running several programs or several users are running one program, Linux is capable to managing the traffic. . Linux is free – Linux consumer is free to modify the system and do anything. Acquiring Linux does not necessarily require any cash outlay at all. b) Briefly describe some important concepts related to Linux operating systems below: i. Memory Management When an operating system manages the computer’s memory, there are two broad tasks to be accomplished: • Each process must have enough memory in which to execute, and it can neither run into the memory space of another process not be run into by another process. The different types of memory in the system must be used properly so that each process can run most effectively. • The first task requires the operating system to set up memory boundaries for types of software and for individual applications. [pic] ii. Processor Management The heart of managing the processor comes down to two related issues: • Ensuring that each process and application receives enough of the processor’s time to function properly. • Using as many processor cycles as possible for real work. iii. Device Management

The path between the operating system and virtually all hardware not on the computer’s motherboard goes through a special program called a driver. Much of a driver’s function is to be the translator between the electrical signals of the hardware subsystems and the high-level programming languages of the operating system and application programs. Drivers take data that the operating system has defined as a file and translate them into streams of bits placed in specific locations on storage devices, or a series of laser pulses in a printer. iv. File Management

To provide a number of commands to manage files and directories. Their strong point is the ability to use them in a rather simple manner against a group of files/directories meeting certain conditions. For example all the files satisfying specific criteria can be deleted or have their names changed. c) Discuss TWO (2) types of user interface that support Linux operating system Menu Bar Macs are drastically different than XP on the fundamental issue of menu bars. In both Windows and Linux each running program/application has its own menu bar across the top of its window.

Below is a screen shot of Klondike solitaire and the Calculator running in Ubuntu. Solitaire has the colored menu bar because it’s the active application. Macs have a single menu bar at the top of the screen that changes, depending on which program are actively using. [pic] Task Bar Both Windows XP and Linux have a task bar along the bottom of the screen that provides an inventory of currently running applications. In the screen shot below we can see that Calculator and Klondike solitaire are both running, and that Klondike is minimized.

Just as with Windows, left clicking in Ubuntu on the task bar button for a minimized application makes it visible. Right clicking on items in the task bar brings up the same five options as in Windows (Minimize, Maximize, Close, Restore, Move and Size). In addition, Ubuntu offers an “Always On Top” option and a handful relating to workspaces, a concept we can grow into or easily ignore. [pic] d) Explain briefly the advantages and disadvantages of the Linux operating system compare to the Windows operating system. Advantages of Linux compare to Windows Topic |Linux |Windows | |Cost |Linux is very cheap or free for desktop or home use, |Windows is expensive, must buy for the licence | |Software |Can run it on any number of computers for no additional|Allows a single copy of Windows to be used on only | | |charge |one computer | |OS Running |Normally Linux also runs from a hard disk, but there |To run Windows, it has to first be installed to | | |are quite a few versions of Linux that run completely |your hard disk.

Cannot run from CD | | |from a CD without having to be installed to a hard disk| | |Security |Linux users are not burdened with the need for anti |Windows users are burdened with the need for | | |virus and anti-spyware software |anti-virus and anti-spyware software | |Multiple Users |Linux is a multi-user system |Windows is not because it designed to be used by | | | |one person at a time | |Open Source |Many of the Linux variants and programs are open source|Microsoft Windows is not open source and the | | |and enable users to customize or modify the code |majority of Windows programs are not open source. | | |however they wish to. | | Disadvantages of Linux compare to Windows Topic |Linux |Windows | |Application software |The installation of applications under Windows, while |Installing software under Linux varies with each | |installation |not standardized, is generally consistent and |distribution and has not been nearly as simple, | | |generally pretty easy |easy or obvious as Windows | |Supported Hardware |The hardware vendors write drivers for Windows still |The hardware vendors write drivers for Windows | |Devices |limited compare to windows |more often than they do for Linux | |Printer Drivers |Does not support many printers drivers |Support many printers driver | |Support |Difficult to find users familiar with all Linux |Microsoft Windows includes its own help section, | | |variants, there are vast amounts of available online |has vast amount of available online documentation | | |documentation and help, available books, and support |and help, as well as books on each of the versions| | |available for Linux. |of Windows. |Software |Linux has a large variety of available software |Windows has a much larger selection of available | | |programs, utilities, and games. |software. There is a much larger selection of | | | |available software programs, utilities, and games | | | |for Windows. | |Ease |Majority Linux variants have improved dramatically in |Windows is still much easier to use for new | | |ease of use. |computer users.

Microsoft has made several | | | |advancements and changes that have made it a much | | | |easier to use operating system than Linux. | References Books : • Silberschatz Abraham,Gagne Greg & Galvin Peter Baer. (2002). Operating system concepts. John Wiley & Sons. • Fundamental of Operating System • Linux Concepts Internets : • wiseGEEK. com. “What is an operating system? ” 2008. (Aug. 11, 2008) http://www. wisegeek. com/what-is-an-operating-system. htm • http://en. wikipedia. org/wiki/Scheduling_(computing) • http://news. cnet. com/8301-13554_3-9985154-33. html • http://www. computerhope. com/issues/ch000575. htm • http://www. michaelhorowitz. com/Linux. vs. Windows. html

×

Hi there, would you like to get such a paper? How about receiving a customized one? Check it out