Professional Documents
Culture Documents
DESIGN BY PROF YK
UNIT THREE
By Prof YK
12/8/21 2
SIDDHIVINAYAK CLASSES
DESIGNING THE APPLICATION ARCHITECTURE
1. It consists of application software programs that will carry out the function of the
system.
2. Application design must be done in the conjunction with the design of the database.
3. Application design must be done in the conjunction with the design of the user
interface.
By Prof YK
12/8/21 3
SIDDHIVINAYAK CLASSES
SYSTEM FLOW CHART
1. It is an diagram that describes the overall flow of control between computer
programs in a system.
2. It also shows the relationships among
a) various programs.
b) subsystems.
c) Files or database.
3. It documents the architectural structure of the overall system.
4. Processes are grouped into programs and subsystems based on similarities such as
• shared timing.
• Access to store data.
• Users.
5. It graphically describes the organization of the subsystems into automated and
manual components showing the data flow , flow of control and interactions with
permanent data stores.
6. It is also used to describe systems that perform batch processing.
By Prof YK
12/8/21 4
SIDDHIVINAYAK CLASSES
7. In system flow chart, the individual data stores have been converted into database files.
Symbols Used
By Prof YK
12/8/21 5
SIDDHIVINAYAK CLASSES
Structured Chart
By Prof YK
12/8/21 6
SIDDHIVINAYAK CLASSES
Symbols Used in Structured Chart.
MODULE
COMMON SUB-ROUTINE
MODULE
CONTROL FLAG
DATA COUPLE
By Prof YK
12/8/21 7
SIDDHIVINAYAK CLASSES
DEVELOPING STRUCTURED CHART
2. Transform Analysis.
• The development of a structure chart based on a DFD that describes the input
process, output process, Dataflow.
• It uses DFD fragments to develop sub trees, one for each event in a program.
• Each sub-tree root module corresponds to the first level branch of the main
program structure chart.
• It is based on the idea that computer program transforms input data into output
information.
By Prof YK
12/8/21 8
SIDDHIVINAYAK CLASSES
• General form a structure chart developed with transform analysis is input-process-output.
Following Steps are followed to create Structure charts:
1. Determine the primary information flow.
2. Find the process that represents the most fundamental change from an input stream to
an output stream.
The output data stream is called the efferent data flow and central process is called
central transform.
3. Redraw the data flow diagram according to the DFD rules omitting non primary data.
4. Generate first draft structure chart, based on the redrawn data flow, with calling hierarchy
and the required data couples.
5. Add other modules as necessary.
6. Add other required inter module relationships such as looping and decisions using
Structured English or Decision Tables.
7. Make the final requirement to the structure chart based on the quality control
concepts.
By Prof YK
12/8/21 9
SIDDHIVINAYAK CLASSES
Integrity Control.
• Integrity control mechanism and procedure that are built into the system to safeguard
both the system and the information contained within it.
• Design of the interface must carefully consider mechanism to protect the system
integrity.
Objectives:
• To Ensure that only appropriate and correct Business Transaction occurs.
• To Ensure that the transaction are recorded and processed correctly.
i.e. to check for bugs, data entry errors and fraudulent processes.
• To protect and safeguard the assets(including information) of the organization against
computer crash and Catastrophes.
By Prof YK
12/8/21 10
SIDDHIVINAYAK CLASSES
System Access Control
• These are the mechanism that are established to restrict or control what portions of the
computer system a person can use.
• This category includes a control to limit access to certain applications or function within a
application.
• Advantage of this approach is that a consistent set of access controls is then applied to
every resource on a hardware platform or network.
• There are three categories of users:
1. Unauthorized User.
2. Registered User.
3. Privileged User.
By Prof YK
12/8/21 11
SIDDHIVINAYAK CLASSES
Managing User Access.
• Most Common Technique for managing user access to information System is a user
identifier(User ID) and Passwords.
• Two Techniques are used to defined Passwords:
1. Computer Generated.
2. User Defined.
• Some Syntax is always kept on passwords.
• The security system should be organized so that all resources can be access using the
same unique identifier and password combination.
• Another policy has to be designed to ensure ongoing security is that of changing
password periodically.
• A final Security step is to make sure the system keeps a record or attempted logons.
By Prof YK
12/8/21 12
SIDDHIVINAYAK CLASSES
Input Integrity Controls:
By Prof YK
12/8/21 13
SIDDHIVINAYAK CLASSES
Output Integrity Control
The purpose of output integrity controls is to ensure that output arrives at the proper
destination and is correct ,accurate ,current and complete.
Especially important that reports with sanative information arrive at the proper
destination and they cannot be accessed by unauthorized persons.
By Prof YK
12/8/21 14
SIDDHIVINAYAK CLASSES
Design of input Systems
When designing inputs for the system. The system developer must perform four tasks:
1. Identify the devices and mechanism that will be used to enter input.
2. Identify all system inputs and develop a list with data content of each.
3. Determine what kinds of controls are necessary for each system input.
4. Design and prototype the electronic forms and other inputs.
When designing outputs for the system. The system developer must perform four tasks:
1. Determine the type of each output.
2. Make a list of specific outputs required based on application design.
3. Specify any necessary controls to protect the information provided in the output.
4. Design and prototype the report layout.
By Prof YK
12/8/21 15
SIDDHIVINAYAK CLASSES
Type of output
1. External output.
2. Internal Output.
Type of Report
1. Detailed Report.
2. Summary Report.
3. Exception Report.
4. Executive Report.
5. Control Break Report.
6. Screen Output.
7. Drill Down.
8. Linking.
9. Graphical and Multimedia Presentation.
By Prof YK
12/8/21 16
SIDDHIVINAYAK CLASSES
Interface Design
By Prof YK
12/8/21 17
SIDDHIVINAYAK CLASSES
END OF UNIT THREE
By Prof YK
12/8/21 18
SIDDHIVINAYAK CLASSES
OPERATING SYSTEM
UNIT THREE
SYLLABUS
• MEMORY MANAGEMENT.
• FILE MANAGEMENT.
• I/O MANAGEMENT.
• DISK MANAGEMENT.
12/08/2021 20
MEMORY MANAGEMENT
12/08/2021 21
Memory is central to the operation of a modern computer system.
Memory consists of a large array of words or bytes, each with its
own address.
The CPU fetches instructions from according to the value of the
program counter.
These instructions may cause additional loading from and storing
to specific memory addresses.
A typical instruction-execution cycle, for example,
1. first fetches an instruction from memory.
2. The instruction is then decoded and may cause operands to be
fetched from memory.
3. After the instruction has been executed on the operands, results
may be stored back in the memory.
12/08/2021 22
What is Address Binding and explain Compile, Load and Execution Time ?
• Reloadable Address.
• Symbolic Address.
A user program may go through several steps before being executed. Addresses may be
represented in different ways during these. Addresses in the source program are generally
symbolic.
A compiler will typically bind these symbolic addresses to relocatable addresses and the
linkage loader will convert the relocatable addresses to absolute addresses.
Each binding is a mapping from one address space to another.
• With dynamic loading, a routine is not loaded until it is called. All routines are kept on disk
in a relocatable load format.
• When a routine needs to call another routine, the calling routine first checks to see
whether the other routine has been loaded.
• If not, the relocatable linking loader is called to load the desired routine into memory and
then the control is passed to the newly loaded routine.
• Some OS supports static linking, in which system language libraries are treated like any
other object module and are combined by the loader into the binary program image.
•The concept of dynamic linking is similar to that of dynamic loading, where linking is
postponed until execution time.
•With dynamic linking, a stub is included in the image for each library routine reference.
•When the stub is executed, it checks to see whether the needed routine is already in
memory. If not, the program loads the routine in the memory.
•The stub replaces itself with the address of the routine and executes the routine.
•Using this scheme, all the processes that use a language, library execute only one copy of
the library code.
•This feature can be extended to library updates, in which the program references the new
version of the library automatically.
•Without dynamic linking, all the programs would need to be relinked to gain access to the
new library.
DISADVANTAGE:
•Thus, only programs that are compiled with the new library version are affected by the
incompatible changes incorporated in it.
•Other programs linked before the new library was installed will continue using the older
library.
12/08/2021 25
Write a shot note on swapping?
The memory is divided into two partitions: one for the resident OS and one for the user
processes.
The OS is placed either in the low or high memory.
The major factor affecting this decision is the location of the interrupt vector.
Since the interrupt vector is often in low memory, programmers usually place the OS in
the low memory as well.
Simplest method is to divide the memory into several fixed – partitions. Each partition
may contain exactly one process. Thus, degree of multiprogramming is bound by the number
of partition.
When process terminates, the partition becomes available for another process.
In fixed partition scheme, the OS keeps a table indicating which parts of memory are
available & which are occupied.
Initially all memory is available for user processes & is considered as one large block of
available memory, a hole.
When a process arrives and needs memory, we search for a hole enough for this process
and used as much needed.
12/08/2021 27
The Strategies
1. First Fit: Allocate first hole that is large enough.
2. Best Fit: Allocate smallest hole that is large enough.
3. Worst Fit: Allocate the largest hole.
* Fragmentation:
•Both first and best fit suffer from external fragmentation.
• As processes are loaded & removed from the memory the free space is broken into
little pieces.
•External fragmentation exists when there is enough total memory space to satisfy a
request but spaces are not contiguous.
•This fragmentation problem can be severe. i.e. we could have a block of free spaces
between every two processes.
•Statistics analysis of first bit, for instance, reveals that, given N allocated blocks,
another 0.5N blocks will be lost to fragmentation. i.e. one-third of memory is wasted.
This property is known as the 50-percent rule. It can be external or internal.
Solution: Compaction
12/08/2021 28
What is paging
•Paging avoids the considerable problem of fitting memory chunks of varying sizes onto the
backing store.
•The basic method for implementing paging involves breaking physical memory into fixed-
sized blocks called frames and breaking logical memory into blocks of the same size called
pages.
•When a process is to be executed, its pages are loaded into available memory frames from
the backing store.
•The backing store is divided into fixed sized blocks that are of the same size as the memory
frames.
•Every address generated by the CPU is divided into two parts: A page number (P) and a page
offset (D).
•The page number is used as index into a page table.
• The page table contains base address of each page in physical memory.
• This base address is combined with the page offset to define the physical memory address
that is sent to the memory unit.
12/08/2021 29
What is Segmentation and Explain segmentation with paging?
Segmentation:
•It is a memory management scheme that supports the user view of memory. i.e. a
logical address space is a collection of segments.
•Each segment has a name and a length. Address specifies both the segments name &
the offset.
•Logical address consists of a two:
Duple: <Segment –number, offset>
Segmentation with paging:
• Here, logical – address space of a process is divided into partitions.
•The first partition consist of up to 8 MB segments that are private to that process.
•The second partition consist of up to 8 KB segment that are shared among all the
process.
•Info about the first partition is kept in the Local descriptor table (LDT); and Info about
the second partition is kept in the Global descriptor table (GDT).
•Each entry in the LDT and GDT consist of an 8 byte segment descriptor with detailed info
about a partition segment, including the base location and the limit of that segment.
12/08/2021 30
Virtual Memory Management:
•The common problem before programmers few years ago was how to fit large
programs into the small memory. The solution developed was to break
programs into small pieces called overlays.
• Although the swapping was done by operating system, the work of creating
number of layers in a program was done by a programmer which was a time
consuming job.
•The virtual memory is a memory management technique which does the
splitting of a program into number of pieces as well as swapping.
• The basic idea behind virtual memory is that the combine size of the program,
data and stack may exceed the amount of physical memory. The OS keeps only
those parts of the program in the memory which are required during execution
and the rest on the disc.
•Virtual memory is a memory management scheme that allows the execution of
process that may not be completely is main memory. In the other words, virtual
memory allows execution of partially loaded process. As a consequence user
programs can be larger than physical memory.
12/08/2021 31
Advantages of virtual memory
1. The size of users program would no longer be considered by the available size of
physical memory.
2. Since each user utilizes less physical memory, more users can keep their programs
in the memory simultaneously which helps to improve CPU utilization and
throughput.
3. Since a process may be loaded into a space of arbitrary size, which in turn reduces
external fragmentation without the need to change the scheduled order of process
execution.
4. Moreover the amount of space in use by given process may be changing during its
memory residence. As a result the OS may speed up the execution of important
processes by allocating more physical memory.
12/08/2021 32
What is demand paging
12/08/2021 33
The procedure for handling this page fault is
1. If a process refers to a page which is not in the physical memory then an internal table
kept with PCB of that process is checked to verify whether a memory reference to a
page was valid or not.
2. If the memory reference to a page was valid, but the page is missing, then the process
to bring the referenced page into the physical memory starts.
3. Free memory location is identified to bring the missing page.
4. By reading the storage disk, the desired page is brought back into the free memory
location.
5. Once the page is in the physical memory, the internal table kept with the PCB of that
process and the PMT is updated to indicate that the page is now in memory.
6. Restart the instruction that was interrupted due to the missing page.
The hardware to support demand paging is
7. Page table: This table has the ability to mark an entry invalid through a valid-invalid bit.
8. Secondary memory: This memory holds those pages that are not present in main
memory. The secondary memory is usually a high speed disk. It is known as the swap
device, and the section of disk used for this purpose is known as swap space.
12/08/2021 34
Explain page replacement
12/08/2021 36
Belady Anomaly
12/08/2021 37
END OF CHAPTER
FILE MANAGEMENT
12/08/2021 39
• Definition:
File is a collection of logically related data.
Name: The symbolic file name is the only info kept in human readable form.
Identifier: This unique tag, usually a number, identifies the file within the file system; it
is the non-human-readable name for the file.
Type: This info is needed for systems that support different types of files.
Location: This info is a pointer to a device and to the location of the file on that device.
Size: The current size of the file and possibly the maximum allowed size are included in
this attribute.
Protection: Access-control info determines who can do reading, writing, executing, and
so on.
Time, date, and user identification: This info may be kept for creation, last modification,
and last use. These data can be useful for protection, security, and usage monitoring.
12/08/2021 40
Explain the different types of access methods?
• Sequential Access:
• Direct Access:
• Other Access Methods:
12/08/2021 41
Explain the different directory structures?
• Single Level Directory:
12/08/2021 42
•Two Level Directory:
12/08/2021 44
Explain the file system structure?
Application programs
I / O Control
12/08/2021
DEVICES 45
Write a short note in directory implementation?
Linear List
A linear list of directory entries requires a linear search to find a particular entry.
To create a new file, we must first search the directory to be sure that no existing file has
the same name. Then, we add a new entry at the end of the directory.
To delete a file, we search the directory for the named file, and then release the space to
it.
Disadvantage:
1. Linear search which is very slow.
Hash Table
Here, linear list stores the directory entries, but a hash data structure is also used.
The hash table takes a value computed from the file name and returns a pointer to the
file name in the linear list.
So, the search time is decreased. Insertion and deletion are also fairly straightforward,
although some provision must be made for collisions.
Disadvantages:
1. Fixed size table and dependence of the hash function on that size.
12/08/2021 46
Explain the different types of allocation methods?
Contiguous Allocation
It requires each file to occupy a set of contiguous blocks on the disk.
Disk addresses a linear ordering on the disk.
Contiguous allocation of a file is defined by the disk address and
length of the first block.
Both sequential and direct accesses are supported by contiguous
allocation.
Disadvantages:
1. Finding space for a new file.
2. External fragmentation
12/08/2021 47
Linked Allocation
With linked allocation, each file is a linked list of disk blocks may be scattered
anywhere on the disk.
The directory contains a pointer to the first and last blocks of the file. To create a
new file, we simply create new entry in the directory.
With linked allocation, each directory entry has a pointer to the first block of the
file.
Advantage:
1. No external fragmentation
2. Any free block can used to satisfy a request.
3. Size of the files does not need to be declared when that file is created.
Disadvantage:
4. Effectively only for sequential access files.
5. Space required for pointers.
6. Reliability.
12/08/2021 48
Indexed Location
It brings all the pointers together into one location: the index block.
Each file has its own index block, which is an array of disk-block addresses.
The nth entry in the index block points to the nth block of the file.
The directory contains the address of the index block.
To read the nth block we use the pointer in the nth index block entry to find and
read the desired block.
When file is created, all pointers in the index block are set to nil.
When nth block is first written, a block is obtained from free space manager and
its address is put in the nth index block entry.
It supports direct access, without suffering from external fragmentation.
Disadvantage:
1. Wasted space.
12/08/2021 49
FREE SPACE MANAGEMENT
12/08/2021 50
Bit Vector:
Normally free space list is implemented as a bit map or bit vector.
Each block is represented by one bit.
If the block is free, the bit is one. If the block is allocated the bit is zero.
Advantage: Relative simplicity & Efficiency.
Linked list:
Here, we linked together all the free disk blocks, keeping a pointer to the first free block in
a special location on the disk and catching it in memory.
This first block contains a pointer to the next free disk block.
Disadvantage: We must read each block (for traversing the list) which requires substantial
I/O.
Grouping:
To store the address of n free blocks in the first free block.
The first n-1 of these blocks are actually free.
The last block contains the addresses of another n free blocks.
Counting:
Rather than address we can keep address of first free block and number (n) of free
contiguous blocks that follows the first block.
12/08/2021 51
END OF CHAPTER
DISK SCHEDULING
12/08/2021 53
Disk Scheduling
The seek time is the time for the disk arm to move the heads to the cylinder containing
the desired sector.
The rotational latency is the additional time waiting for the disk to rotate the desired
sector to the disk head.
The disk bandwidth is the total number of bytes transferred, divided by the total time
between the first request for service and the completion of the last transfer.
Scheduling Techniques:
1. FCFS.
2. SSTF.
3. SCAN.
4. C-SCAN.
12/08/2021 54
Let us Consider disk queue with requests for I/O to blocks on cylinder.
98,183,37,122,14,124,65,67 and disk head is at 53.
3. SCAN Algorithm
Assuming disk arm is heading towards zero.
53,37,14,65,67,98,122,124,183.
4. C-SCAN Algo
This is a special case of SCAN Algorithm.
12/08/2021 55
CPU SCHEDULING
12/08/2021 56
Scheduling Criteria
CPU utilization – keep the CPU as busy as possible
12/08/2021 57
First Come First Served
0 24 27 30
12/08/2021 58
Shortest Job First Scheduling Algo
• Associate with each process the length of its next CPU burst.
• Use these lengths to schedule the process with the shortest time.
Two schemes:
1. Non-preemptive – once CPU given to the process it cannot be
preempted until completes its CPU burst.
2. preemptive – if a new process arrives with CPU burst length
less than remaining time of current executing process,
preempt. This scheme is know as the Shortest-Remaining-
Time-First (SRTF).
12/08/2021 59
Example of Non-Preemptive SJF
Process Arrival Time Burst Time
P1 0.0 7
P2 2.0 4
P3 4.0 1
P4 5.0 4
SJF (non-preemptive)
P1 P3 P2 P4
0 3 7 8 12 16
12/08/2021 60
Example of Preemptive SJF
0 2 4 5 7 11 16
12/08/2021 61
Round Robin Algorithm
12/08/2021 62
Example of RR with Time Quantum = 20
P1 P2 P3 P4 P1 P3 P4 P1 P3 P3
12/08/2021 63
Multi Level Queue Scheduling
12/08/2021 64
Assignment:
PROCESS ARRIVAL TIME BURST TIME
01.
P1 0.0 8
P2 0.4 4
P3 1.0 1
12/08/2021 66
JAVA SCRIPT
What is the Document Object Model?
The Document Object Model is a platform- and language-neutral interface that will
allow programs and scripts to dynamically access and update the content, structure
and style of documents. The document can be further processed and the results of that
processing can be incorporated back into the presented page.
12/08/2021 BY PROF YK 68
12/08/2021 BY PROF YK 69
Window Object
12/08/2021 BY PROF YK 70
Window Object Methods
12/08/2021 BY PROF YK 71
Method Description
alert() Displays an alert box with a message and an OK button
blur() Removes focus from the current window
clearInterval() Cancels a timeout set with setInterval()
clearTimeout() Cancels a timeout set with setTimeout()
close() Closes the current window
confirm() Displays a dialog box with a message and an OK and a
Cancel button
createPopup() Creates a pop-up window
focus() Sets focus to the current window
moveBy() Moves a window relative to its current position
moveTo() Moves a window to the specified position
open() Opens a new browser window
print() Prints the contents of the current window
prompt() Displays a dialog box that prompts the user for input
resizeBy() Resizes a window by the specified pixels
resizeTo() Resizes a window to the specified width and height
scrollBy() Scrolls the content by the specified number of pixels
scrollTo() Scrolls the content to the specified coordinates
setInterval() Evaluates an expression at specified intervals
setTimeout() Evaluates an expression after a specified number of
12/08/2021 BY PROF YK 72
milliseconds
Window Object Properties
12/08/2021 BY PROF YK 73
Property Description
Closed Returns whether or not a window has been closed
defaultStatus Sets or returns the default text in the statusbar of the window
Toolbar Sets whether or not the browser's tool bar is visible or not
12/08/2021 BY PROF YK 74
History Object
The History object is actually a JavaScript object, not an HTML DOM object.
The History object is automatically created by the JavaScript runtime engine and consists
of an array of URLs. These URLs are the URLs the user has visited within a browser
window.
The History object is part of the Window object and is accessed through the
window.history property.
Property Description
Length Returns the number of elements in the history list
Method Description
back() Loads the previous URL in the history list
forward() Loads the next URL in the history list
go() Loads a specific page in the history list
12/08/2021 BY PROF YK 75
EVENTS
12/08/2021 BY PROF YK 76
Properties of Event:
Property Description
Current Target The node at which the event is being
currently processed
Target The node on which the event occurred.
Event Phase A number specifying the phase of the event
1. CAPTURING_PHASE
2. AT_TARGET
3. BUBBLING_PHASE
12/08/2021 BY PROF YK 77
INTERNET EXPLORER EVENT MODEL
12/08/2021 BY PROF YK 78
IE Event Object Description
Type A string that specifies the type of event
that had occurred.
srcElement The document element on which the
event occurred
Button An integer that specifies the mouse
button that was pressed.
Integer Meaning
1 Left button
2 Right button
For multiple4buttons we add up the
Middle button
values.
Client X , Client Y These integers specify the mouse
coordinates at the time of the event,
relative to the upper left corner.
12/08/2021 BY PROF YK 79
CONTD
Key Code This integer specifies the key code for key
down , key up events and the unicode
character code for keypress events.
12/08/2021 BY PROF YK 80
END OF JAVA SCRIPT
12/08/2021 BY PROF YK 81