0% found this document useful (0 votes)
73 views

Unit 1 Chap - 1

The document discusses the evolution of operating systems across five generations: 1) First generation OS (1945-1955) used vacuum tubes, punched cards, and filled entire rooms. Programs were wired using plugboards with no OS or user interface. 2) Second generation (1955-1965) used transistors, magnetic tapes, and batch processing systems. Programs were run in batches via punched cards with OS and high-level languages introduced. 3) Third generation (1965-1980) used integrated circuits, time-sharing, and remote processing. OS and interfaces improved efficiency via multiprogramming and spooling. 4) Fourth generation (1980-present) used microprocessors and personal computers. OS supported
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Unit 1 Chap - 1

The document discusses the evolution of operating systems across five generations: 1) First generation OS (1945-1955) used vacuum tubes, punched cards, and filled entire rooms. Programs were wired using plugboards with no OS or user interface. 2) Second generation (1955-1965) used transistors, magnetic tapes, and batch processing systems. Programs were run in batches via punched cards with OS and high-level languages introduced. 3) Third generation (1965-1980) used integrated circuits, time-sharing, and remote processing. OS and interfaces improved efficiency via multiprogramming and spooling. 4) Fourth generation (1980-present) used microprocessors and personal computers. OS supported
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Operating System Chapter 1

Q1 What is operating systems? Explain its functions.


Definition:
• Operating System is a system software which acts as an interface between user
and hardware.
• OS hides the hardware and provides user with easy and simple interface.
• It is responsible for efficient allocation of resources between applications, file
system management and security of device.

Functions of operating system


Operating system is an extended machine
• The architecture of most computers at the machine-language level is primitive
and awkward to program, especially for input/output
• operating systems provides layer of abstraction for using disks: files.
• Using this abstraction, programs can create, write, and read files, without having
to
• deal with the messy details of how the hardware actually works
• Abstraction is the key to managing all the complexity.
• Good abstractions turn a nearly impossible task into two manageable ones.
• The first is defining and implementing the abstractions.
• The second is using these abstractions to solve the problem at hand.
• operating system primarily provides abstractions to application. programs in a
top-down view
• Eg : It is much easier to deal with photos,
• emails, songs, and Web pages than with the details of SATA (or other) disks.

Operating system is a resource manager


• Modern computers consist of processors, memories, timers, disks, mice, network
interfaces,
• printers, and a wide variety of other devices.
• In the bottom-up view, the operating system provides for an orderly and
controlled allocation of the processors, memories, and I/O devices among the
various programs.
• allow multiple programs to be in memory and run at the same time.
• Resource management includes multiplexing (sharing) resources in two different
• ways: in time and in space.
• In time multiplexed, different programs takes turns using CPU. First one of them
gets to use the resource, then the another, and so on.
• Eg: Sharing the printer. When multiple print jobs are queued up for printing on a
single printer, a decision has to be made about which one is to be printed next
• In space multiplexing, Instead of the customers taking turns, each one gets part of
the resource.
• Eg: main memory is divided up among several running programs, so each one can
be resident at the same time

1
Operating System Chapter 1

Q2 FIRST Generation
Year- 1945-55
Name- Vacuum tubes and plugboards
Hardware-
1. Vacuum tubes circuitry for processor-
• Vacuum tubes were used as a switch in order to process digital data. Huge
machines with more than 20,000 vacuum tubes used to occupy entire
room.
• These computers were too much slower than even a cheapest PC
available today
• Magnetic drums for memories which were very bulky.
Software/programming-
• Machine language programming by wiring circuits using plug boards
• High level and assembly level languages were unknown; concept of OS
was not introduced.
Input -through plug boards or punched cards
Output - displayed as printouts.
Applications- numerical calculations , scientific applications
Advantages- fastest computing device in that era
Disadvantages- enormous in size, complex, no user interface, large heat generation and
super-expensive
Examples- ENIAC, ADVAC, IBM 701, IBM 704, UNIVAC

Q3 SECOND GENERATION
2nd Generation OS-:
Year- 1955-65
Name- Transistors and Batch Systems, also called mainframes
Hardware-
• Transistors circuitry for processor and Magnetic tapes as memory
• With invention of transistors, computer became more reliable and
comparatively smaller than 1st generation.
• These computers were kept in special AC computer rooms and professional
operators were kept to run them.
• To run a job, programmer need to write program on paper (FORTRAN or
assembly code), then punch it on cards. But lot of time was required to
execute a single job.
• Solution- Batch System
Collect multiple jobs (punched cards) together and then read them onto
magnetic tape using small inexpensive computer IBM 1401. For actual
numerical and scientific processing use big expensive computer with more
capacity IBM 7094
Software- Assembly language programming/ high level language FORTRAN
FORTRAN- Formula Translation- Imperative programming language developed
specially for numerical and scientific calculations.
Input -through punched cards
Output - displayed as printouts.
Applications- numerical calculations , scientific applications, printing jobs
Advantages- smaller, faster, cheaper, energy efficient and reliable than 1st
Generation
Disadvantages- Expert human operation, huge size
Examples- IBM 1620, IBM 7090, IBM 1401, IBM 7094

2
Operating System Chapter 1

Q4 Third Generation
3rd Generation OS-:
Year- 1965-80
Name- ICs and Multiprogramming
- Hardware- IC- multiple transistors, capacitors, resistors on single silicon chip
- Maximum memory(RAM and Hard disk), high processor speed, I/O devices
- Software- High level language programming like C,FORTRAN
- Operating System- OS 360
- Input -through keyboard, punched cards.
- Output - displayed on monitors.
Applications- big scientific calculations and massive data processing
- Advantages-
o Smaller
o faster because of semiconductor,
o cheaper, energy efficient and reliable
o OS and interface
o Multiprogramming-
▪ In 2nd generation, when current job is paused to wait for tape or
other I/O operation, CPU sat idle. So lot of CPU time is wasted.
▪ Solution- Partition memory into several parts, and store
different job in each partition.
▪ If job one job is waiting for I/O, CPU starts executing next job
instead of sitting idle.
o SPOOLING- Simultaneous Peripheral Operation
On-Line
▪ Simultaneous Peripheral Operation On
Line
▪ When running job is finished, that job is
removed from memory by OS.
▪ And new job from the disk is loaded
into the empty memory partition.
▪ This will increase CPU efficiency and
speed of operation.
o Time sharing and remote processing
▪ Each user has online terminal and each user can access CPU
remotely. CPU time is shared by each of the users.

- Examples- IBM 360 ,IBM 370, CDC 7600, STAR 100

Q4 Fourth Generation
4th Generation OS-:
Year- 1980-Present
Name- Personal Computers and Microprocessor
Hardware-
Microprocessor (VLSI technology)
- Semiconductor RAM, Magnetic hard disk
Software-
- High level language programming languages
- e.g. C, C++, java, asp.net
Operating systems- MS-DOS, FreeBSD, MS-Windows, UNIX, LINUX, MAC OS

3
Operating System Chapter 1

- Computers supported Graphical User Interface (GUI). Macintosh was the first 4th
generation computer with GUI developed by Apple.
Input -through keyboard, mouse
Output - displayed on monitors, printers, speaker
Advantages-
• Small, compact computers
• Fastest processor, fast memory access
• cheap, energy efficient and reliable
• Multiprogramming
• Time sharing and remote processing
• Resource sharing
Examples- IBM ES (9000)

Q5 Fifth Generation
Year- 1990-Present
Name- Mobile computers
Hardware-
• Microprocessor (VLSI technology)
• Handheld Computers and smartphone
• Combining telephony and computing in phone like device
Software-
• Java programming
• High level language programming languages
Operating systems- Android, iOS, Symbians, RIM’s Blackberry OS
Input – Touch screen
Output - displayed on Screen or PDA
Advantages-
• Small, compact computers
• Fastest processor, fast memory access
• Portable
• Email surfing, navigation, games etc in a small device

-
Q6 Disk Structure

• Disk storage is cheaper and larger than RAM.


• The only problem is that the time to randomly access data on it is slower.
• Disk is a mechanical device

4
Operating System Chapter 1

• A disk consists of one or more metal platters that rotate at 5400, 7200, 10,800
RPM or more. A mechanical arm pivots over the platters from the corner
• Each of the heads can read an annular region called a track.
• Together, all the tracks for a given arm position form a cylinder.
• Each track is divided into some number of sectors, typically 512 bytes per sector.

Q7 SYSTEM CALLS FOR PROCESS MANAGEMENT

1. Fork is the way to create a new process .


2. It creates an exact duplicate of the original process, including all the file descriptors,
registers—everything.
3. After the fork, the original process and the copy (the parent and child) go their
separate ways. All the variables have identical values at the time of the fork, but
since the parent’s data are copied to create the child, subsequent changes in one
of them do not affect the other one. (The program text, which is unchangeable, is
shared between parent and child.)
4. The fork call returns a value, which is zero in the child and equal to the child’s PID
(Process IDentifier) in the parent.
5. Using the returned PID, the two processes can see which one is the parent process
and which one is the child process.

Q8 SYSTEM CALLS FOR FILE MANAGEMENT

1. To read or write a file, it must first be opened.


2. This call specifies the file name to be opened, either as an absolute path name or
relative to the working directory, as well as a code of O RDONLY, O WRONLY, orO
RDWR, meaning open for reading, writing, or both.
3. To create a new file, the O CREAT parameter is used.
4. The file can be closed by close,
5. Associated with each file is a pointer that indicates the current position in the file.
6. lseek call changes the value of the position pointer, so that subsequent calls to read
or write can begin anywhere in the file.

5
Operating System Chapter 1

7. Lseek has three parameters: the first is the file descriptor for the file, the second is
a file position, and the third tells whether the file position is relative to the
beginning of the file, the current position, or the end of the file.
8. For each file, UNIX keeps track of the file mode (regular file, special file, directory,
and so on), size, time of last modification, and other information. Programs can ask
to see this information via the stat system cal

Q9 SYSTEM CALLS FOR DIRECTORY MANAGEMENT

1. mkdir creates and empty directories.


2. rmdir removes an empty directories.
3. link : Its purpose is to allow the same file to appear under two or more names, often
in different directories.
4. A typical use is to allow several members of the same programming team to share
a common file, with each of them having the file appear in his own directory,
possibly under different names.
5. Every file in UNIX has a unique number, its i-number, that identifies it. This i-number
is an index into a table of i-nodes, one per file, telling who owns the file, where its
disk blocks are, and so on.
6. By executing the mount system call, the USB file system can be attached to the root
file system
7. The mount call makes it possible to integrate removable media into a single
integrated file hierarchy, without having to worry about which device a file is on

Q10 MISCELLANEOUS SYSTEM CALLS

1. Chdir call changes the current working directory


2. Chmod is used to change the protection mode. The mode includes read, write and
execute
3. Kill system call is a way user process sends signals for killing the process
4. Time returns the current time of the systems

6
Operating System Chapter 1

Q11 MONOLITHIC STRUCTURE:

1. In the monolithic approach the entire operating system runs as a single program in
kernel mode
2. The operating system is written as a collection of procedures, linked together into
a single large executable program.
3. Each procedure in the system is free to call any other process
4. Being able to call any procedure makes the system very efficient
5. No information hiding —every procedure is visible to every other procedure
6. Eg MS DOS and LINUX
7. This organization suggests a basic structure for the operating system:
➢ Main Function- invokes requested service procedure
➢ Service Procedures- carry out system calls
➢ Utility functions- Help service procedures to perform certain tasks
8. Disadvantage:
➢ Difficult and complicated structure
➢ A crash in any of these procedures will take down the entire operating
system

Q12 LAYERED SYSTEM :

1. The operating system is organized as a hierarchy of layers, each one constructed


upon the one below it.
2. The first system constructed in this way was the THE system
3. The system had six layers, as shown in Fig. 1-25.
4. Layer 0 dealt with allocation of the processor, switching between processes when
interrupts occurred or timers expired.
5. Layer 1 did the memory management. It allocated space for processes in main
memory

7
Operating System Chapter 1

6. Layer 2 handled communication between each process and the operator console
7. Layer 3 took care of managing the I/O devices and buffering the information
streams
8. Layer 4 was where the user programs were found.
9. Layer 5 : The system operator process was located.

Q13 MICROKERNELS

1. This method structures the operating system by removing the all non essential
components from the kernel and implementing it in user space
2. The basic idea behind the microkernel design is to achieve high reliability by
splitting the operating system up into small, well-defined modules
3. the microkernel—runs in kernel mode
4. The main function of microkernel is to provide a communication facility between
the client program and various services that are also running in user space
5. All new services are added to the user space and the kernel don’t need to be
modified
6. Microkernel provides high security and reliability as most of the services are
running in user space , if a service fails the rest operating system remains untouched
7. Disadvantage :
Performance decrease due to increased system function overhead

Q14 CLIENT-SERVER MODEL

1. The servers, each of which provides some service, and the clients, which use these
services. This model is known as the client-server model.
2. Since clients communicate with servers by sending messages, the clients need not
know whether the messages are handled locally on their own machines, or whether
they are sent across a network to servers on a remote machine.

8
Operating System Chapter 1

3. As far as the client is concerned,: requests are sent and replies come back.
4. Thus the client-server model is an abstraction that can be used for a single machine
or for a network of machines.

Q15 Virtual Machines

• Virtual machines allow you to run other OS within your current OS


• the operating systems will run as if they’re just another program on your
computer.
• A virtual machine is a program that acts as a virtual computer.
• It runs on your current operating system – the “host” operating system – and
provides virtual hardware to “guest” operating systems.
• Advantages-
• Allows multiple operating system environments on a single physical computer
without any intervention
• Multiprogramming & multi-user
• Disadvantages-
• Less efficient as hardware resources are distributed in indirect way

You might also like