A number of Markov-based software reliability models have been developed for measuring software reliability. However, the application of these models is strictly limited to software that satisfies the Markov properties. The objective of our work is to expand the application domain of the Markov-based models, so that most software can be modeled and software reliability can be measured at the architecture level. To overcome the limitations of Markov properties, our model takes execution history into account and addresses both deterministic and probabilistic software behaviors. Each state represents the executions of one or more components depending on the architectural styles. In addition, the executions of one component are depicted by using distinctive states, when such executions are influenced by past states. Furthermore, we construct loops to eliminate the likelihood of unlimited state expansion and utilize a binomial tree structure to account for all the different execution paths. We show that Markov models are applicable even to software that does not fully satisfy the Markov properties. Therefore, we significantly improve the state of the art in architecture-based software reliability modeling.