You are on page 1of 6

Unit No.

2: System Structure

Content:
2.1 User operating system interface

2.2 System Calls–

-Process or job control

-Device Management

- File Management

2.3 System Program

2.1 User Operating System Interface – CLI

 Command Line Interface (CLI) or command interpreter allows direct command entry

 Sometimes implemented in kernel, sometimes by systems program

 Sometimes multiple flavors implemented – shells

 Primarily fetches a command from user and executes it

 Sometimes commands built-in, sometimes just names of programs

 If the latter, adding new features doesn’t require shell modification

User Operating System Interface – GUI:


 User-friendly desktop metaphor interface

 Usually mouse, keyboard, and monitor

 Icons represent files, programs, actions, etc

 Various mouse buttons over objects in the interface cause various actions (provide
information, options, execute function, open directory (known as a folder)

 Invented at Xerox PARC


Many systems now include both CLI and GUI interfaces:
 Microsoft Windows is GUI with CLI “command” shell

 Apple Mac OS X as “Aqua” GUI interface with UNIX kernel underneath and shells
available

 Solaris is CLI with optional GUI interfaces (Java Desktop, KDE)

2.2 System Calls:


 System calls provide an interface to the services made available by an operating system.

 These calls are generally available as routines written in C and C++, although certain
low-level tasks (for example, tasks where hardware must be accessed directly) may have
to be written using assembly-language instructions.

 Programming interface to the services provided by the OS

 Typically written in a high-level language (C or C++)

 Mostly accessed by programs via a high-level Application Program Interface (API) rather
than direct system call use.

Types of System Calls:


 System calls can be grouped roughly into six major categories:

 Process control

 File management

 Device management

 Information maintenance

 Communications

 Protection

 Process or Job Control:

 The major system calls available under this category can be follows:

 End, Abort
 Load, Execute

 Create process, Terminate process

 Get process, set process attributes

 Wait for Time

 Wait event, Signal event

 Allocate and Deallocate memory

 File Management:

 The major system calls available under this category can be listed as follows:

 Create file, Delete file

 Open, Close

 Read, Write, Reposition

 Get File Attributes, Set File Attributes.

 Device Management:

 The major system calls available under this category can be listed as follows:

 Request Device, Release Device

 Read, Write, Reposition

 Get Device Attributes, Set Device Attributes

 Logically attach and detach devices.

 Information Management:

 The major system calls available under this category can be listed as follows:

 Get time or date, set time or date

 Get system data, set system data

 Get process, file or device attributes

 Set process, file or device attributes.

 Communication:

 The major system calls available under this category can be listed as follows:
 Create, delete communication connection

 Send, Receive Messages

 Transfer Status Information

 Attach and detach remote device.

 There are two modes of communication:

 Message passing model: Information is exchanged through an inter-process


communication facility provided by Operating System.

 Share Memory Model: In this communication there is an exchange of information


by reading and writing the data in the shared area of the memory.

 Protection:

 The major system calls available under this category can be listed as follows:

 set permission() and get permission()

 allow user() and deny user()

 Example: System Call in Windows and Unix:


2.3 System Program:
 Another aspect of a modern system is its collection of system programs.

 In computer hierarchy the lowest level is hardware. Next is the operating system, then the
system programs, and finally the application programs.

 System programs, also known as system utilities, provide a convenient environment for
program development and execution.

 Some of them are simply user interfaces to system calls. Others are considerably more
complex.

 They can be divided into these categories:

 File management:

 These programs create, delete, copy, rename, print, dump, list, and generally
manipulate files and directories.

 Status information:

 Some programs simply ask the system for the date, time, amount of available memory
or disk space, number of users, or similar status information.

 Others are more complex, providing detailed performance, logging, and debugging
information.

 Typically, these programs format and print the output to the terminal or other output
devices or files or display it in a window of the GUI. Some systems also support a
registry, which is used to store and retrieve configuration information.

 File modification:

 Several text editors may be available to create and modify the content of files stored
on disk or other storage devices.

 There may also be special commands to search contents of files or perform


transformations of the text.

 Programming-language support:
 Compilers, assemblers, debuggers, and interpreters for common programming
languages (such as C, C++, Java, and PERL) are often provided with the operating
system or available as a separate download.

 Program loading and execution:

 Once a program is assembled or compiled, it must be loaded into memory to be


executed.

 The system may provide absolute loaders, relocatable loaders, linkage editors, and
overlay loaders.

 Debugging systems for either higher-level languages or machine language are needed
as well.

 Communications:

 These programs provide the mechanism for creating virtual connections among
processes, users, and computer systems.

 They allow users to send messages to one another’s screens, to browse Web pages, to
send e-mail messages, to log in remotely, or to transfer files from one machine to
another.

 Background services:

 All general-purpose systems have methods for launching certain system-program


processes at boot time.

 Some of these processes terminate after completing their tasks, while others continue
to run until the system is halted.

 Constantly running system-program processes are known as services, subsystems, or


daemons.

You might also like