ASSIGNMENT Operating System
ASSIGNMENT Operating System
ASSIGNMENT-1
(Q1) WHAT ARE THE OBJECTIVE OF AN OPERATIVE SYSTEM.
ANS. – The operating system is a program with following features-
(1) An operating system is a program that acts as an interface between
the software and computer hardware.
(2) It is an integrated set of specialized program used to manage overall
resources and operations of computer.
(3) It is a specialized software that controls and monitors the execution of
all programs reside in the computer, including application programs
and other system software.
The objective of the operating systems are –
(a) To make the computer system convenient to use in an efficient
manner.
(b) To hide the details of the hardware resources from the users.
(c) To provide users a convenient interface to use the computer
system.
(d) To act as an intermediary between the hardware and its users,
making it easier for the users to access and use other resources.
(e) To manage the resources of a computer system.
(f) To keep track of who is using which resource, granting resource
requests, and mediating conflicting requests from different
programs and users.
(g) To provide efficient and fair sharing of resources among users
and programs
(Q2)- EXPLAIN THE FOLLOWING.
1963: Burroughs Master Control Program (MCP) for the B5000 system
1964: IBM System/360
1972: IBM comes out with VM: the Virtual Machine Operating System
1973: Ethernet
1974 The Personal Computer Age begins
1974: Gates and Allen wrote BASIC for the Altair
1976: Apple II
1991 GNU/Linux
1992 The first Windows virus comes out
1993 Windows NT
2007: iOS
2008: Android OS
(d) Batch operating system-
The users of a batch operating system do not interact with the computer
directly. Each user prepares his job on an off-line device like punch cards and
submits it to the computer operator. To speed up processing, jobs with similar
needs are batched together and run as a group. The programmers leave their
programs with the operator and the operator then sorts the programs with
similar requirements into batches.
(e)Time-sharing operating systems-
A Network Operating System runs on a server and provides the server the
capability to manage data, users, groups, security, applications, and other
networking functions. The primary purpose of the network operating system is
to allow shared file and printer access among multiple computers in a network,
typically a local area network (LAN), a private network or to other networks.
Examples of network operating systems include Microsoft Windows Server
2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare,
and BSD.
Memory Management
Processor Management
Device Management
File Management
Security
Job accounting
Error detecting aids
(1)Memory Management-
(3)Device Management-
An Operating System manages device communication via their respective
drivers. It does the following activities for device management −
Keeps tracks of all devices. Program responsible for this task is known as the I/O
controller. Decides which process gets the device when and for how much time.
Allocates the device in the efficient way. De-allocates devices.
(4)File Management-
A file system is normally organized into directories for easy navigation and
usage. These directories may contain files and other directions. An Operating
System does the following activities for file management −
Keeps track of information, location, uses, status etc. The collective facilities are
often known as file system. Decides who gets the resources. Allocates the
resources. De-allocates the resources.
(c)Job accounting − Keeping track of time and resources used by various jobs
and users.
Program execution
I/O operations
Resource Allocation
Protection
(a)Program execution- Operating systems handle many kinds of activities from
user programs to system programs like printer spooler, name servers, file
server, etc. Each of these activities is encapsulated as a process. A process
includes the complete execution context (code to execute, data to manipulate,
registers, OS resources in use). Following are the major activities of an operating
system with respect to program management −Loads a program into memory.
Executes the program. Handles program's execution. Provides a mechanism for
process synchronization. Provides a mechanism for process communication.
Provides a mechanism for deadlock handling.
(b)I/O Operation-An I/O subsystem comprises of I/O devices and their
corresponding driver software. Drivers hide the peculiarities of specific hardware
devices from the users. An Operating System manages the communication
between user and device drivers. I/O operation means read or write operation
with any file or any specific I/O device. Operating system provides the access to
the required I/O device when required.
(e)Error handling- Errors can occur anytime and anywhere. An error may occur
in CPU, in I/O devices or in the memory hardware. Following are the major
activities of an operating system with respect to error handling − The OS
constantly checks for possible errors. The OS takes an appropriate action to
ensure correct and consistent computing.
There are mainly five types of system calls. These are explained in detail as
follows:
Some of the examples of all the above types of system calls in Windows and
Unix are given as follows
WaitForSingleObject()
File management CreateFile() open()
ReadFile() read()
WriteFile() write()
CloseHandle() close()
There are many different system calls as shown above. Details of some of those
system calls are as follows:
open()-The open() system call is used to provide access to a file in a file system.
This system call allocates resources to the file and provides a handle that the
process uses to refer to the file. A file can be opened by multiple processes at
the same time or be restricted to one process. It all depends on the file
organisation and file system.
read()-The read() system call is used to access data from a file that is stored in
the file system. The file to read can be identified by its file descriptor and it
should be opened using open() before it can be read. In general, the read()
system calls takes three arguments i.e. the file descriptor, buffer which stores
read data and number of bytes to be read from the file.
write()-The write() system calls writes the data from a user buffer into a device
such as a file. This system call is one of the ways to output data from a program.
In general, the write system calls takes three arguments i.e. file descriptor,
pointer to the buffer where data is stored and number of bytes to write from
the buffer.
close()-The close() system call is used to terminate access to a file system. Using
this system call means that the file is no longer required by the program and so
the buffers are flushed, the file metadata is updated and the file resources are
de-allocated.