A Look at Linux Capabilities
Once I have established the basics, I will start looking into specific areas of Linux and the Linux phenomenon. In future columns and radio programs, expect to see coverage of office suites, web servers, embedded systems and all the other ways Linux is being used.
In addition to the information you find in these brief introductions to the radio show, our web site contains a complete archive of the articles that have appeared in Linux Journal from 1994 through 1999. It also has information on how to subscribe to the print version of Linux Journal, which allows you to keep up to date.
This week, I want to take a look at some features of the Linux operating system which make it stand out from what you find in the basic offerings from Microsoft. If you have a UNIX background, these features will be expected.
First, Linux is a preemptive multi-tasking operating system. Let me explain this in two parts. First, multi-tasking means that the operating system can perform more than one job at once. Or, more accurately, appear to perform more than one job at once. If your computer only has a single CPU then it really can only do one task at a time. What the Linux kernel does is schedules tasks based on a priority scheme and switches between them so that it appears all the tasks are running at once.
Why would you want to do this? Let's say you are using a text editor to edit a document. You might want to grab a web page with your browser or upload a data file to another system while you are working interactively with the editor. To Linux, this is just a simple job of switching between running your text editor and the file transfer program or browser as needed.
The "as needed" gets us to the pre-emptive part. The text editor will need to run when you have entered a keystroke, so it can process the keystroke and update the screen. The browser or transfer program will need to run when it is necessary to process the next input character from the Internet or send the next block of data.
To completely understand this, you need to know that a program called a device driver, rather than the text editor or browser, handles the actual transfer of data from keyboard to video display card and to or from your communications device. Thus, the device driver must be scheduled to send or receive the data, and then the applications program must be run to process the data.
An interrupt is created by the hardware for each unit of transfer (where a unit could be a single character or a block of data, depending on the type of device). The Linux kernel schedules the interrupt handler code of the appropriate device driver to deal with the interrupt.
Once the interrupt handler is done, the Linux scheduler then has to select the next task to run. The selection is made among all tasks that are ready to run. "Ready to run" means they are not waiting for a reason such as keyboard input. Thus, after the device driver handles an interrupt, the choice of what is ready to run is likely to change.
The ability of the task scheduler, part of the Linux kernel, to re-prioritize activities on the fly is the preemptive part of the story. The interrupt caused the device driver to preempt the task that was running, and the result of handling the interrupt could cause a different task to preempt the task that was running before the interrupt. This scheduling capability is what makes the computer appear to be doing multiple tasks at the same time--the computer can get a lot of work done between your keystrokes.
This is simply the ability to have more than one person using a single computer system at the same time. If you are an MS-Windows user, you are probably thinking about how you log in and how this is multi-user. Not so. Note that I said at the same time. On Windows9x, a single person logs in and has control of the computer. On a Linux system, a whole group of users can be logged in and doing work at the same time.
In the early days of Linux Journal, we had one Linux machine and a whole host of serial terminals connected to this single computer. Each user logged in to the single system and did their work. It was up to the Linux kernel to allocate the system resources between all the users and protect the integrity of each task. This is a relatively simple extension to preemptive multi-tasking, but an important one.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Non-Linux FOSS: Caffeine!
- Tech Tip: Really Simple HTTP Server with Python
- Doing for User Space What We Did for Kernel Space
- Parsing an RSS News Feed with a Bash Script
- SuperTuxKart 0.9.2 Released
- Rogue Wave Software's Zend Server
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide