Process States

Processes can be any of the following states:
New - The process is being created.
process states

Ready - The process is at this stage is set to be ready to use the CPU resources once it is available.
Running - The process is said to be running and actually saying it is using the CPU resources.
Waiting - The process is said to be blocked or waiting for the state for some event to occur.
Terminated - The process has completed its execution.

Introduction to the Process

Process
The process is an instance of a computer program that is being executed. It is also defined as the program in execution.
The process contains multiple threads of execution that executes the instructions concurrently. For example, a word processing program which is run by the individual user is called as the process.
When a program is loaded into the memory and it becomes a process. It is divided into four sections such as stack, heap, text and data. It shows a simplified structure of a process inside main memory.
process


Stack
The process Stack contains the temporary data such as method or function parameters, return address and local variables.The OS allocates the stack for each system-level thread when the thread is created.

Heap
It is the dynamically allocated memory assigned to the process during its run time.
Text
The Text includes the current activity represented by the value of Program Counter and the contents of the processor's registers.
Data
This section contains information about the global and static variable.

Types of Operating Systems

Types of Operating Systems
There are some widely used types of operating system is given above.
uBatch Operating System
uTime sharing Operating system
uMultiprocessor Operating System
uDistributed Operating System
uReal-time Operating System
Types of Operating Systems


Batch Operating System:
Batch Operating System is one of the important types of operating system.In this type of system, there is no direct communication between user and computer. It will complete its jobs automatically without any human intervention. The user has to submit the job that is written on cards or tape to the computer operator. The computer operator creates a batch file consists of same jobs into an input device. Then the memory is allocated for the batch file to complete its execution. There is a special program called Monitor which manages the execution of the batch files.

Time-sharing operating system:
The time-sharing operating system allows many users to share the computer resources simultaneously. It enables many users to access the particular computer resources at the same time. The processor time is shared among the multiple users simultaneously is termed as time sharing.

Multiprocessor Operating System
Multiprocessor Operating System is one of the best types of operating system.Multiprocessing is defined as the two or more central processing units(CPU's)within a single computer system. The multiple CPU's shares the computer bus, memory and other I/O devices.
A multiprocessing system is based on the symmetric multiprocessing model. In this mode, each processor runs the same copy of operating system. In this system, the processor is assigned a specific task. A master processor controls the system. This model is called as the master-slave relationship. The main advantage of the multiprocessor system is to complete the work in a less period of time. The another advantage is that if one processor fails, the other processor will not stop and it will not continue its execution without any disturbance.

Distributed Operating System
A distributed operating system is an operating system that runs on several machines.
This system looks to its users like an ordinary centralised operating system but runs on several independent central processing units (CPUs).
These systems are referred as loosely coupled systems where each processor has its own memory and processors communicate with one another through various communication lines, such as high-speed buses or telephone lines.
The Distributed Operating System involves a collection of autonomous computer systems which are capable of communicating and cooperating with each other through a LAN / WAN.

Real-time Operating System
Real-time Operating System is a multitasking operating system designed for the real-time applications such as embedded systems, industrial robots, scientific research equipment and others. It is divided into two types. They are Hard real-time and Soft real-time systems.
It will provide the maximum response time for hard real-time and average response time for soft real-time applications. 

Evolution of the Operating System:

History and Evolution of the Operating System:
Operating System in 1950’s
1945: ENIAC, Moore School of Engineering, University of Pennsylvania.
1949: EDSAC and EDVAC
1949 BINAC - a successor to the ENIAC
1951: UNIVAC by Remington
1952: IBM 701
1954-1957: FORTRAN was developed

evolution of operating system

Operating Systems In the 1960s
1962 Compatible Time-Sharing System (CTSS) from MIT
1963 Burroughs Master Control Program (MCP) for the B5000 system
1964: IBM System/360
1967-1968: The mouse
1964 : Multics
1969: The UNIX Time-Sharing System from Bell Telephone Laboratories

Operating Systems In the 1960s
1971: Intel announces the microprocessor
1972: IBM comes out with VM: the Virtual Machine Operating System
1973: UNIX 4th Edition is published
1973: Ethernet
1976: Apple II
1983 Microsoft begins work on MS-Windows
1984 Apple Macintosh comes out
1990 Microsoft Windows 3.0 comes out
1991 GNU/Linux
1993 Windows NT
2007: iOS
2008: Android OS
History of Android Operating System
Cupcake:
Android 1.5
Donut:
Android 1.6
Eclair:
Android 2.0
Android 2.1
Froyo:
Android 2.2
Gingerbread:
Android 2.3
Honeycomb:
Android 3.0
Android 3.1
Android 3.2
Ice Cream Sandwich:
Android 4.0
Jelly Bean:
Android 4.1
Android 4.2
Android 4.3
KitKat:
Android 4.4
Lollipop:
Android 5.0
Android 5.1
Marshmallow:
Android 6.0
Nougat:
Android 7.0

Operating system Multiple Choice Questions



operating system

Quiz

1.What is operating system?
a) that controls computer hardware and software resources
b) acts as an intermediary between the computer user and hardware.
c) allows programs to share memory, enabling programs to interact with devices
d) all of the mentioned
Answer : d

2.To access the services of operating system, the interface is provided by the
a) system calls
b) API
c) library
d) assembly instructions
Answer : a


3. What is process?
a) program in High level language kept on disk
b) contents of main memory
c) a program in execution
d) a job in secondary memory
Answer : c

4. Which is the latest mobile version of android?

a)3.0 (Honeycomb)
b)2.3 (Gingerbread)
c)4.09(Icecream Sandwich)
d)7.0(Noughat)

Answer : d

5. In distributed system each processor has its own
a) local memory
b) clock
c) both (a) and (b)
d) none of the mentioned
Answer : c

6. What is interprocess communication?
a) communication within the process
b) communication between two process
c) communication between two threads of same process
d) none of the mentioned
Answer : b

7. What is Thread?
a) Light Weight Process(LWP)
b) Heavy Weight Process(HWP)
c) Process
d) None of these
Answer : a

8) The kernel is _______ of user threads.
a) a part of
b) the creator of
c) unaware of
d) aware of
Answer : c

9) What is a long-term scheduler ?
a) It selects which process has to be brought into the ready queue
b) It selects which process has to be executed next and allocates CPU
c) It selects which process to remove from memory by swapping
d) None of these
Answer : a

10) The FIFO algorithm :
a) first executes the job that came in last in the queue
b) first executes the job that came in first in the queue
c) first executes the job that needs minimal processor
d) first executes the job that has maximum processor needs.
Answer : b


11.If a process is executing in its critical section, then no other processes can be executing in their critical section. This condition is called
a) mutual exclusion
b) critical exclusion
c) synchronous exclusion
d) asynchronous exclusion
Answer : a

12) Semaphore is a/an _______ to solve the critical section problem.
a) hardware for a system
b) special program for a system
c) integer variable
d) None of these
Answer : c


13) Semaphore is accessed through two special operations called
a) wait
b) stop
c) signal
d) Both a and c
Answer : d

14) The code that changes the value of the semaphore is :
a) remainder section code
b) non – critical section code
c) critical section code
d) None of these
Answer : c

15) The dining – philosophers problem will occur in case of :
a) 5 philosophers and 5 chopsticks
b) 4 philosophers and 5 chopsticks
c) 3 philosophers and 5 chopsticks
d) 6 philosophers and 5 chopsticks
Answer : a

16) The two kinds of semaphores are
a) mutex and counting
b) binary and counting
c) counting and mutex
d) decimal and binary
Answer : b

17)What are the requirements for the solution of critical section problem?
a)Mutual Exclusion
b)Progress
c)Bounded Waiting
d)All of the above
Answer : d



18)CPU fetches the instruction from memory according to the value of
a) program counter
b) status register
c) instruction register
d) program status word
Answer : a

19)Which one of the following is the address generated by CPU?
a) physical address
b) absolute address
c) logical address
d) none of the mentioned
Answer : c

20) Every address generated by the CPU is divided into two parts
a) frame bit and offset
b) page number and offset
c) frame number and page number
d) frame offset and status word
Answer : b

21)The __________ is used as an index into the page table.
a) frame bit
b) page number
c) page offset
d) frame offset
Answer : b

22) Physical memory is broken into fixed-sized blocks called
a) frames
b) pages
c) backing store
d) None of these
Answer : a

23) For every process there is a.
a) page table
b) copy of page table
c) pointer to page table
d) All of these
Answer : a

24) The segment base contains the :
a) starting logical address of the process
b) starting physical address of the segment in memory
c) segment length
d) None of these
Answer : b

25) The segment limit contains the :
a) starting logical address of the process
b) starting physical address of the segment in memory
c) segment length
d) None of these
Answer : c



26)Because of virtual memory, the memory can be shared among
a) processes
b) threads
c) instructions
d) none of the mentioned
Answer : a

27) _____ is the concept in which a process is copied into main memory from the secondary memory according to the requirement.
a) Paging
b) Demand paging
c) Segmentation
d) Swapping
Answer : b

28) Virtual memory allows :
a) execution of a process that is completely in memory
b) a program to be larger than the physical memory
c) a program to be larger than the secondary storage
d) execution of a process without being in physical memory
Answer : b

29) The valid – invalid bit, in this case, when valid indicates :
a) the page is legal
b) the page is illegal
c) the page is in memory
d) Both a and c
Answer : d


30) A page fault occurs when :
a) a page gives inconsistent data
b) a page cannot be accesses due to its absence from memory
c) a page is invisible
d) All of these
Answer : b

31)Which of the following one is used by Memory management unit translate the virtual address in to physical address.
a) Memory table
b) Virtual table
c) Page table
d) None of the above
Answer : c

32) The aim of creating page replacement algorithms is to :
a) replace pages faster
b) increase the page fault rate
c) decrease the page fault rate
d) to allocate multiple pages to processes
Answer : c

33) Optimal page – replacement algorithm is :
a) Replace the page that has not been used for a long time
b) Replace the page that has been used for a long time
c) Replace the page that will not be used for a long time
d) None of these
Answer : c

34) LRU page – replacement algorithm associates with each page the ______
a) time it was brought into memory
b) the time of that page’s last use
c) page after and before it
d) All of these
Answer : b


35)______ is a unique tag, usually a number, identifies the file within the file system.
a) File identifier
b) File name
c) File type
d) none of the mentioned
Answer : a

36)File type can be represented by
a) file name
b) file extension
c) file identifier
d) none of the mentioned
Answer : b

37)Which file is a sequence of bytes organized into blocks understandable by the system’s linker?
a) object file
b) source file
c) executable file
d) text file
Answer : a
38)What is the mounting of file system?
a) crating of a filesystem
b) deleting a filesystem
c) attaching portion of the file system into a directory structure
d) removing portion of the file system into a directory structure
Answer : c

39) File attributes consist of :
a) name
b) type
c) identifier
d) All of the above
Answer : d

40) In the sequential access method, information in the file is processed
a) one disk after the other, record access doesn't matter
b) one record after the other
c) one text document after the other
d) None of these
Answer : b

41) The index contains :
a) names of all contents of file
b) pointers to each page
c) pointers to the various blocks
d) All of these
Answer : c

42) In the single level directory
a) All files are contained in different directories all at the same level
b) All files are contained in the same directory
c) Depends on the operating system
d) None of these
Answer : b

43) In the two level directory structure :
a) each user has his/her own user file directory
b) the system has its own master file directory
c) both a and b
d) None of these
Answer : c

44) Path names can be of two types
a) absolute and relative
b) local and relative
c) global and absolute
d) relative and direct
Answer : a

45) An absolute path name begins at the :
a) leaf
b) stem
c) current directory
d) root
Answer : d

46) A mount point is :
a) an empty directory at which the mounted file system will be attached
b) a location where everytime file systems are mounted
c) is the time when the mounting is done
d) None of these
Answer : a

47)If one or more devices use a common set of wires to communicate with the computer system, the connection is called ______.
a) CPU
b) Monitor
c) wirefull
d) bus
Answer : d

48) A character stream device transfers :
a) bytes one by one
b) block of bytes as a unit
c) with unpredictable response times
d) None of these
Answer : a

49) A block device transfers :
a) bytes one by one
b) block of bytes as a unit
c) with unpredictable response times
d) None of these
Answer : b

50)What is Device controller?
a)interface between device and a driver
b)Interface between hardware and main memory
c)Interface between cache and main memory
d)None of the above
Answer : a

51) In _______, information is recorded magnetically on platters.
a) magnetic disks
b) electrical disks
c) assemblers
d) cylinders
Answer : a

52) The time taken to move the disk arm to the desired cylinder is called the :
a) positioning time
b) random access time
c) seek time
d) rotational latency
Answer : c

53) The disk bandwidth is :
a) the total number of bytes transferred
b) total time between the first request for service and the completion on the last transfer
c) the total number of bytes transferred divided by the total time between the first request for service and the completion on the last transfer
d) None of these

Answer : c

54) Consider a disk queue with requests for I/O to blocks on cylinders :
98 183 37 122 14 124 65 67

i) Considering FCFS (first cum first served) scheduling, the total number of head movements is, if the disk head is initially at 53 :
a) 600
b) 620
c) 630
d) 640
Answer : d

ii) Considering SSTF (shortest seek time first) scheduling, the total number of head movements is, if the disk head is initially at 53 :
a) 224
b) 236
c) 245
d) 240
Answer : b

55) In the ______ algorithm, the disk arm starts at one end of the disk and moves toward the other end, servicing requests till the other end of the disk. At the other end, the direction is reversed and servicing continues.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK
Answer : b

56) In the _______ algorithm, the disk head moves from one end to the other , servicing requests along the way. When the head reaches the other end, it immediately returns to the beginning of the disk without servicing any requests on the return trip.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK
Answer : c

57)In the ______ algorithm, the disk arm goes as far as the final request in each direction, then reverses direction immediately without going to the end of the disk.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK
Answer : a