Professional Documents
Culture Documents
The theory, practical experiences and relevant soft skills associated with this course are to be
taught and implemented, so that the student demonstrates the following industry oriented
COs associated with the above mentioned competency:
1
TYPES OF OPERATING SYSTEM
I. Batch Systems:
Main function of a batch processing system is to automatically keep executing the jobs in a
batch. A batch operating system normally reads a stream of separate jobs (from a card
reader. For example,), each with its own control cards that predefine to prevent errors and
improper use of the computer. It is concerned with the operation and control if I/O devices.
A batch system is one in which jobs are bundled together with the instruction necessary to
allow them to be processed without intervention. Often jobs of a similar nature can be
bundled together to further increase economy. Common input devices were card readers and
tape drives. The basic physical layout of the memory of batch job computer is shown in fig.
The OS was simple; its major task was to transfer control from one job to the next. The job
was submitted to the computer operator in form of punch cards. At some later time, the
output appeared. The OS was always resident in memory. Often magnetic tapes and drums
were used to store intermediate data and compiled programs.
Example: Payroll system, stock control and billing systems.
No need of special hardware and system support to input data in batch systems.
Best for large organizations but small organizations can also benefit from it.
Batch systems can work offline so it makes less stress on processor.
Sharing of batch system for multiple users.
The batch systems can manage large repeated work easily.
2
II. Multiprogramming:
3
III. Time-Sharing Systems:
Interactive Computing: In time sharing system, the CPU executes multiple jobs by switching
among them. The main idea of time sharing systems is to allow a large number of users to
interact with a single computer system concurrently. In time sharing system, the CPU
executes multiple jobs by switching among them. The switches occur so frequently that the
users can interact with each program while it is running.
A time sharing system allows many users to share the computer resources simultaneously.
Since each action or command in a time shared system tends to be short, only a little CPU
time is needed for each user. As the system switches rapidly from one user to the next, each
user is given the impression that the entire computer system is dedicated to his use, even
though it is being shared among many users. The systems were developed to provide an
interactive use of the computer system. Most time sharing systems use time-slicing (Round
Robin) scheduling. A program executing longer than the system defined time slice is
interrupted by the operating system and place at the end of the queue of waiting programs for
execution.
Example:
In above figure the user 5 is active but user 1, user 2, user 3, and user 4 are in waiting state
whereas user 6 is in ready status. As soon as the time slice of user 5 is completed, the control
moves on to the next ready user i.e. user 6. In this state user 2, user 3, user 4, and user 5 are in
waiting state and user 1 is in ready state. The process continues in the same way and so on.
4
IV. Multiprocessor OS:
Multiprocessor systems are also known as parallel systems or tightly coupled systems. These
systems have two or more processors in close communication and they share computer
resources such as bus, clock, memory and peripheral devices. The whole task of
multiprocessing is managed by the operating system, which allocates different tasks to be
performed by the various processors in the system. Applications designed for the use in
multiprocessing are said to be threaded, which means that they are broken into smaller
routines that can be run independently. This allows the operating system to let these threads
run on more than one processor simultaneously, which is multiprocessing that results in
improved performance. Generally, the parallel processing is used in the fields like artificial
intelligence and expert system, image processing, weather forecasting etc.
5
V. Real Time OS:
Real time system has well defined fixed time constraints. Processing should be done within
the Defined constraints. A primary objective of real-time systems is to provide quick event
response time and thus meet the scheduling deadlines. User convenience and resource
utilization are of secondary concern to real-time system designers. In Real time systems,
processor is allocated to the highest priority process among those that are ready to execute.
Higher priority processes preempt execution of the lower priority processes. This form is
called as ‘priority–based preemptive scheduling’. The primary functions of the real time
operating system are to:
Manage the processor and other system resources to meet the requirements of an
application.
Synchronize with and respond to the system events.
Move the data efficiently among processes and to perform coordination among
these processes.
6
VI. Distributed Operating System
7
VII. Mobile OS
iOS
iOS is a mobile operating system designed by Apple to run its smartphone, the iPhone, as
well as its tablet computer, the iPad. iOS is structured on the Mac OS X operating system,
with added functionality pertinent to mobile devices, but does not directly run Mac OS X
applications. The structure of iOS appears in the following figure.
Cocoa Touch is an API for Objective-C that provides several frameworks for developing
applications that run on iOS devices. The fundamental difference between Cocoa, mentioned
earlier, and Cocoa Touch is that the latter provides support for hardware features unique to
mobile devices, such as touch screens.
The media services layer provides services for graphics, audio, and video.
The core services layer provides a variety of features, including support for cloud computing
and databases. The bottom layer represents the core operating system, which is based on the
kernel environment.
Android
The Android operating system was designed by the Open Handset Alliance (led primarily by
Google) and was developed for Android smartphones and tablet computers. Whereas iOS is
designed to run on Apple mobile devices and is close-sourced, Android runs on a variety of
mobile platforms and is open-sourced, partly explaining its rapid rise in popularity. The
structure of Android is shown in the figure below
8
Figure: Architecture of Google’s Android
Android is similar to iOS in that it is a layered stack of software that provides a rich set of
frameworks for developing mobile applications. At the bottom of this software stack is the
Linux kernel, although it has been modified by Google and is currently outside the normal
distribution of Linux releases. Linux is used primarily for process, memory, and device-
driver support for hardware and has been expanded to include power management. The
Android runtime environment includes a core set of libraries as well as the Dalvik virtual
machine. Software designers for Android devices develop applications in the Java language.
However, rather than using the standard Java API, Google has designed a separate Android
API for Java development. The Java class files are first compiled to Java bytecode and then
translated into an executable file that runs on the Dalvik virtual machine. The Dalvik virtual
machine was designed for Android and is optimized for mobile devices with limited memory
and CPU processing capabilities. The set of libraries available for Android applications
includes frameworks for developing web browsers (webkit), database support (SQLite), and
multimedia.
The libc library is similar to the standard C library but is much smaller and has been designed
for the slower CPUs that characterize mobile devices.
9
COMMANDS
4. banner: Display an argument string as a poster with maximum of ten character per
line.
Syntax : $banner <name>
10
8. passwd: Command is used to change your password.
Syntax: $passwd <uname>
9. su(sudo): Provide a super user priviledges.
Syntax: $su ls
10. pwd: pwd(Parent Working Directory)is used To print the complete path
of the current working directory.
Syntax: $pwd
11
Process related Commands
1) Ps: Display the characteristics of a process. ( ie. Terminal number, time required,
PID number, command name)
$ps –f: Full listening showing PPID of each process.
$ps –a : Process of all user.
$ps –e : Processes including user and system process.
$ps –u username : Display’s processes of user ‘username’.
Syntax: $ps
2) Wait: Waits until all background processes are complete and then exits.
Syntax: $wait
3) sleep 3: Used to execute commands after certain amount of time by sleeping for
given second.
Syntax: $sleep
12
4) exit: Used to quit the shell.
Syntax:$exit
13
File and Directory manipulation command
Syntax: ls –l<filename>
14
3. mv: It is used to move the file from one location to another.
Syntax: $mv [option] source destination
5. join: It is used for joining line of two files on the basis of common field in each file called
as a key.
-t : Field separator
-o : Specify the column from each table that must be included.
6. split: It is used to split the large file into smaller files. Default size is 1000 lines per file.
$split –n : number of lines in each smaller files.
Syntax:$split –n filename
7. cat: It is used to create the file and displaying the contents of files .
Syntax: $cat >filename
15
8. head: It is used to read the first ten lines of file. The number of lines to be displayed may
be specified in the head command.
9. tail: It is used to print last few numbers of lines of a certain file, then terminates.
+n: Displays all lines starting from nth line.
-n: Displays n lines from end of the file.
l : Indicates lines
b: Indicates blocks
c : Indicates character
16
10. touch: It is the easiest way to create new, empty file.
Syntax: $touch <filename>
17
Directory manipulation command
4. pwd: pwd stands for Parent Working directories. It is used to see specific Unix directory
on which the user is working on.
Syntax: $pwd
18
5. diff: This command is used to show difference between two text file.
Syntax:$diff
6. comm: This command compares two sorted files. It compare each line of first file with its
corresponding line in second file and generate three column output.
7. pr: The pr command does minor formatting of files on the terminal screen or for a printer.
Syntax: $proption filename
Syntax: $dir
19
10. cmp: This command is used to compare files when used without option.
Syntax: $cmp
Syntax: $tr
2. wc: This command is used to find out number of lines, words and character in file.
Syntax: $wc
3. cut: It is used to copy the specified column to the standard output file. It is used to cut
portion of a file .
4. paste: It is used to join files horizontally by outputting lines consisting of lines from each
file specified, separated by tab as delimiter, to the standard output.
20
5. spell: Spell is a spell-checking program which scans a text file for misspelled word on its
own line.
7. sort: SORT command is used to sort a file, Arranging the records particular line.
-o : Write the output to a new line.
-n : Sort a file numerically
-r : Sort in reverse order.
Syntax: $sort
21
Syntax: grep –c
9. more: If the file is too large for its contents to fit in one screen, it will scroll of your
screen when the file is displayed with cat command then use more command.
j : Scroll forward one line.
f : Scroll forward one screen.
b : Scroll backward one screen.
k : Scrolls backward one line.
200G : Goes to line no. 200.
G : Goes to last line of the file.
22
Communication related Commands
23
NUMERICAL:
Consider the following set of processes, with the length of the CPU burst given in
milliseconds
Process Burst Time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
i) Nonpreemptive priority
Gantt chart:
P2 P5 P1 P3 P4
0 1 6 16 18 19
P P P3 P4 P5 P1 P3 P5 P1 P5 P P5 P P5 P P1 P P1 P1
1 2 1 1 1 1
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Processes Arrival T. Burst T. Completion T. Turnaround T. Waiting T.
P1 0 10 19 19 9
P2 0 1 2 2 1
P3 0 2 7 7 5
P4 0 1 4 4 3
P5 0 5 14 14 9
24