4. Functions of Operating Systems
1. User interface
2. Program Management
3. Resource Management - Manage hardware devices
4. Memory Management - Organized file storage
5. Process management – Manage the running process and its
data
5. 1.Providing a User Interface
• User interface
– It’s a platform where users interact with the computer
– Users command and instructions are taken through the input
devices
– Two types of UI
• Graphical User Interface – GUI – current generation
• Command Line Interface – CUI – 3rd Generation
6. • Graphical user interface (GUI)
– Input devices like mouse and touchpads are used
– It’s a common interface
– Desktop concept is implemented
– Graphical way of working with icons, movement of cursors, sounds
etc.
– Shortcuts are used to open new documents
– Dialog Boxes and Message boxes are used frequently for user input
– Eg. Windows OS
7. • Command line interfaces CUI
– Used mostly by first to third generation computers
– Eg.DOS, UNIX
– User should know the various command to interact
– Not user friendly
8. 2. Program Management
• Helps to manage all the current running programs
• Deals with System call to correspond to OS
• Clipboard are used to share some data between programs
• Works with RAM and harddisk
• Linked with process management
9. 3. Resource Management
• Establish a coordination between various hardware devices
• Helps the application to access hardware
• Interrupts are generated to control the access of CPU and
other hardware devices
• Device drivers software helps in controlling the new linked
hardware
10. 4. Memory Management
• Helps in organizing Files and Folders
• Helps in optimizing the storage of the computer
• Helps in File name and directory management
• Deals mostly with storage unit
11. 4. Process Management
• A process is defined as a program in execution.
• Process Switching takes place
Teaching Tip
File and folder storage is covered in chapter 6.
Insider information
The first commercial GUI was the Xerox Star.
Teaching Tip
There are several types of dialog boxes. Any errors are displayed in a dialog box. This box is system modal - it requires a response before returning to the OS. Save and print boxes are application modal - The box must be dealt with before returning to the application. However, other OS tasks can be performed.
Teaching tip
Demonstrate the command line interface in Windows by running cmd. In the command line interface use ping and ipconfig as commands that cannot be run in the GUI.
Teaching tip
Most students have never encountered a link. I use MS Excel and MS Word to link. Create and save a simple spreadsheet in Excel. Copy the spreadsheet to the clipboard. Open MS Word and paste-link the spreadsheet. Save the MS Word document. Then change and save the spreadsheet in Excel. The word document is automatically updated.
Discussion point
The mouse uses an interrupt. Many users will move the mouse while waiting for the CPU to finish a task. What does moving the mouse do to the current process?
Teaching tip
Discuss what can happen when the wrong driver is installed on a computer.
Central to the design of operating systems is the concept of process. This term was
first used by the designers of Multics in the 1960s [DALE68]. It is a somewhat
more general term than job. Many definitions have been given for the term process ,
including
• A program in execution
• An instance of a program running on a computer
• The entity that can be assigned to and executed on a processor
• A unit of activity characterized by a single sequential thread of execution, a
current state, and an associated set of system resources
Figure 2.8 indicates a way in which processes may be managed. Two processes,
A and B, exist in portions of main memory. That is, a block of memory is
allocated to each process that contains the program, data, and context information.
Each process is recorded in a process list built and maintained by the OS. The
process list contains one entry for each process, which includes a pointer to the
location of the block of memory that contains the process. The entry may also
include part or all of the execution context of the process. The remainder of the
execution context is stored elsewhere, perhaps with the process itself (as indicated
in Figure 2.8 ) or frequently in a separate region of memory. The process index
register contains the index into the process list of the process currently controlling
the processor. The program counter points to the next instruction in that process
to be executed. The base and limit registers define the region in memory occupied
by the process: The base register is the starting address of the region of memory
and the limit is the size of the region (in bytes or words). The program counter and
all data references are interpreted relative to the base register and must not exceed
the value in the limit register. This prevents interprocess interference.
In Figure 2.8 , the process index register indicates that process B is executing.
Process A was previously executing but has been temporarily interrupted. The
contents of all the registers at the moment of A’s interruption were recorded in its
execution context. Later, the OS can perform a process switch and resume execution
of process A. The process switch consists of storing the context of B and restoring
the context of A. When the program counter is loaded with a value pointing into A’s
program area, process A will automatically resume execution.