Wednesday, January 12, 2011

Operating System : Types of System Calls

Types of System Calls are:-

1. Process Control
  • end, abort
  • load, execute
  • create process, terminate process
  • allocate and free memory
  • get process attributes, set process attributes
2. File management
  • Create file, delete file
  • Open, close
  • Read, write, reposition
  • Get file attributes, set file attributes
3. Device management
  • Request device, release device
  • Logically attach and detach devices
  • Read, write, reposition
  • Get device attributes, set device attributes
4. Communication
  • Create, delete communication connections
  • Send, receive messages
  • Transfer status information
  • Attach or detach remote devices

Operating System: System Calls and System Programs

System Calls and System Programs

System calls provide an interface between the process and the operating system. System calls allow userlevel processes to request some services from the operating system which process itself is not allowed to do. For example, for I/O a process involves a system call telling the operating system to read or write particular area and this request is satisfied by the operating system.

System programs provide basic functioning to users so that they do not need to write their own environment for program development (e.g. editors, compilers) and program execution (shells). In some sense, they are bundles of useful system calls.

Types of System Calls are: Click Here

Operating System: Open Source & Distributed Systems

Open Source Operating System:-
The distribution of original source materials that can be studied, altered and built upon with the result once again freely distributed are called Open source.

Distributed Systems Operating System:-
A distributed system is a collection of physically separate, possibly heterogeneous computers systems that are networked to provide the users with access to the various resources that the system maintains. A Network is a communication path between two or more systems. Distributed system depends on networking for their functionality.

Application Interface & User Interface of Operating Systems os

Application Interface & User Interface of Operating

Application Interface and User Interface of Operating
Application Interface & User Interface of Operating
Application Interface of Operating Systems os

APIs lets application programmers use functions of the computer and OS without having to directly keep track of all the details in the CPU’s operation.

User Interface of Operating Systems os
A user interface (UI) brings structure to the interaction between a user and the computer.

Tasks of OS Operating System

Tasks of an OS Operating System

1. Process Management:-

The operating system manages many kinds of activities ranging from user programs to system programs. Each of these activities is encapsulated in a process. There are many processes can be running the same program. The five major activities of an operating system in regard to process management are
  • Creation and deletion of user and system processes.
  • Suspension and resumption of processes.
  • A mechanism for process synchronization.
  • A mechanism for process communication.
  • A mechanism for deadlock handling.
2. Memory Management:-
  • Keeping track of which parts of memory are currently being used and by whom.
  • Deciding which processes (or parts thereof) and data to move into and out of memory.
  • Allocating and deallocating memory space as needed.
3. Device Management:-
  • The assembling-disassembling of I/O peripherals devices are managed by the OS.

4. Storage Management:-
The three major activities of an operating system in regard to secondary storage management are:
  • Managing the free space available on the secondary-storage device.
  • Allocation of storage space when new files have to be written.
  • Scheduling the requests for memory access.

Transition from User Mode to Kernel Mode

Operating System (OS) Operations

Operating System OS has two modes of Operation:-

1. User mode
2. Kernel mode (Supervisor mode, system mode or privileged mode)

A bit called mode bit is added to the hardware of the computer to indicate the current mode: kernel (0) or user (1). With the mode bit, we are able to distinguish between a task that is executed on behalf of the OS and one that is executed on behalf of the user.

Transition from User to Kernel Mode
Transition from User to Kernel ModeWhen the computer system is executing on behalf of a user application, the system is in user mode. However, when a user application requests a service from the OS (via system call), it must transition from user to kernel mode to fulfill the request

At boot time, the hardware starts in kernel mode. The OS is then loaded and starts user
application in user mode.

What is Timer / What do you mean by Timer interrupt

Timer / Timer Interrupt

To prevent a user program from getting stuck in an infinite loop or not calling system services and never returning control to the OS, a timer is used. A timer can be set to interrupt the computer after a specified period.

Transition from User to Kernel Mode
Transition from User to Kernel ModeThe OS sets the counter and this counter is decremented every time the clock ticks. When the counter reaches 0, an interrupt occurs which transfers control automatically to the OS.

OS Operations : Operating System Operations

Operating System (OS) Operations

Operating System OS has two modes of Operation:-

1. User mode
2. Kernel mode (Supervisor mode, system mode or privileged mode)

A bit called mode bit is added to the hardware of the computer to indicate the current mode: kernel (0) or user (1). With the mode bit, we are able to distinguish between a task that is executed on behalf of the OS and one that is executed on behalf of the user.

Transition from User to Kernel Mode
Transition from User to Kernel ModeWhen the computer system is executing on behalf of a user application, the system is in user mode. However, when a user application requests a service from the OS (via system call), it must transition from user to kernel mode to fulfill the request

At boot time, the hardware starts in kernel mode. The OS is then loaded and starts user
application in user mode.

Types of Operating System (OS) :-

There are four types of OS categorized based on the types of computers they control and the sort of applications they support.

  1. Real-time OS (RTOS): -They are used to control machinery, scientific instruments and industrial systems. It has a little user interface capability. The very important property of 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.
  2. Single-User, Single Task:- This OS is designed to manage the computer so that one user can effectively do one thing at a time. Example: Palm OS for Palm handheld computers.
  3. Single-user, Multi-tasking:- It let a single user have several programs in operation at the same time. Windows and Apple’s MacOS are example of such OS.
  4. MultiUser:- It allows multiple users to take advantage of the computer’s resourcessimultaneously. It must make sure that the requirements of 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.

History of OS/ Different Generations of Operating System OS

Different Generations of Operating System OS

1940’s (First Generation) :- programming languages were unknown; earlies electronic digital computers had no OS.

1950’s (Second Generation):- Introduction of punch cards; first OS is IBM 701 which runs one job at a time.

1960’s (Third Generation):- concept of multiprogramming in which several jobs are in memory at once and the processor is switched from job to job as needed; time sharing technique in which each user has an on-line terminal and the computer system responds quickly to user requests.

From 1970’s (Fourth Generation):- development of LSI(large scale integration) circuits, chips, OS; personal computer and workstation age; multiprocessor technology evolved; DOS and UNIX were dominated OS .

Classification of OS (Operating System)

Classification of Operating System

Multiuser :- It allows for multiple users to use the same computer at the same time and /or different times. Example: Linux, UNIX, Win 2000.

Multiprocesing :- It is that type of OS that is capable of supporting and utilizing more than one computer processor. Example: UNIX, Win 2000.

Multitasking :-
This OS is capable of allowing multiple software processes to run at the same time. Allows more than one program to run concurrently. Example: UNIX, Win 2000.

Multithreading :- It allow different parts of a single software to run concurrently. Example: Linux, UNIX, Win 2000

Functions of OS, Common OS and Goals/Objective of OS:

Functions of OS:
  1. Implementing the user interface.
  2. Sharing hardware among users.
  3. Facilitating input/output.
  4. Recovering from errors.
  5. Facilitating parallel operations.
Common OS:
  1. Windows(Win 98,XP,Vista,Windows 7)
  2. Macintosh OS X
  3. LINUX and UNIX
  4. i5/OS (IBM iSeries)
  5. z/OS (IBM z series mainframes)
Goals/Objective of OS:
  1. To hide details of hardware by creating abstraction (used to reduce complexity, to enforce
  2. security).
  3. To allocate resources to processes.
  4. To provide a pleasant and effective user interface.
Job Management:- It controls the order and time in which programs are run.

Task Management:- Multitasking, which is the ability to simultaneously execute multiple programs.

Data Management:- It keeps track of the data on disk, tape and optical storage devices. The application program deals with data by file name. The OS’s file system knows where that data are physically stored.

Device management:- It controls peripheral devices by sending them commands in their own propriety language. The software routine that knows how to deal with each device is called a “driver” and the OS requires drivers for the peripherals attached to the computer.

What is an Operating System

Operating System :

  • It is a software program that enables the computer hardware to communicate and operate with computer hardware.
  • It acts as an intermediate layer between application softwares and computer hardware.


Application Softwares
OS
Hardware

  • It is a platform on which application programs executes and interacts with hardware.
  • It performs tasks such as recognizing input from the keyboard, sending output the screen, Keeping track of files and directories on the disk and controlling peripheral devices such as disk drives and printers